add ldap management
This commit is contained in:
parent
c0729bba2b
commit
47d24d45e9
19
vault/ldap.tf
Normal file
19
vault/ldap.tf
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
resource "vault_ldap_auth_backend" "ldap" {
|
||||||
|
path = "ldap"
|
||||||
|
url = "ldap://ldap.ducamps.win"
|
||||||
|
userdn = "dc=ducamps,dc=win"
|
||||||
|
userattr = "uid"
|
||||||
|
discoverdn = false
|
||||||
|
groupdn = "cn=groups,dc=ducamps,dc=win"
|
||||||
|
groupfilter = "(|(memberUid={{.Username}})(member={{.UserDN}})(uniqueMember={{.UserDN}}))"
|
||||||
|
binddn = "uid=vaultserviceaccount,cn=users,dc=ducamps,dc=win"
|
||||||
|
groupattr = "cn"
|
||||||
|
bindpass = var.ldap_bindpass
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
resource "vault_ldap_auth_backend_group" "vault_admin" {
|
||||||
|
groupname = "vault_admin"
|
||||||
|
policies = ["admin_policy"]
|
||||||
|
backend = vault_ldap_auth_backend.ldap.path
|
||||||
|
}
|
@ -1,3 +1,7 @@
|
|||||||
variable vault_token {
|
variable vault_token {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
variable ldap_bindpass {
|
||||||
|
type= string
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user