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: use production APIs by default #606

Merged
merged 4 commits into from
Apr 20, 2021
Merged

feat: use production APIs by default #606

merged 4 commits into from
Apr 20, 2021

Conversation

craicoverflow
Copy link
Contributor

@craicoverflow craicoverflow commented Apr 20, 2021

By default the rhoas CLI will log in to https://api.openshift.com API instead of https://api.stage.openshift.com, and https://identity.api.openshift.com/auth/realms/rhoas instead of https://identity.api.stage.openshift.com/auth/realms/rhoas.

Verification

Run rhoas login to log in. https://identity.api.stage.openshift.com/auth/realms/rhoas will not work yet until the server-side switch is complete, so you can run rhoas login --mas-auth-url=staging.

Comment on lines +34 to +44
// Auth Build variables
var (
ProductionAPIURL = "https://api.openshift.com"
StagingAPIURL = "https://api.stage.openshift.com"
DefaultClientID = "rhoas-cli-prod"
DefaultOfflineTokenClientID = "cloud-services"
ProductionAuthURL = "https://sso.redhat.com/auth/realms/redhat-external"
ProductionMasAuthURL = "https://identity.api.openshift.com/auth/realms/rhoas"
StagingMasAuthURL = "https://identity.api.stage.openshift.com/auth/realms/rhoas"
)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Centralised Auth config, as they were duplicated and hard to maintain.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These can be made cofigurable later, through go build.

@craicoverflow craicoverflow marked this pull request as ready for review April 20, 2021 11:44
BREAKING CHANGE: The default API and Auth endpoints now point to the
production environment by default.
@craicoverflow craicoverflow merged commit 32df9e9 into main Apr 20, 2021
@craicoverflow craicoverflow deleted the prod-api branch April 20, 2021 14:57
@craicoverflow craicoverflow mentioned this pull request Apr 22, 2021
7 tasks
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.

3 participants