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

OIDC login flow can't complete with AWS Cognito #26596

Open
alkersan opened this issue Apr 23, 2024 · 0 comments
Open

OIDC login flow can't complete with AWS Cognito #26596

alkersan opened this issue Apr 23, 2024 · 0 comments

Comments

@alkersan
Copy link

I've configured Vault with OIDC auth method with AWS Cognito provider. The login fails at the very end of the flow, when the popup window is trying to post back the auth code message to the parent window. I believe this is due to the same reason as described in #18648 , i.e. when redirected to cognito login portal - it sets Cross-Origin-Opener-Policy: same-origin, which prevents posting messages across windows.

To Reproduce

  1. Configure OIDC auth method using AWS Cognito as provider. It's pretty generic, all required claims are included in the jwt and supposed to work even with external group mapping
  2. Try to login with OIDC from web UI
  3. Get an error Cannot read properties of null (reading 'postMessage'), which can be traced back here
    Screenshot 2024-04-22 at 20 11 09
  4. Screen recording is below
Screen.Recording.2024-04-22.at.17.07.39.mov

Environment:

  • Vault Server Version (retrieve with vault status): 1.16.1
  • Vault CLI Version (retrieve with vault version): 1.16.1 (6b5986790d7748100de77f7f127119c4a0f78946), built 2024-04-03T12:35:53Z
  • Server Operating System/Architecture: Debian 12 (bookworm), Linux 6.6.20

Additional context
Logging in from CLI (vault login -method=oidc -path=cognito) is working fine

@alkersan alkersan changed the title OIDC flow can't complete with AWS Cognito OIDC login flow can't complete with AWS Cognito Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants