adorsys / keycloak-config-cli

Import YAML/JSON-formatted configuration files into Keycloak - Configuration as Code for Keycloak.
Apache License 2.0
759 stars 136 forks source link

Support for x509 authentication #959

Open moritzschmitz-oviva opened 10 months ago

moritzschmitz-oviva commented 10 months ago

Problem Statement

The /admin path in our Keycloak instance is exposed to the public. Some of our admin users require access to the admin console. keycloak-config-cli is accessing Keycloak through an internal path though.

To add a layer of security, all our admin accounts use 2FA, but this constraint blocks us from using keycloak-config-cli.

Since Keycloak supports x509 client authentication I would like to see keycloak-config-cli to support it. It would allow keycloak-config-cli to use a secure communications channel and would be a safe workaround for the 2FA requirement (in our use case).

Proposed Solution

Implement four new flags (following the flags from: https://www.keycloak.org/server/enabletls):

--key-store-file
--key-store-file-password
--trust-store-file
--trust-store-password

If they are set, use certificates to communicate with the Keycloak instance.

Looking at the implementation on Keycloak side it looks easy with Quarkus. Not so sure about the JBoss library used here.

Environment

Additional information

No response

Acceptance Criteria

NiC0x36 commented 3 months ago

We have the same issue. A solution would be much appreciated, as our admin accounts use 2FA also.