Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-6849

Impersonation for group of users

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • ResourceResolver

    Description

      Currently we have two possibilities (which I know) to impersonate some account as a different user:

      1. First solution can be implemented in the following way:
        Map<String, Object> authenticationInfo = Maps.newHashMap();
        authenticationInfo.put(ResourceResolverFactory.USER_IMPERSONATION, userId);
        resourceResolver = resourceResolverFactory.getServiceResourceResolver(authenticationInfo);
        

        it works, but adds a lot of effort for Administrators, they have to define each user in list of possible impersonators (unfortunately this approach doesn't support groups).

      2. Second approach is to get user session using SlingRepository.impersonateFroService:
        slingRepository.impersonateFromService(null, credentials, null);
        

        Unfortunately, this requires to pass userId and password, that is usually impossible to get from programmatical point of view.

      To make life easier, it would be nice if one of the following suggestion would be implemented:

      • slingRepository.impersonateFromService(null, credentials, null); could start accepting credentials without password
      • impersonators could be configured for group of users

      Attachments

        Activity

          People

            Unassigned Unassigned
            kwatral Krzysztof Watral
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: