Skip to content

Commit

Permalink
Adapted example to work with bitnami/openldap
Browse files Browse the repository at this point in the history
  • Loading branch information
sschu committed Nov 19, 2024
1 parent 9caea6e commit 99eb6d9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 2 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ services:
- POSTGRES_USER=keycloak
- POSTGRES_PASSWORD=password
image: postgres:16
ports:
- 5432:5432
volumes:
- postgres:/var/lib/postgresql
openldap:
image: bitnami/openldap:2.6
ports:
- 8389:389
environment:
LDAP_PORT_NUMBER: 389
keycloak:
image: quay.io/keycloak/keycloak:21.0.1
command: --verbose start-dev --features=preview
Expand Down
4 changes: 4 additions & 0 deletions example/client_authorization_policys.tf
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,8 @@ resource "keycloak_openid_client_permissions" "my_permission" {
description = "my description"
decision_strategy = "UNANIMOUS"
}
//needed because otherwise there is a conflict/race condition with the other permission
depends_on = [
keycloak_users_permissions.my_permission
]
}
6 changes: 3 additions & 3 deletions example/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ resource "keycloak_realm" "test" {

resource "keycloak_required_action" "custom-terms-and-conditions" {
realm_id = keycloak_realm.test.realm
alias = "terms_and_conditions"
alias = "TERMS_AND_CONDITIONS"
default_action = true
enabled = true
name = "Custom Terms and Conditions"
Expand Down Expand Up @@ -290,7 +290,7 @@ resource "keycloak_ldap_user_federation" "openldap" {
connection_url = "ldap://openldap"
users_dn = "dc=example,dc=org"
bind_dn = "cn=admin,dc=example,dc=org"
bind_credential = "admin"
bind_credential = "adminpassword"

connection_timeout = "5s"
read_timeout = "10s"
Expand Down Expand Up @@ -327,7 +327,7 @@ resource "keycloak_ldap_user_federation" "openldap_no_default_mappers" {
connection_url = "ldap://openldap"
users_dn = "dc=example,dc=org"
bind_dn = "cn=admin,dc=example,dc=org"
bind_credential = "admin"
bind_credential = "adminpassword"

connection_timeout = "5s"
read_timeout = "10s"
Expand Down

0 comments on commit 99eb6d9

Please # to comment.