Bug 1828208
| Summary: | User must login with auth type present in the sesion after expiration | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Rahul Bajaj <rabajaj> |
| Component: | Hammer | Assignee: | Rahul Bajaj <rabajaj> |
| Status: | CLOSED ERRATA | QA Contact: | Mirek Długosz <mzalewsk> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.8.0 | CC: | apatel, egolov, kgaikwad, mshira, ofedoren, rabajaj, tbrisker |
| Target Milestone: | 6.8.0 | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | tfm-rubygem-hammer_cli_foreman-2.1.1 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-10-27 13:32:10 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Rahul Bajaj
2020-04-27 10:21:31 UTC
Upstream bug assigned to rabajaj Upstream bug assigned to rabajaj Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/29575 has been resolved. Confirming that current implementation works as described in Github issue comment: https://github.com/theforeman/hammer-cli-foreman/pull/516#issuecomment-635164759 Scenario #1: 1. do not set default_auth_type in config file, or set to basic 2. log in using OAuth (`hammer auth login oauth --oidc-client-id <client> --username <user> --password <pass> --oidc-token-endpoint RHSSO_endpoing/token`) 3. wait for session to expire 4. run any hammer command Result: hammer asks for basic auth credentials. User can login again using `hammer auth login oauth` command Scenario #2: 1. set default_auth_type in config file to OAuth (password_grant was tested) 2. log in using basic auth 3. wait for session to expire 4. run any hammer command Result: hammer asks for OAuth credentials. User can login again using `hammer auth login basic` command to continue using basic auth. In other words: when you obtain session key, it is used. Once session expires, hammer asks for new login/password pair. hammer config file determines which credentials must be provided (basic or OAuth). tested on: Satellite 6.8.0 snap 6 katello-3.16.0-0.3.rc3.el7sat.noarch satellite-6.8.0-0.6.beta.el7sat.noarch foreman-2.1.0-0.22.rc3.el7sat.noarch pulp-server-2.21.2-1.el7sat.noarch tfm-rubygem-hammer_cli-2.1.1-1.el7sat.noarch tfm-rubygem-hammer_cli_foreman-2.1.1-1.el7sat.noarch Hello Mirek, Perfect! Thanks for summing it again from the PR :) Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Satellite 6.8 Satellite Tools Release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:4367 |