Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-20545

Satellite OAuth returns non-compliant token field expires_at

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 6.11.0
    • API
    • 0
    • False
    • Hide

      None

      Show
      None
    • False
    • CLOSED
    • 400
    • Endeavour
    • Moderate
    • None

      Description of problem:
      When using bearer tokens with Satellite. The token contains an expires_at field. The expires_at field is not part of the RFC for OAuth. Rather it should be expires_in.

      Version-Release number of selected component (if applicable):
      6.11.0

      How reproducible:
      Easily

      Steps to Reproduce:
      1. Request a OAuth token ( We authenticate and return the token like this:
      https://github.com/openstack/tripleo-common/blob/master/tripleo_common/image/image_uploader.py#L326)

      2. Check contents of token:

      {'token': '$2a$09$1b6453892473a467d0737uJ56J02CLEXEkOaX0pdLWgLMlg.qWDSi', 'expires_at': '2022-10-28T04:54:58.296Z', 'issued_at': '2022-10-17T23:45:09.306Z'}

      3. Observe expires_at field that is not valid per the RFC for OAuth:
      https://www.rfc-editor.org/rfc/rfc6749#section-4.2.2

      Actual results:
      'expires_at': '2022-10-28T04:54:58.296Z'

      Expected results:
      The response should adhere to the RFC and contain a `expires_in` field. This field indicates the number of seconds since the issued_at time.

      Additional info:
      Upstream issue raised as well:
      https://projects.theforeman.org/issues/35690

      This is impacting us with new versions of Satellite here:
      https://bugzilla.redhat.com/show_bug.cgi?id=2134075

              jira-bugzilla-migration RH Bugzilla Integration
              jira-bugzilla-migration RH Bugzilla Integration
              RH Bugzilla Integration RH Bugzilla Integration
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: