Support using ldap identity backend

This commit is contained in:
Yaguang Tang 2014-08-12 13:39:51 +08:00
parent 2c1b0e61a9
commit 3c89c8a6e4
3 changed files with 22 additions and 0 deletions

View File

@ -117,6 +117,10 @@ options:
type: string
default: None
description: "comma sperated options for ldap configuration"
ldap-readonly:
type: boolean
default: True
description: "Ldap identity server backend readonly to keystone"
# HA configuration settings
vip:
type: string

View File

@ -108,6 +108,7 @@ class KeystoneContext(context.OSContextGenerator):
ctxt['ldap_user'] = config('ldap-user')
ctxt['ldap_password'] = config('ldap-password')
ctxt['ldap_suffix'] = config('ldap-suffix')
ctxt['ldap_readonly'] = config('ldap-readonly')
ldap_flags = config('ldap-config-flags')
if ldap_flags:
flags = context.config_flags_parser(ldap_flags)

View File

@ -80,4 +80,21 @@ suffix = {{ ldap_suffix }}
{% endfor -%}
{% endif -%}
{% if ldap_readonly -%}
user_allow_create = False
user_allow_update = False
user_allow_delete = False
tenant_allow_create = False
tenant_allow_update = False
tenant_allow_delete = False
role_allow_create = False
role_allow_update = False
role_allow_delete = False
group_allow_create = False
group_allow_update = False
group_allow_delete = False
{% endif -%}
{% endif -%}