kundk

February 27, 2024 ยท View on GitHub

This is a ready solution for employing Keycloak with FIDO2/WebAuthn and OIDC (or SAML). Demos are included.

Demos

relying party (RP)2FA1FA
Apache (mod_auth_openidc)demo #1demo #2
Apache (mod_shib)demo #3demo #4
VMware vSpheren/ademo #6

Configuration

Build-time variables

ARGexampledescription
KEYCLOAK_DBpostgresRDB for Keycloak
KEYCLOAK_RELEASEVER9release version of RHEL for Keycloak container
KEYCLOAK_VERSIONlatestKeycloak version

Environment variables

kund supports multiple tenants, e.g. both demos and production use cases. Their common configuration resides in environment variables.

ENVexample
APP_IDS1 2 3 4 6
KEYCLOAK_DB_URLjdbc:postgres://localhost/keycloak
KEYCLOAK_DB_USERNAMEkeycloak
KEYCLOAK_EMAILme@mydomain.com
KEYCLOAK_PORT1.8444
REALM_IDS1 2 3 4 6
SMTP_SERVERmail.mydomain.com
  1. optional; default is 8444

The following environment variables are only required to support the demos.

envexample
APACHE_EMAILme@mydomain.com
APACHE_LOG_LEVEL1.debug
KEYCLOAK_LOG_LEVEL1.debug
KEYCLOAK_OIDC_REMOTE_USER_CLAIMgiven_name ^(.+?)(?:\s.+)?$ \$1
LDAP_PORT3893
VSPHERE_DOMAIN2.mydomain.com
VSPHERE_SERVER2.https://vsphere.mydomain.com
  1. optional; default is info
  2. only required for demo #6

Secrets

secretkeys
keycloak-admin-passwordpassword1.
keycloak-db-passwordpassword
  1. password for user admin on Keycloak Administration Console

Factory keys

keydescription
client_idsee ClientRepresentation.id
display_namesee RealmRepresentation.displayName
flowsee AuthenticationFlowRepresentation.alias (kundk-1fa or kundk-2fa)
ldap_attribute_first_name
ldap_auth_typesee UserFederationProviderRepresentation.config.authType (for LDAP)
ldap_bind_credential
ldap_bind_dnsee UserFederationProviderRepresentation.config.ldapBind (for LDAP)
ldap_connection_urlsee UserFederationProviderRepresentation.config.connectionUrl (for LDAP)
ldap_rdn_ldap_attribute
ldap_username_ldap_attribute
ldap_users_dnsee UserFederationProviderRepresentation.config.userDn (for LDAP)
ldap_user_object_class
ldap_uuid_ldap_attributesee UserFederationProviderRepresentation.config.uuidLDAPAttribute
post_logout_redirect_urisee ClientRepresentation.attributes."post.logout.redirect.uris" (for OIDC)
protocolsee ClientRepresentation.protocol
realmsee RealmRepresentation.realm
redirect_uriClientRepresentation.redirectUris (for OIDC)
saml_assertion_consumer_url_redirect
saml_single_logout_service_url_redirect
vsphere_domainAD domain

Frequently asked questions