Skip to content

Commit

Permalink
Merge pull request #100 from appuio/fix/whitelist-parameters
Browse files Browse the repository at this point in the history
Fix black-/whitelist parameter import
  • Loading branch information
DebakelOrakel authored Sep 25, 2024
2 parents 4be9a9c + 1b6c829 commit 92a560c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
8 changes: 4 additions & 4 deletions component/ldap.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ local syncConfig(namespace, idp, sa) =
com.namespaced(namespace, kube.Secret(name) {
stringData: {
[files.config]: std.manifestYamlDoc(syncCfg),
[files.blacklist_sync]: if std.objectHas(idp.ldap.sync, 'blacklist-sync') then idp.ldap.sync.blacklist_sync else '',
[files.blacklist_prune]: if std.objectHas(idp.ldap.sync, 'blacklist-prune') then idp.ldap.sync.blacklist_prune else '',
[files.whitelist_sync]: if std.objectHas(idp.ldap.sync, 'whitelist-sync') then idp.ldap.sync.whitelist_sync else '',
[files.whitelist_prune]: if std.objectHas(idp.ldap.sync, 'whitelist-prune') then idp.ldap.sync.whitelist_prune else '',
[files.blacklist_sync]: if std.objectHas(idp.ldap.sync, 'blacklist_sync') then idp.ldap.sync.blacklist_sync else '',
[files.blacklist_prune]: if std.objectHas(idp.ldap.sync, 'blacklist_prune') then idp.ldap.sync.blacklist_prune else '',
[files.whitelist_sync]: if std.objectHas(idp.ldap.sync, 'whitelist_sync') then idp.ldap.sync.whitelist_sync else '',
[files.whitelist_prune]: if std.objectHas(idp.ldap.sync, 'whitelist_prune') then idp.ldap.sync.whitelist_prune else '',
},
}),

Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/references/parameters.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ identityProviders:
custom-ldap:
ldap:
sync:
whitelist-sync: |-
whitelist_sync: |-
CN=cluster-access,OU=Groups,DC=myldap,DC=local
whitelist-prune: |-
whitelist_prune: |-
cluster-access
----
====
Expand Down
4 changes: 4 additions & 0 deletions tests/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ parameters:
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
sync:
whitelist_sync: |-
cn=cluster-access,ou=idp,dc=company,dc=tld
whitelist_prune: |-
cluster-access
rfc2307:
groupsQuery:
baseDN: ou=Groups,dc=company,dc=tld
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ stringData:
"pageSize": 0
"scope": "sub"
"url": "ldaps://ldap.company.tld:636/ou=services,dc=company,dc=tld?uid"
whitelist-prune.txt: ''
whitelist-sync.txt: ''
whitelist-prune.txt: cluster-access
whitelist-sync.txt: cn=cluster-access,ou=idp,dc=company,dc=tld
type: Opaque
---
apiVersion: batch/v1
Expand Down

0 comments on commit 92a560c

Please sign in to comment.