Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-13176

RPC call for 'impersonating' another user

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Won't Fix
    • None
    • None
    • None
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.

      I'd like to be able to connect to JIRA as one user, and then once the session is created and I've retrieved my token, change the session to be logged on as a different user.

      Rationale: I'm creating an intranet site that combines information from JIRA with information from our other systems to create a personal home page. This home page uses NTLM/IWA to authenticate users, so I get a username but not a password. If I could connect to JIRA as a known, single account (e.g. "intranet") and then call JiraSoapServiceService.impersonate("joe.bloggs") then I'd be able to be logged in as joe.bloggs without actually needing his password. Naturally the "intranet" account would need to have some kind of "can impersonate" permission set up on it.

      Looking at the RPC code it seems that it might just be as simple as adding an "impersonate" method to the tokenManager that does something like:

      public void impersonate(String token, String username) throws RemoteAuthenticationException, RemotePermissionException
      {
      User currentUser = retrieveUser(token);
      if(!permissionManager.hasPermission(Permissions.IMPERSONATE, currentUser)) throw new RemotePermissionException("No permission to perform operation");
      User newUser = UserUtils.getUser(username);
      synchronized(tokens) {
      tokens.put(token, newUser);
      }
      }

      and then adding the relevant code to the interface itself to expose this method.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              3182d7f0b40e Richard Fine
              Votes:
              20 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: