Thanks for the response Felix.

We do want to authenticate against Sling, and following your instructions, 
form-based authentication works as expected.

Jozsef

-----Original Message-----
From: Felix Meschberger [mailto:[email protected]] 
Sent: Wednesday, September 22, 2010 12:03 AM
To: [email protected]
Subject: Re: form based authentication with CRX

(Beware: This is going to be an answer specific to CRX)

Hi Jozsef,

The first question raising: Do you want to authenticate using form based
authentication against the CRX webapp below /crx ? If so, then the setup
of the Sling part of the URI space is of no relevance and you are bound
to what is provided by the CRX web application.

If you want to authenticate against the Sling part (everyhting except
the /crx, /admin, and /system/console subtrees) you have to update a few
other bundles as well and particularly remove the
org.apache.sling.commons.auth bundle because it has been replaced by the
org.apache.sling.auth.core bundle.

The bundles to update/install (in addition to what you did) are:

  - Sling Engine (to 2.1.0)
  - Sling Settings (new install, version 1.0.0)
  - JCR Resource Resolver (trunk build, release not available yet)

Next you have to reconfigure CRX and the Form Authentication Handler to
support "trusted_credentials_attribute".

For CRX edit the repository.xml file and uncomment the <param> element
whose name is "trusted_credentials_attribute" and restart CRX.

For the Form Authentication Module, edit (or create) the Form
Authentication Handler configuration (e.g. at [1]) to set the
"Credentials Attribute" property to the value of the <param
name="trusted_credentials_attribute> element in the CRX repository.xml file.

Hope this helps.

Regards
Felix

[1]
http://localhost:7402/system/console/configMgr/org.apache.sling.auth.form.FormAuthenticationHandler


Am 21.09.2010 19:51, schrieb Jozsef Vass:
> I have built sling from svn and form based authentication works as expected. 
> When starting Sling, <http://localhost:8080/system/console/slingauth> 
> http://localhost:8080/system/console/slingauth shows "Apache Sling Form Based 
> Authentication Handler" and form authentication works right out of the box.
> 
> However, I would like to use form based authentication with CRX. I have CRX 
> 2.1 (April 2010) installed. Under 
> http://localhost:7402/system/console/slingauth, I only see "Token 
> Authentication Handler." I have installed Apache Sling Authentication Service 
> (org.apache.sling.auth.core) 1.0.2 and Apache Form Based Authentication 
> Handler (org.apache.sling.auth.form) 1.0.0 bundles and updated to Apache 
> Sling API 2.1.0 (org.apache.sling.api). All the above bundles are active. 
> However, Form Based Authentication Handler does not show up as a registered 
> authentication handler and request does not get authenticated, but a node is 
> created (j_security_check).
> 
> At the bundles, I also see older Apache Sling Authentication Service 
> (org.apache.sling.commons.auth) 0.9.0.R925144. If I disable this bundle, I do 
> not see any authentication handler.
> 
> How could I use form-based auth authentication with CRX. Any more bundles or 
> configuration needs to be changed?
> 
> Thanks.
> 
> Jozsef
> 

Reply via email to