[
https://jira.jboss.org/jira/browse/DNA-565?page=com.atlassian.jira.plugin...
]
Brian Carothers updated DNA-565:
--------------------------------
Attachment: DNA-565.patch
Attached a patch that adds a JcrRepository.Option for ANONYMOUS_USER_ROLES. This defaults
to null (indicating that an anonymous user will not be granted any roles and will not be
able to log in). It can be set to a comma-delimited list of role names that will be
provided to an anonymous user. A test case has been added at the JCR layer.
The patch also changes the REST server around a bit to accommodate this new access. If
the requesting user is not authenticated, the REST code will now attempt to log in
anonymously. I've tested this locally and it did work for me, but I couldn't
figure out a good way to write test cases for it and still test the behavior when it's
not enabled (short of creating a whole new subproject which doesn't seem worth it).
I added this line to the configRepository.xml in the dna-web-jcr-rest project to test the
anonymous access:
<anonymousUserRoles jcr:primaryType="dna:option"
value="connect,readonly"/>
This gave all unauthenticated users the ability to connect to the REST server and
read-only privileges for all workspaces in all repositories.
JCR Implementation Should Support Anonymous Access More Easily
--------------------------------------------------------------
Key: DNA-565
URL:
https://jira.jboss.org/jira/browse/DNA-565
Project: DNA
Issue Type: Feature Request
Components: JCR
Affects Versions: 0.6
Reporter: Brian Carothers
Assignee: Brian Carothers
Priority: Minor
Attachments: DNA-565.patch
The JCR implementation doesn't support anonymous access right now. One could emulate
anonymous access by creating a guest user, but that requires custom code, adding an actual
user in the authentication store, managing the password for the user, etc. It would be
nice if DNA just support anonymous users in a configurable fashion and defaulted this
anonymous access to disabled.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira