You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: Add support for mtls client cert auth (#1095)
- Add dummy keymaterial for mtls-tests
- Add default mtls-certs valid for 825 days, see 1)
- Add makefile rules for generating / clean mtls-certs
Based on initial PR #1037
1) https://knowledge.digicert.com/quovadis/ssl-certificates/ssl-general-topics/maximum-validity-changes-for-tls-ssl-to-drop-to-825-days-in-q1-2018Fixes#1095
Co-authored-by: lucdew <[email protected]>
Signed-off-by: Thomas Darimont <[email protected]>
* Update .gitignore
- custom-user-federation-example/bin
- Ignore test_env_*.json files
1) https://knowledge.digicert.com/quovadis/ssl-certificates/ssl-general-topics/maximum-validity-changes-for-tls-ssl-to-drop-to-825-days-in-q1-2018
Signed-off-by: Thomas Darimont <[email protected]>
* Add support for testing mtls configs
- Inspect KEYCLOAK_TLS_CA_CERT, KEYCLOAK_TLS_CLIENT_CERT and KEYCLOAK_TLS_CLIENT_KEY
- Extract TEST_ENV_FILE processing
- Make UpdateEnvFromTestEnvIfPresent available for provider_test and keycloak_client_test
- Add certificates to Keycloak docker compose config
- Update readme
Signed-off-by: Thomas Darimont <[email protected]>
* Add keycloak https mtls client auth connect test
Signed-off-by: Thomas Darimont <[email protected]>
* Allow testing of https mtls client auth in github CI tests
Signed-off-by: Thomas Darimont <[email protected]>
* Don't use mtls certs for http tests
Signed-off-by: Thomas Darimont <[email protected]>
* Enable https/mtls support for github CI tests
Signed-off-by: Thomas Darimont <[email protected]>
* Skip https/mtls client auth tests for Keycloak <= 26.0
Signed-off-by: Thomas Darimont <[email protected]>
* Use KEYCLOAK_URL_HTTP to derive http:// URL of Keycloak
We need this to be always able to obtain the Keycloak version from the server to decide if we can perform the test or not.
Signed-off-by: Thomas Darimont <[email protected]>
* Split up github actions in http and https(mtls) tests
Signed-off-by: Thomas Darimont <[email protected]>
* Expose https port for Keycloak in github CI env
Signed-off-by: Thomas Darimont <[email protected]>
* Pass KEYCLOAK_TLS_CA_CERT from env if present in provider_test
Signed-off-by: Thomas Darimont <[email protected]>
* Only apply EXTRA_HTTP_CLIENT_AUTH if we test mtls client auth
Signed-off-by: Thomas Darimont <[email protected]>
* Use http.Client provided by keycloakClient in tests to benefit from the TLS/mTLS configuration.
Signed-off-by: Thomas Darimont <[email protected]>
* Add support for dedicated local mTLS test environment
- Add local-mtls makefile rule
- Move mTLS client authentication config into docker-compose-mtls.yml
- Skip HttpsMtlsAuth test if client certificate config is not set
- Add https/mtls testing sections to readme
Signed-off-by: Thomas Darimont <[email protected]>
* Update .gitignore
- Simplify pattern for excluding local test_env overrides
- Exclude custom provider_installation mappings
- Exclude kcadm config folder
- Exclude kcdata
Signed-off-by: Thomas Darimont <[email protected]>
* Add update keycloak version filter in test.yml
Signed-off-by: Thomas Darimont <[email protected]>
* Moved provider/misc folder into testdata
Signed-off-by: Thomas Darimont <[email protected]>
* Add dedicated shell script to generate mtls-certs
Signed-off-by: Thomas Darimont <[email protected]>
* Revert "Moved provider/misc folder into testdata"
This reverts commit 5a51df7.
Signed-off-by: Thomas Darimont <[email protected]>
* Use testdata folder to avoid adding test artifacts to binaries
- Unify testdata folder
- Rename provider/misc to provider/testdata
- Move testdata/tls folder to provider/testdata/tls
Fixes#1319
Signed-off-by: Thomas Darimont <[email protected]>
---------
Signed-off-by: Thomas Darimont <[email protected]>
Co-authored-by: lucdew <[email protected]>
You can also run the same tests on Keycloak's https port with the Keycloak Terraform provider authenticating to the server with a mTLS client certificate.
150
+
For this start the env with `make local-mtls`. After that run the following command:
# Make the custom-user-federation-example extension available to Keycloak. The :z option is required and tells Docker that the volume content will be shared between containers.
Copy file name to clipboardExpand all lines: docs/index.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,5 +111,7 @@ The following arguments are supported:
111
111
-`client_timeout` - (Optional) Sets the timeout of the client when addressing Keycloak, in seconds. Defaults to the environment variable `KEYCLOAK_CLIENT_TIMEOUT`, or `15` if the environment variable is not specified.
112
112
-`tls_insecure_skip_verify` - (Optional) Allows ignoring insecure certificates when set to `true`. Defaults to `false`. Disabling this security check is dangerous and should only be done in local or test environments.
113
113
-`root_ca_certificate` - (Optional) Allows x509 calls using an unknown CA certificate (for development purposes)
114
+
-`tls_client_certificate` - (Optional) The TLS client certificate in PEM format when the keycloak server is configured with TLS mutual authentication.
115
+
-`tls_client_private_key` - (Optional) The TLS client pkcs1 private key in PEM format when the keycloak server is configured with TLS mutual authentication.
114
116
-`base_path` - (Optional) The base path used for accessing the Keycloak REST API. Defaults to the environment variable `KEYCLOAK_BASE_PATH`, or an empty string if the environment variable is not specified. Note that users of the legacy distribution of Keycloak will need to set this attribute to `/auth`.
115
117
-`additional_headers` - (Optional) A map of custom HTTP headers to add to each request to the Keycloak API.
0 commit comments