Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-5304

DefaultSyncContext.sync(ExternalIdentity) does not verify same identity provider

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4.11, 1.5.15
    • 1.5.18, 1.6.0
    • auth-external
    • None

    Description

      Since OAK-4224, the external IDP should be verified to be the same, but DefaultSyncContext.sync(ExternalIdentity) doesn't do that, as it only looks at ExternalIdentityRef.getProviderName(), but never at the rep:externalId of the (existing) authorizable as it is done in DefaultSyncContext.sync(String).

      The ExternalIdentity's provider will usually match the one from the context, and it's important to check against the existing local user's rep:externalId in case it was synced with a different IDP beforehand (as per the intention in OAK-4224 afaiu, and as done for group memberships in OAK-4397).

      Assume there is

      • a user with the authorizable id "frank"
      • a rep:externalId with provider "alpha" or no such property (because locally created)
      • a sync context using provider "beta"

      Calling by id:

      context.sync("frank") => result has Status.FOREIGN
      

      Calling by external id:

      ExternalIdentity externalId = ...
      // externalId.getId() => "frank"
      // externalId.getExternalId().getProviderName() => "beta"
      context.sync(externalId) => result has Status.UPDATE
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            alexander.klimetschek Alexander Klimetschek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: