Uploaded image for project: 'Atlassian OAuth 2.0'
  1. Atlassian OAuth 2.0
  2. OAUTH20-2491

Jira oauth-2 implementation doesn't respect PKCE standard

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 1.0.2
    • OAuth 2.0 Client
    • Minor

      Problem

      When a remote application tries to obtain an access token using PKCE workflow Jira blocks the request expecting a client secret. While the whole purpose of "Proof Key for Code Exchange" is to not use stored secrets.

      Environment

      • Jira 9.15.2

      Steps to Reproduce

      Expected Results

      Jira will return an access token to be used by the remote application with response code 200

      {
          "scope": "SYSTEM_ADMIN",
          "access_token": "eyJhbGciOiJIUzI1NiJ9.eyJpZCI6ImY2MTViMTdiNDVjMzMxMDU2MTBmMmMwZjQ0N2MwM2E5In0.geCLYxFBbJOOuQa1Z3wpLWl4w-M49l6b76aAKm_6Kzg",
          "token_type": "bearer",
          "expires_in": 3600,
          "refresh_token": "eyJhbGciOiJIUzI1NiJ9.eyJpZCI6ImIzYjlmODg0N2M2ODdhYjcwMzRkZmUzYWYxODUzZWI1In0.mFoOTFD1OIhFt7u9i5Ge2AP9fG_8DmGmuyleGkftUrQ"
      }
      

      Actual Results

      Jira returns 401 asking for client_secret 

       

      Workaround

      Following Setting properties and options on startup add the value

      -Datlassian.oauth2.provider.validate.client.secret=false
      

      Notes

      • Using the mentioned workarround will stop Jira from verifying all the stored client_secrets , this might have a global security impact so be sure to use the workarround only if all remote apps should work only with the less secure PKCE method

              Unassigned Unassigned
              f0ea184c9b1c Mohamed Kouki (Inactive)
              Votes:
              7 Vote for this issue
              Watchers:
              15 Start watching this issue

                Created:
                Updated: