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

OCM-5718 | feat: Display login error if --govcloud supplied with commercial region #1844

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

hunterkepley
Copy link
Contributor

@hunterkepley hunterkepley commented Mar 13, 2024

OCM-5718 describes a bug where if a user attempts to log in supplying all commercial values, except passing in --govcloud flag, ROSA will be in 'fedramp mode' and will attempt to run commands on the wrong API endpoint. This MR makes sure users are meaning to log into govcloud by requiring a govcloud region upon logging in.

All other logic is kept the same, so if you only supply a govcloud region, or an encrypted token, etc, you will still log into fedramp. But, the --govcloud flag bug is solved by requiring the region upon passing the flag. If you pass --govcloud without meaning to (I.E. not providing a govcloud region), you will face an error. Other safeguard in this case already exists, where you must pass in a fedramp token to log in to govcloud anyway.

Copy link

codecov bot commented Mar 13, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 21.04%. Comparing base (692773c) to head (3f38569).
Report is 2 commits behind head on master.

Files Patch % Lines
cmd/login/cmd.go 50.00% 8 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1844      +/-   ##
==========================================
+ Coverage   20.91%   21.04%   +0.12%     
==========================================
  Files         103      104       +1     
  Lines       17351    17688     +337     
==========================================
+ Hits         3629     3722      +93     
- Misses      13447    13688     +241     
- Partials      275      278       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

cmd/login/cmd.go Outdated Show resolved Hide resolved
@davidleerh
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 14, 2024
cmd/login/cmd.go Outdated Show resolved Hide resolved
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 19, 2024
@hunterkepley hunterkepley force-pushed the ocm-5718 branch 2 times, most recently from 445d223 to 84b0b95 Compare March 19, 2024 19:43
@davidleerh
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 19, 2024
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 20, 2024
@den-rgb
Copy link
Contributor

den-rgb commented Mar 21, 2024

/lgtm

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 21, 2024
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 21, 2024
Copy link
Contributor

@robpblake robpblake left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 22, 2024
Copy link
Contributor

openshift-ci bot commented Mar 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidleerh, den-rgb, hunterkepley, robpblake

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 22, 2024
Copy link
Contributor

openshift-ci bot commented Mar 22, 2024

@hunterkepley: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit cd5638f into openshift:master Mar 22, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants