Chuyển đến nội dung chính

Bài đăng

Đang hiển thị bài đăng từ Tháng 1, 2014

[LDAP] Sample ldap login-module and ldap client mapping configuration

The AEM instance can be setup to authenticate against ldap users by following [1].  However you might see that all the active directory users are not able to login.  This could happen if any of the value specified in ldap_login.conf is not appropriate (Ex: User root or filter). The below article shows a sample ldap login-module (ldap_login.conf) & ldap client (JXplorer) mapping snapshot. I am using Opends (Ldap server acts as active directory) & JXplorer (Java LDAP Browser) to show the mappings. Connection-Settings Authentication-Settings userRoot: all users are searched from below dn. Auto-Creation To create the user within the repository and if needed to keep its data up-to date. [1] http://dev.day.com/docs/en/cq/current/core/administering/ldap_authentication.html

Create a new Logger into Adobe CQ

CQ allows you to create custom log files. You can define your own Logger by in CQ Web Console Configuration (/system/console/configMgr). There are 3 steps to create a new logger: ·          Create a new instance of the Factory Configuration   Apache Sling Logging Logger Configuration . ·          Set the Log level you wish (Trace, Debug, Info, Warn or Error). ·          Specify the Log File. For example, logs/example.log. This will be created automatically in your CQ logs folder. ·          Configure the Message pattern for formatting the log messages. Specify the Loggers which will be logged into the new Log file. Here we usually give one or several java package names. Any message logged within those packages will end up in this new Log file. Each logger name applies for any child category unless configured otherwise. E.g. a logger name of org.apache.sling applies to logger org.apache.sling.commons unless there is a different configuration for org.apache.sling.

Login / Logout on a Publish instance and Closed User Group (CUG)

In CQ5 there is the login logout could be configured using a Closed User Group. Closed User Groups (CUGs) are used to limit access to specific pages that reside within a published internet site. Such pages require the assigned members to login and provide security credentials. http://dev.day.com/docs/en/cq/5-4/howto/create_apply_cug.html The logout using /libs/cq/core/content/login.logout.html always gets redirected to the geometrixx site   http://localhost:4503/content/geometrixx-outdoors/en.html By configuring the Default login page  under the osgi configuration for com.day.cq.auth.impl.LoginSelectorHandler to be – /content/mysite/en/login But still after logout the page goes to the geometrixx site. IIRC, the redirect first goes to to / which then goes through the standard, somewhat complex handling of the root with multiple redirects: 1) / has a resource type of sling:redirect and redirects to /index.html 2) /index.html is handled by the RootMappingServlet [0] which h

How to startup scripts for Author and Publisher

Use case : You want to start and stop CQ on system start and stop Solution : Here is script that you can use. Put this script in /etc/init.d 1. Create a file /etc/init.d/cq5 on your server and copy the contents from below script. 2. edit the file and make the following changes update the "pidfile:" config to match your cq instance update the "CQ5_ROOT" and "CQ5_USER" variables to match your cq instance 3. Run this command: chmod 755 /etc/init.d/cq5 4. Run this command to add the config to redhat startup and shutdown: chkconfig --add cq5 Recently, I stood up a CQ5.6 stack on a local machine running CentOS 6 for testing some things and one of tasks I have been wanting to do is automate the startup scripts for the author and publisher instances.  In the past, we did not have much luck but never really invested the time to work it out, so I took this rare opportunity to tackle the problem. First, as with most things, was to search Google.  As

How to custom CQ Login Module

In order to manage the login process in our project, we will use a custom CQ Login Module. We will admit the root URL of CQ instance is: http://localhost:4502/ . This value may change depending of your environment. The %CQ_HOME% variable we will mention refers to the CQ install path. It admits you have defined %CQ_HOME% as an environment variable. 1.         Update the repository definitions The login module must be referenced in the repository definitions. You have to edit the next file: %CQ_HOME%/crx-quickstart/repository/repository.xml Do a copy of repository.xml to repository.xml.original In repostiory.xml, replace  security  part of repository.xml with following: <Security appName="com.day.crx">         <SecurityManager class="com.day.crx.core.CRXSecurityManager"> <WorkspaceAccessManager class="org.apache.jackrabbit.core.security.simple.SimpleWorkspaceAccessManager"/>             <UserManager class="