Skip to content

Commit

Permalink
keycloak.realm_display_name (#973)
Browse files Browse the repository at this point in the history
  • Loading branch information
danlester authored Dec 16, 2021
1 parent fa85147 commit 0c21c8c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/source/admin_guide/keycloak.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ To set a Helm override, for example:
security:
keycloak:
initial_root_password: password123
realm_display_name: "Our Company QHub"
overrides:
extraEnv: |
- name: KEYCLOAK_DEFAULT_THEME
Expand All @@ -27,3 +28,5 @@ security:
If you do set `overrides.extraEnv` as above, you must remember to include `PROXY_ADDRESS_FORWARDING=true`. Otherwise, the Keycloak deployment will not work as you will have overridden an important default Helm value that's required by QHub.

To find out more about using Keycloak in QHub, see [Installation - Login](../installation/login.md)

The `security.keycloak.realm_display_name` setting is the text to display on the Keycloak login page for your QHub (and in some other locations). This is optional, and if omitted will default to "QHub <project_name>" where `project_name` is a field in the `qhub-config.yaml` file.
1 change: 1 addition & 0 deletions qhub/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ class GitHubAuthentication(Authentication):
class Keycloak(Base):
initial_root_password: typing.Optional[str]
overrides: typing.Optional[typing.Dict]
realm_display_name: typing.Optional[str]


# ============== Security ================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ module "kubernetes-keycloak-config" {

name = var.name

realm_display_name = {{ cookiecutter.security.keycloak.realm_display_name | default("QHub ${var.name}", true) | jsonify }}

external-url = var.endpoint

forwardauth-callback-url-path = local.forwardauth-callback-url-path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ resource "keycloak_realm" "realm-qhub" {

realm = "qhub"

display_name = "QHub ${var.name}"
display_name = var.realm_display_name
}

resource "keycloak_group" "admingroup" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ variable "name" {
type = string
}

variable "realm_display_name" {
description = "Display name for QHub realm"
type = string
}

variable "github_client_id" {
description = "GitHub OAuth2 Client ID"
type = string
Expand Down

0 comments on commit 0c21c8c

Please sign in to comment.