[ 
https://issues.apache.org/jira/browse/SLING-2762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13868615#comment-13868615
 ] 

Alexander Klimetschek commented on SLING-2762:
----------------------------------------------

BTW, regarding the null login in JCR allowing the context to define the user 
freely: I hope Jackrabbit/Oak has an option to turn that off and it is off by 
default. Otherwise things like loginByService() are not adding any security, 
just a little convenience to configure the mappings in a central place (which 
probably will evolve into a pluggable setting anyway, since otherwise a 
deployment of a new feature would always require update of that central 
configuration anyway or you are forced to add a fallback to "admin" for 
unconfigured services, which would be a bad outcome...).

> AbstractSlingRepository#login violates JCR spec
> -----------------------------------------------
>
>                 Key: SLING-2762
>                 URL: https://issues.apache.org/jira/browse/SLING-2762
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR
>            Reporter: Antonio Sanso
>            Assignee: Antonio Sanso
>
> AbstractSlingRepository#login seems to violate the javax.jcr.Repository spec.
> The API [0] says
> " If credentials is null, it is assumed that authentication is handled by a 
> mechanism external to the repository itself (for example, through the JAAS 
> framework) and that the repository implementation exists within a context 
> (for example, an application server) that allows it to handle authorization 
> of the request for access to the specified workspace."
> while the implementation looks like
> {code}
> ...
> if (credentials == null) {
>     credentials = getAnonCredentials(this.anonUser);
> }
> ...
> {code}
> [0] 
> http://www.day.com/maven/jsr170/javadocs/jcr-2.0/javax/jcr/Repository.html#login%28javax.jcr.Credentials,%20java.lang.String%29



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to