Sign inSign up

gunet/taxis-proxy

By gunet

•Updated 11 months ago

A simple Node.JS Docker image to act as a proxy for the Taxis userinfo oAuth2 endpoint

Buildkit cache
Image
0

1.2K

gunet/taxis-proxy repository overview

⁠Keycloak userinfo XML → JSON proxy (minimal)

Purpose

  • Convert the Gov.GR Taxis OIDC provider's XML userinfo response into JSON so Keycloak (configured as broker/IdP) can consume it without custom Keycloak code.

Run: docker run -p 3000:3000 gunet/taxis-proxy Environment variables:

  • PORT=3000
  • REMOTE_USERINFO=https://oauth2.gsis.gr/oauth2server/userinfo?format=xml

Docker compose example:

  taxis-proxy:
    image: gunet/taxis-proxy:latest
    restart: unless-stopped
    init: true

Keycloak configuration

  1. In Keycloak admin console, go to Identity Providers and edit your OIDC provider.
  2. Replace the "User Info Endpoint" URL with: http://<your-proxy-host>:<port>/userinfo (for instance if in Docker compose stack as above: http://taxis-proxy:3000/userinfo) (Keycloak will call the proxy and the proxy forwards Authorization to the real endpoint.)
  3. Add Identity Provider Mappers to map returned claims to Keycloak user attributes/fields:
    • Map sub or preferred_username -> Username (or leave Keycloak to use sub).
    • Map family_name -> lastName
    • Map given_name -> firstName
    • Map tax_id -> Your relevant attribute
    • Map other claims (father_name, mother_name, birth_year) to user attributes (they will be available as user attributes). The exact mapper type name depends on your Keycloak version (e.g., "User Attribute" / "Claim to User" / "Attribute Importer").

Tag summary

Content type

Image

Digest

sha256:20137bed1…

Size

76 MB

Last updated

11 months ago

docker pull gunet/taxis-proxy