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

auth: OIDC login UX (include code in login URL) #3248

Closed
rbtcollins opened this issue Mar 17, 2023 · 2 comments
Closed

auth: OIDC login UX (include code in login URL) #3248

rbtcollins opened this issue Mar 17, 2023 · 2 comments
Labels
auth-credentials authentication, authorization, credentials, AWS Builder ID, sso feature-request New feature or enhancement. May require GitHub community feedback. pending-release security

Comments

@rbtcollins
Copy link

rbtcollins commented Mar 17, 2023

Following on from #3229 (comment)

The extension used to have this behavior but this was removed in #3148 due to phishing/security concerns.

I don't think the current behaviour addresses the phising concern: The phising concern referenced is that a code flow can be initiated on a device the attacker controls, e.g. by presenting a URL to the user in email, and then the mitigations talk about what the SSO portal should do to ensure that the user is actually in possession of the 'device' in question.

For this vscode extension, the device is VScode itself. But since VSCode can show URLs, a malicious extension can almost certainly trigger a URL to be presented that requests device code authorisation from the user. In this scenario the AWS extension isn't even involved (except perhaps by being present it increases the false confidence the user might have in the code request).

The recommended mitigations are to get the user to check that they can see the code they are requesting on the device they think they are approving.

Something like:

  • show the code in the AWS extension UI rather than just the in the debug output
  • on the portal rather than asking 'authorise <client> to access <scopes>' the confirmation prompt should be "authorise <client> which is showing code <CODE> to access <scopes>'. Or some similar thing.

tl;dr: The code not being included in the request by the vscode extension doesn't mitigate the security concerns at all; that needs to be done with changes to the portal and the extension UI.

Note that the aws sso login is also significantly vulnerable to this problem, though it already shows the code clearly, but the portal lets things down.

@rbtcollins rbtcollins added the feature-request New feature or enhancement. May require GitHub community feedback. label Mar 17, 2023
@JadenSimon
Copy link
Contributor

Thanks for the request! I've notified relevant parties.

@JadenSimon JadenSimon added the auth-credentials authentication, authorization, credentials, AWS Builder ID, sso label Mar 17, 2023
@justinmk3 justinmk3 changed the title Re-introduce code inclusion in login URL auth: improve OIDC login UX (include code in login URL) Mar 20, 2023
@justinmk3 justinmk3 changed the title auth: improve OIDC login UX (include code in login URL) auth: OIDC login UX (include code in login URL) Mar 20, 2023
@justinmk3
Copy link
Contributor

open https://.../?user_code=XXXX-YYYY , which automatically applies the code.

That behavior is now implemented in AWS Toolkit 1.90.

Thanks for your feedback on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth-credentials authentication, authorization, credentials, AWS Builder ID, sso feature-request New feature or enhancement. May require GitHub community feedback. pending-release security
Projects
None yet
Development

No branches or pull requests

3 participants