You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thorsten Biegner (JIRA)" <ji...@apache.org> on 2016/02/12 00:04:18 UTC

[jira] [Comment Edited] (OAK-3302) ExternalLoginModule:193 can never be reached

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

Thorsten Biegner edited comment on OAK-3302 at 2/11/16 11:03 PM:
-----------------------------------------------------------------

[~anchela] so just to understand. You believe there is not bug here? [1]:

And you are saying the DefaultSyncHandler is not implemented correct?

I think I agree with this. Because instead of returning null at DefaultSyncHandler.java#L187 [2] it should return SyncedIdentity with the ExternalIdRef set to null.
So that then ExternalLoginModule.java#L196 can be reached.

At least thats how I understand my bug report. But if you believe this code behaves correctly I will not have said anything I am no LDAP specialist.

With kind Regards

Thorsten

[1] https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.2.2/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/ExternalLoginModule.java#L189

[2] https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.2.2/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/DefaultSyncHandler.java#L187


was (Author: tbiegner):
[~anchela] so just to understand. You believe there is not bug here? [1]:

And you are saying the DefaultSyncHandler is not implemented correct?

I think I agree with this. Because instead of returning null at DefaultSyncHandler.java#L187 [2] it should return SyncedIdentity with the ExternalIdRef set to null.
So that then ExternalLoginModule.java#L196 can be reached.

At least thats how I understand my bug report. But it is now sometime ago and I am no LDAP specialist so if you believe this code behaves correctly I will not have said anything I am no LDAP specialist.

With kind Regards

Thorsten

[1] https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.2.2/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/ExternalLoginModule.java#L189

[2] https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.2.2/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/DefaultSyncHandler.java#L187

> ExternalLoginModule:193 can never be reached
> --------------------------------------------
>
>                 Key: OAK-3302
>                 URL: https://issues.apache.org/jira/browse/OAK-3302
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: auth-external
>    Affects Versions: 1.2.2
>         Environment: AEM 6.1
>            Reporter: Thorsten Biegner
>            Priority: Minor
>
> Starting at line 193 in Version 1.2.2 which shipped with AEM 6.1 this code can never be reached.
> https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.2.2/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/ExternalLoginModule.java#L189
>  sId = syncHandler.findIdentity(userMgr, userId);
> // if there exists an authorizable with the given userid but is
>  // not an external one or if it belongs to another IDP, we just ignore it.
> if (sId != null) {
> Line 193      ExternalIdentityRef externalIdRef = sId.getExternalIdRef();
>                     if (externalIdRef == null) {
> Because when no ExternalReference is present sId will be null.
> See https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.2.2/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/DefaultSyncHandler.java#L187
> Instead of being null it should return a SyncedIdentity with the ExternalIdRef set to null.
> As far as I can see the same bug still exists in the current trunk see
> https://github.com/apache/jackrabbit-oak/blob/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/ExternalLoginModule.java#L193
> and
> https://github.com/apache/jackrabbit-oak/blob/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/basic/DefaultSyncContext.java#L120



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)