Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: token-based login #132

Merged
merged 3 commits into from
Dec 8, 2020
Merged

feat: token-based login #132

merged 3 commits into from
Dec 8, 2020

Conversation

craicoverflow
Copy link
Contributor

@craicoverflow craicoverflow commented Dec 8, 2020

Resolves #130

This PR makes it (again) possible to login with an offline token. This is a temporary workaround until a client is available on production SSO and should be removed again ASAP.

Logging in

rhoas login --token $TOKEN --client-id cloud-services

Side note

This now means that to log in using the authorization code flow, you must specify the auth URL:

rhoas login --url dev --insecure --auth-url=https://sso.qa.redhat.com/auth/realms/redhat-external 

@wtrocki wtrocki self-requested a review December 8, 2020 15:54
@wtrocki
Copy link
Collaborator

wtrocki commented Dec 8, 2020

CC @pmuir

@wtrocki
Copy link
Collaborator

wtrocki commented Dec 8, 2020

Verifying this!

@@ -87,6 +89,8 @@ func NewLoginCmd() *cobra.Command {
cmd.Flags().StringVar(&args.url, "url", stagingURL, "URL of the API gateway. The value can be the complete URL or an alias. The valid aliases are 'production', 'staging', 'integration', 'development' and their shorthands.")
cmd.Flags().BoolVar(&args.insecureSkipTLSVerify, "insecure", false, "Enables insecure communication with the server. This disables verification of TLS certificates and host names.")
cmd.Flags().StringVar(&args.clientID, "client-id", defaultClientID, "OpenID client identifier.")
cmd.Flags().StringVar(&args.authURL, "auth-url", connection.DefaultAuthURL, "SSO Authentication server")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would add comment to separate those flags as temp.

README.md Outdated
@@ -8,7 +8,7 @@ Go to [releases](https://github.com/bf2fc6cc711aee1a0c2a/cli/releases) to downlo

## Getting Started

1. Login to RHOAS
### Login to RHOAS

```shell
rhoas login --insecure
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would add info to qa server so it will be clear for the moment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added here d5d2beb (#132)

@craicoverflow craicoverflow requested a review from wtrocki December 8, 2020 16:22
@wtrocki wtrocki merged commit a08e51c into master Dec 8, 2020
@wtrocki wtrocki deleted the restore-token-login branch December 8, 2020 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restore token-based login flow temporarily
2 participants