WK Bridge: Sign-in through Węzeł Krajowy¶
WK Bridge connects Keycloak to Węzeł Krajowy over SAML. It acts as an identity provider (IdP) for Keycloak and as a service provider (SP) for Węzeł Krajowy. The bridge runs on AWS Lambda behind API Gateway, with no dedicated VPS.
Sign-in flow¶
- Keycloak initiates sign-in. It directs the browser to WK Bridge. API Gateway passes the SAML request to the Lambda function.
- The user authenticates with Węzeł Krajowy. The bridge directs the browser there. After authentication, Węzeł Krajowy sends a SAML artifact through the browser. The artifact is a reference to the actual response.
- The bridge retrieves the response. It calls
ArtifactResolvedirectly on Węzeł Krajowy over SOAP. This connection uses a managed NAT gateway and does not pass through the user's browser. - Keycloak receives the SAML response. The bridge returns it through the browser. Keycloak completes the portal sign-in.
Transaction state and signing material¶
DynamoDB holds temporary SAML transaction state so consecutive steps can use different Lambda environments. AWS Secrets Manager stores material for signing and verifying messages.