Hi,
I’m gonna use Keycloak SSO to integrate accounts between our service and GCP (Google Cloud Platform).
Background
- User logins from our login page (not keycloak login page)
- keycloak verifies authentication
- If authenticated, needed to redirect to GCP console as logged in
Current State
-
I’ve finished setting up SSO configuration both in Keycloak and GCP admin with SAML.
-
Authentication from Keycloak login, it is well redirected to GCP console as logged in with keycloak login ID (There is a same ID on GCP)
-
But login should be done from our service page, not from Keycloak login.
So, tried to get access token by the script. I could get the access token from the below python code.
(using Flask)res = requests.post(REQ_URL, auth=HTTPBasicAuth(name, pwd), headers=headers, data=data)
res = json.loads(res.text)
print(res)
access_token = res[‘refresh_token’] -
But, I don’t know how to redirecting to GCP console with ACCESS TOKEN as logged in.
Which URL should I take to redirect?
As for OKta SSO, they’re providing GCP Console access(embedding) URL when finishing the SAML setup.
On Keycloak Setting
POST Binding URL: www.google.com/a/our-domain.com/acs
On GCP Admin
SAML: our-keycloak-domain.com/auth/realms/keycloak-aws/protocol/saml
Cert file is properly uploaded.
- https:// is intentionally omitted in All URL, because more than two links are not allowed for new user.