-
Notifications
You must be signed in to change notification settings - Fork 365
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: [LILO-418] - Modify Cloud Manager to use OAuth PKCE instead of β¦ #10600
base: develop
Are you sure you want to change the base?
feat: [LILO-418] - Modify Cloud Manager to use OAuth PKCE instead of β¦ #10600
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test passed
I'm noticing some weird behavior. I'm trying to go to localhost:3000 with the Screen.Recording.2024-07-10.at.1.53.30.PM.mov |
I'll test this against Parent/Child proj |
Coverage Report: β
|
cdb9764
to
5e517a7
Compare
Thanks for checking this. I made ammedment to from where we take the login URL so it should work when we override environments settings using localStorageOverrides. |
@bnussman-akamai I did additional merge and resolved conflicts with changes from develop branch. |
f7a7670
to
5554c9c
Compare
It would be also worth to test this against accounts using TPA like Google or Github in dev. |
Currently getting a redirect loop when trying to login |
Just tried on my local dev environment and I don't observe redirect loop. Are you able to attach HAR file from that loop? and possibly your logs from login-backend? Any errors? |
4176793
to
a484bf6
Compare
This PR is stale because it has been open 15 days with no activity. Please attend to this PR or it will be closed in 5 days |
Have you got a chance to look into this PR ? |
Unfortunately, I'm still seeing some sort of redirect loop when I use our environment switcher tool. Screen.Recording.2024-08-19.at.10.03.30.AM.mov |
It seems this may be due configuration of the OAuth client used on Dev env. Could you please confirm? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll keep reviewing, but I'm also experiencing the same redirect loop as mentioned above in Dev environment.
a484bf6
to
71f7987
Compare
71f7987
to
5981d23
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jdamore-linode @bnussman-akamai This is now looking good to me. The issue I was seeing when switching environments has been resolved with latest commit. Would love to get your review/approval since this affects login before merging.
056327a
to
dd20de2
Compare
@bnussman-akamai I recently made updates to the code and resolved conflicts. Could you please confirm how it looks now from your perepective? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe everything is working as expected now!
Quick heads up @mkaminsk-akamai (cc @jaalah-akamai) that there are Cypress test failures that seem to be related to this change in I'm not able to reproduce the failures locally, which seems strange, so if I have time later I'll try to check out the CI recordings and see if they give us any clues, and will follow up if so. |
dd20de2
to
18a2ee2
Compare
@jdamore-linode this is most likely failing because the CI client ID needs |
@jdamore-linode, @jaalah-akamai what could we to do plan merging this PR so we are not blocked with the current CI setup? |
Hoping to work on this soon, but the failures are unrelated to the client ID not being public. The tests are failing because of the call to Using another way to generate a SHA256 hash without needing |
Cloud Manager UI test resultsπ 445 passing tests on test run #25 βοΈ
|
@jaalah-akamai @mkaminsk-akamai this is unblocked now π sorry for the hold up |
@jdamore-linode Thank you for your help! @jdamore-linode , @jaalah-akamai , @bnussman-akamai can you help me merging this PR? I don't have write access to it. |
@jdamore-linode , @jaalah-akamai , @bnussman-akamai Could you advise who should I ask to merge this PR? |
This PR is stale because it has been open 15 days with no activity. Please attend to this PR or it will be closed in 5 days |
I'm trying to schedule meeting to discuss the plan to merge this PR. |
Description π
This change in Cloud Manager is an implication of an enhancement we are introducing, PKCE, which is an OAuth authentication enhancement described in the RFC OAuth 2.1 Authorization Framework: https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-01.
The existing OAuth flow (used by customers) between Login and Cloud Manager uses the OAuth 2.0 implicit flow, which is considered less secure since it exposes access tokens in the redirection URL generated by the authorization server (Login).
In the new PKCE (Proof Key for Code Exchange) flow, the access token is sent inside the response body. There is also an additional layer of security with the code verifier - code challenge contract, which ensures the initial exchange code requestor possessing the code challenge is the same one which requests the access token and has the code verifier. The code challenge is a hash of a random code verifier string generated by the OAuth client.
Current one-step implicit flow:
Is replaced with a two-step process using the S256 PKCE method:
Changes π
session.ts
pkce.ts
OAuth.tsx
Minior changes: authentication.helpers.ts, authentication.reducer.ts, authentication.test.ts, storage.ts
Added unit tests
Target release date ποΈ
Target release date needs to be aligned with Login team, so Cloud Manager will be released AFTER Login component release date.
How to test π§ͺ
Verify the login process into Cloud Manager works as previously in various scenarios.
As an Author I have considered π€
Check all that apply
Commit message and pull request title format standards
<commit type>: [JIRA-ticket-number] - <description>
Commit Types:
feat
: New feature for the user (not a part of the code, or ci, ...).fix
: Bugfix for the user (not a fix to build something, ...).change
: Modifying an existing visual UI instance. Such as a component or a feature.refactor
: Restructuring existing code without changing its external behavior or visual UI. Typically to improve readability, maintainability, and performance.test
: New tests or changes to existing tests. Does not change the production code.upcoming
: A new feature that is in progress, not visible to users yet, and usually behind a feature flag.Example:
feat: [M3-1234] - Allow user to view their login history