Skip to content

Commit

Permalink
Merge pull request #195 from InfoSec812/Issue-193_-_add-option-for-ho…
Browse files Browse the repository at this point in the history
…stname-strict-https

Added hostname-strict-https option
  • Loading branch information
guidograzioli authored Apr 19, 2024
2 parents b978e8b + 16accd5 commit 82498ab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions roles/keycloak_quarkus/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,12 @@ argument_specs:
description: >
If the route should be attached to cookies to reflect the node that owns a particular session. If false, route is not attached to cookies
and we rely on the session affinity capabilities from reverse proxy
keycloak_quarkus_hostname_strict_https:
type: "bool"
required: false
description: >
By default, Keycloak requires running using TLS/HTTPS. If the service MUST run without TLS/HTTPS, then set
this option to "true"
keycloak_quarkus_ks_vault_enabled:
default: false
type: "bool"
Expand Down
7 changes: 7 additions & 0 deletions roles/keycloak_quarkus/templates/keycloak.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ db-password={{ keycloak_quarkus_db_pass }}
{% endif %}
{% endif %}

{% if keycloak_quarkus_hostname_strict_https is defined and keycloak_quarkus_hostname_strict_https is sameas true -%}
hostname-strict-https=true
{% endif -%}
{% if keycloak_quarkus_hostname_strict_https is defined and keycloak_quarkus_hostname_strict_https is sameas false -%}
hostname-strict-https=false
{% endif -%}

{% if keycloak.config_key_store_enabled %}
# Config store
config-keystore={{ keycloak_quarkus_config_key_store_file }}
Expand Down

0 comments on commit 82498ab

Please sign in to comment.