mirror of
https://github.com/2martens/terraform.git
synced 2026-10-17 15:26:50 +02:00
This commit is contained in:
+16
-6
@@ -17,7 +17,7 @@ resource "keycloak_realm" "twomartens_realm" {
|
|||||||
login_theme = "keycloak.v2"
|
login_theme = "keycloak.v2"
|
||||||
account_theme = "keycloak.v3"
|
account_theme = "keycloak.v3"
|
||||||
admin_theme = "keycloak.v2"
|
admin_theme = "keycloak.v2"
|
||||||
email_theme = "keycloak"
|
email_theme = "keycloak"
|
||||||
|
|
||||||
# Security settings
|
# Security settings
|
||||||
password_policy = "upperCase(1) and length(12) and forceExpiredPasswordChange(365) and notUsername"
|
password_policy = "upperCase(1) and length(12) and forceExpiredPasswordChange(365) and notUsername"
|
||||||
@@ -38,12 +38,12 @@ resource "keycloak_realm" "twomartens_realm" {
|
|||||||
refresh_token_max_reuse = 0
|
refresh_token_max_reuse = 0
|
||||||
|
|
||||||
web_authn_policy {
|
web_authn_policy {
|
||||||
signature_algorithms = ["ES256"]
|
signature_algorithms = ["ES256"]
|
||||||
avoid_same_authenticator_register = true
|
avoid_same_authenticator_register = true
|
||||||
}
|
}
|
||||||
|
|
||||||
web_authn_passwordless_policy {
|
web_authn_passwordless_policy {
|
||||||
signature_algorithms = ["ES256"]
|
signature_algorithms = ["ES256"]
|
||||||
avoid_same_authenticator_register = true
|
avoid_same_authenticator_register = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -52,15 +52,15 @@ resource "keycloak_oidc_identity_provider" "twomartens_github_identity_provider"
|
|||||||
realm = keycloak_realm.twomartens_realm.id
|
realm = keycloak_realm.twomartens_realm.id
|
||||||
alias = "github"
|
alias = "github"
|
||||||
display_name = "GitHub"
|
display_name = "GitHub"
|
||||||
provider_id = "github"
|
provider_id = "github"
|
||||||
|
|
||||||
# OAuth App Configuration
|
# OAuth App Configuration
|
||||||
client_id = var.github_identity_provider_client_id
|
client_id = var.github_identity_provider_client_id
|
||||||
client_secret = var.github_identity_provider_client_secret
|
client_secret = var.github_identity_provider_client_secret
|
||||||
|
|
||||||
# OAuth Endpoints
|
# OAuth Endpoints
|
||||||
authorization_url = "https://github.com/login/oauth/authorize"
|
authorization_url = "https://github.com/login/oauth/authorize"
|
||||||
token_url = "https://github.com/login/oauth/access_token"
|
token_url = "https://github.com/login/oauth/access_token"
|
||||||
|
|
||||||
# Detailed User Mapping
|
# Detailed User Mapping
|
||||||
extra_config = {
|
extra_config = {
|
||||||
@@ -167,6 +167,16 @@ resource "keycloak_openid_client" "twomartens_wahlrecht_frontend" {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "keycloak_openid_client" "twomartens_wahlrecht_backend" {
|
||||||
|
realm_id = keycloak_realm.twomartens_realm.id
|
||||||
|
name = "Wahlrecht Backend"
|
||||||
|
enabled = true
|
||||||
|
access_type = "CONFIDENTIAL"
|
||||||
|
client_id = "wahlrecht"
|
||||||
|
standard_flow_enabled = true
|
||||||
|
use_refresh_tokens = false
|
||||||
|
}
|
||||||
|
|
||||||
# from here ArgoCD
|
# from here ArgoCD
|
||||||
|
|
||||||
resource "keycloak_group" "argocd_admins" {
|
resource "keycloak_group" "argocd_admins" {
|
||||||
|
|||||||
Reference in New Issue
Block a user