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

fix: Increase robustness of openshift login flow #318

Merged
merged 5 commits into from
Sep 2, 2021

Conversation

vburckhardt
Copy link

@vburckhardt vburckhardt commented Aug 16, 2021

This PR increases the robustness of the openshift login flow:

  • Retries on retrieving the passcode ( including covering of the rate limit that kicks in)
  • Race condition (around request headers) that existed in previous version as the same rest client instance was reused without proper locking. Some threads in previous code was effectively essentially removing the auth headers causing any parallel and subsequent request to fail with 401.
  • Exiting with error when passcode cannot be retrieved - ensuring the user is not unexpectedly authenticated as 'anonymous'
  • Handling of intermittent issue where openshift returns a 200 instead of a 302 with accesscode on authentication flow

Context: We've been plagued with a number of authentication / login issue in our terraform code. The IBM Cloud terraform provider makes intensive use. See in particular IBM-Cloud/terraform-provider-ibm#2811

@hkantare
Copy link
Collaborator

We will looking into the PR

@ocofaigh
Copy link

ocofaigh commented Aug 30, 2021

@hkantare Vincent is on vacation for 2 weeks, so I am just following up on this. These authentication issues are occurring quite frequently, so would be great if we could add some robustness like Vincent has proposed in this PR.
Thank you.

@hkantare
Copy link
Collaborator

hkantare commented Sep 2, 2021

Thanks we reviewd the PR and all looks good

@hkantare hkantare merged commit e9cf0f8 into IBM-Cloud:master Sep 2, 2021
@ocofaigh
Copy link

ocofaigh commented Sep 2, 2021

@hkantare Thank you very much - How do we go about getting this into the ibm terraform provider code for next provider release? Thanks

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