• Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Low Low
    • None
    • 4.3.0
    • REST
    • None

      Issue Summary

      When using command line, REST API endpoints may fail with an "Application failed to authenticate" error.

      Steps to Reproduce

      The following REST API calls (at least) fail to be executed:

      fkraemer@C02ZX4MTMD6N ~ % curl -u fkraemer -X GET "http://localhost:8095/crowd/rest/usermanagement/1/user/attribute?username=crowd1"
      Enter host password for user 'fkraemer':
      Application failed to authenticate
      fkraemer@C02ZX4MTMD6N ~ % curl -u fkraemer -X PUT -d '{"value":"newpwd"}' "http://localhost:8095/crowd/rest/usermanagement/1/user/password?username=crowd1"
      Enter host password for user 'fkraemer':
      Application failed to authenticate
      fkraemer@C02ZX4MTMD6N ~ %
      

      Notes:

      • Authentication of fkraemer works directly in the browser.
      • The base URL http://localhost:8095/crowd is correct.
      • The user fkraemer is a local Crowd administrator.
      • The user crowd1 is a local Crowd regular user.

      Expected Results

      Authentication works and the REST API call is executed successfully.

      Actual Results

      Authentication fails and the REST API call is not executed.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available.

            [CWD-5741] REST API authentication fails

            Mina Trevizo added a comment - - edited

            Thanks Pawel, 

            Will talk with our Crowd SME

            Mina Trevizo added a comment - - edited Thanks Pawel,  Will talk with our Crowd SME

            These have to be credentials of the application that is defined in Crowd

            https://confluence.atlassian.com/crowd/adding-an-application-18579591.html

            The application can access user's data if the user belongs to one of the application directories.

            Pawel Gruszczynski (Inactive) added a comment - - edited These have to be credentials of the application that is defined in Crowd https://confluence.atlassian.com/crowd/adding-an-application-18579591.html The application can access user's data if the user belongs to one of the application directories.

            I've tried using my Bitbucket credentials and then tried my personal access token for Bitbucket as well and still have been getting 'Application failed to authenticate' error. 

            Mina Trevizo added a comment - I've tried using my Bitbucket credentials and then tried my personal access token for Bitbucket as well and still have been getting 'Application failed to authenticate' error. 

            Hi Pawel, 
            Thanks for getting to this. Which applications credentials should we be using in this case? 
            We are trying to retrieve users that can be found in crowd but the involved applications would be Bitbucket

            Mina Trevizo added a comment - Hi Pawel,  Thanks for getting to this. Which applications credentials should we be using in this case?  We are trying to retrieve users that can be found in crowd but the involved applications would be Bitbucket

            Please note that you're using an endpoint dedicated for applications and should authenticate with application credentials, not user credentials.
            https://jira.atlassian.com/secure/AddComment!default.jspa?id=1816293

            Pawel Gruszczynski (Inactive) added a comment - Please note that you're using an endpoint dedicated for applications and should authenticate with application credentials, not user credentials. https://jira.atlassian.com/secure/AddComment!default.jspa?id=1816293

              Unassigned Unassigned
              fkraemer Felipe Kraemer
              Affected customers:
              1 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: