[
https://issues.apache.org/jira/browse/OAK-4048?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexander Klimetschek updated OAK-4048:
---------------------------------------
Attachment: OAK-4048.patch
Attached a simple patch.
However, then the DefaultSyncHandlerTest.testFindLocalIdentity() unit test
fails with "known authorizable should exist". This test very much expects that
a local only user (never synced) is returned. So maybe there was a semantic
change, and it's not really a regression. But I can't judge.
In my case I was using SyncHandler.listIdentities() and expected the
getExternalIdRef() of the returned SyncedIdentity objects to always be
non-null, which gave an NPE. Easy to fix, and in fact the javadoc [states that
it can return
null|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/SyncedIdentity.java#L35-L40].
But other API users might be surprised as well.
> [regression] SyncHandler.listIdentities() returns all users, not only
> external ones
> -----------------------------------------------------------------------------------
>
> Key: OAK-4048
> URL: https://issues.apache.org/jira/browse/OAK-4048
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: auth-external
> Reporter: Alexander Klimetschek
> Attachments: OAK-4048.patch
>
>
> OAK-3508 accidentally introduced a regression in
> https://github.com/apache/jackrabbit-oak/commit/cc78f6fdd122d1c9f200b43fc2b9536518ea996b#diff-490ff25c104d019ee25f92b2b8bdbabd
> If {{getIdentityRef(auth)}} returns null, {{createSyncedIdentity}} needs to
> return null.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)