Skip to content

[auth] Add logic to store and retrieve auth tokens#4295

Draft
jcastill wants to merge 1 commit into
sosreport:mainfrom
jcastill:jcastillo-add-auth-token-storage
Draft

[auth] Add logic to store and retrieve auth tokens#4295
jcastill wants to merge 1 commit into
sosreport:mainfrom
jcastill:jcastillo-add-auth-token-storage

Conversation

@jcastill
Copy link
Copy Markdown
Member

@jcastill jcastill commented Apr 16, 2026

This commit implements functionality to store and
retrieve authorization tokens obtained remotely from a
distribution-defined authentication portal. This
enables users to reuse previously obtained tokens
that remain valid, eliminating the need to request a new token for each subsequent interaction.

Related: RHEL-167336, SUPDEV-186


Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines

  • Is the commit message split over multiple lines and hard-wrapped at 72 characters?
  • Is the subject and message clear and concise?
  • Does the subject start with [plugin_name] if submitting a plugin patch or a [section_name] if part of the core sosreport code?
  • Does the commit contain a Signed-off-by: First Lastname email@example.com?
  • Are any related Issues or existing PRs properly referenced via a Closes (Issue) or Resolved (PR) line?
  • Are all passwords or private data gathered by this PR obfuscated?

@packit-as-a-service
Copy link
Copy Markdown

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo dnf install -y 'dnf*-command(copr)'
  • dnf copr enable packit/sosreport-sos-4295
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

Comment thread sos/policies/auth/__init__.py Outdated
Comment thread sos/upload/targets/redhat.py
Comment thread sos/upload/targets/redhat.py
Comment thread sos/policies/auth/__init__.py
@jcastill jcastill force-pushed the jcastillo-add-auth-token-storage branch from 8f32aaa to 0b3deff Compare April 16, 2026 08:04
@jcastill jcastill added Status/RedHat QE RH QE has been requested to review Kind/RedHat RedHat related item Kind/Upload upload component of sos labels Apr 16, 2026
@jcastill jcastill requested review from mhradile and pmoravec April 16, 2026 08:07
@jcastill
Copy link
Copy Markdown
Member Author

@pmoravec @arif-ali I'd be very grateful if you can start the review of this PR. I'll move it out of draft after RH QE finish their review as well

@jcastill jcastill requested a review from arif-ali April 28, 2026 08:34
Comment thread sos/policies/auth/__init__.py Outdated
Comment thread sos/policies/auth/__init__.py
Comment thread sos/policies/auth/__init__.py Outdated
Comment thread sos/policies/auth/__init__.py Outdated
@jcastill jcastill force-pushed the jcastillo-add-auth-token-storage branch 3 times, most recently from d569727 to 3be1626 Compare April 29, 2026 11:45
@jcastill
Copy link
Copy Markdown
Member Author

And new version, this time removing the old or faulty token file. I think I've covered all cases where we should remove it, but let me know if I missed any

@jcastill jcastill force-pushed the jcastillo-add-auth-token-storage branch from 3be1626 to 10f9e67 Compare April 30, 2026 10:32
Comment thread sos/policies/auth/__init__.py Fixed
@jcastill jcastill force-pushed the jcastillo-add-auth-token-storage branch from 10f9e67 to 0970b32 Compare April 30, 2026 10:39
Comment thread sos/policies/auth/__init__.py
Comment thread sos/policies/auth/__init__.py Outdated
Comment thread sos/policies/auth/__init__.py
Copy link
Copy Markdown
Contributor

@pmoravec pmoravec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just those minor issues spot, LGTM otherwise.

This commit implements functionality to store and retrieve
authorization tokens obtained remotely from a
distribution-defined authentication portal. This
enables users to reuse previously obtained tokens
that remain valid, eliminating the need to request
a new token for each subsequent interaction.

Related: RHEL-167336, SUPDEV-186

Signed-off-by: Jose Castillo <jcastillo@redhat.com>
@jcastill jcastill force-pushed the jcastillo-add-auth-token-storage branch from 0970b32 to 5a3b1eb Compare May 6, 2026 10:54
@pmoravec
Copy link
Copy Markdown
Contributor

LGTM!

@jcastill
Copy link
Copy Markdown
Member Author

@pmoravec thank you for the review! Can you add your ack if it's ok with you?
@arif-ali could you review this PR when you have a minute please?

@pmoravec
Copy link
Copy Markdown
Contributor

@pmoravec thank you for the review! Can you add your ack if it's ok with you? @arif-ali could you review this PR when you have a minute please?

I wasnt sure if the Draft status means you plan to further change something, hence no ACK given. Assuming the PR is complete, ACK to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Kind/RedHat RedHat related item Kind/Upload upload component of sos Status/RedHat QE RH QE has been requested to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants