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

added kc broker flag #1396

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

nickbwuzhere
Copy link

@nickbwuzhere nickbwuzhere commented Feb 24, 2025

This pull request fixes the issues of saml2aws not having the ability to hop multiple request chains to follow keycloak brokers, as well as the issue of it not carrying cookies along with the requests in this chain, which would result in it failing to do any multi-provider hops.

I mentioned the issue this is solving in #1395

After looking at how the keycloak authentication chain operates, I've managed to add a flag called "kc-broker" for logging in. This flag you can give a valid kc-broker name, (specified in your keycloak configuration). Keycloak will then take this broker and follow through to the target broker, beginning the authentication chain. Once this process begins the only necessary component that needed adding to saml2aws was for saml2aws to carry cookies forward along the request chain.

This avoids the usage of the browser mode, for requests that stay within the keycloak ecosystem, and allows usage of keychain to store credentials for accounts in other federations.

It passes all tests, and works similar to other flags. This could likely be expanded to other providers in the case the authentication has to go through several different sources to fully authenticate.

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.

1 participant