Keystone: Member role fixes
This PS makes the initial Keystone Admin and Service account users members of the projects that they are in. Change-Id: I2de081a216b7e7b99d301ab605c84d882cdb5840
This commit is contained in:
parent
b3f353ca7a
commit
198ce69e71
@ -51,6 +51,10 @@
|
|||||||
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | trimSuffix .Values.endpoints.identity.path | set .Values.conf.heat.clients_keystone.heat.common.config "auth_uri" | quote | trunc 0 -}}
|
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | trimSuffix .Values.endpoints.identity.path | set .Values.conf.heat.clients_keystone.heat.common.config "auth_uri" | quote | trunc 0 -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.heat.trustee.heat.common.context.auth_url -}}
|
||||||
|
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | trimSuffix .Values.endpoints.identity.path | set .Values.conf.heat.trustee.heat.common.context "auth_url" | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -105,7 +105,7 @@ conf:
|
|||||||
stack_domain_admin: heat-domain
|
stack_domain_admin: heat-domain
|
||||||
stack_domain_admin_password: password
|
stack_domain_admin_password: password
|
||||||
num_engine_workers: 4
|
num_engine_workers: 4
|
||||||
trusts_delegated_roles: Member
|
trusts_delegated_roles: _member_
|
||||||
keystone_authtoken:
|
keystone_authtoken:
|
||||||
keystonemiddleware:
|
keystonemiddleware:
|
||||||
auth_token:
|
auth_token:
|
||||||
@ -121,11 +121,15 @@ conf:
|
|||||||
heat:
|
heat:
|
||||||
common:
|
common:
|
||||||
context:
|
context:
|
||||||
|
auth_section: trustee
|
||||||
|
auth_type: password
|
||||||
password: password
|
password: password
|
||||||
user_domain_name: default
|
user_domain_name: default
|
||||||
username: heat-trust
|
username: heat-trust
|
||||||
project_domain_name: default
|
project_domain_name: default
|
||||||
project_name: service
|
project_name: service
|
||||||
|
region_name: RegionOne
|
||||||
|
auth_version: v3
|
||||||
heat_api:
|
heat_api:
|
||||||
heat:
|
heat:
|
||||||
common:
|
common:
|
||||||
|
@ -54,21 +54,30 @@ USER_ID=$(openstack user create --or-show --enable -f value -c id \
|
|||||||
# Display user
|
# Display user
|
||||||
openstack user show "${USER_ID}"
|
openstack user show "${USER_ID}"
|
||||||
|
|
||||||
# Manage user role
|
function ks_assign_user_role () {
|
||||||
USER_ROLE_ID=$(openstack role create --or-show -f value -c id \
|
# Manage user role assignment
|
||||||
|
openstack role add \
|
||||||
|
--user="${USER_ID}" \
|
||||||
|
--user-domain="${SERVICE_OS_USER_DOMAIN_NAME}" \
|
||||||
|
--project-domain="${SERVICE_OS_PROJECT_DOMAIN_NAME}" \
|
||||||
|
--project="${USER_PROJECT_ID}" \
|
||||||
|
"${USER_ROLE_ID}"
|
||||||
|
|
||||||
|
# Display user role assignment
|
||||||
|
openstack role assignment list \
|
||||||
|
--role="${USER_ROLE_ID}" \
|
||||||
|
--user-domain="${SERVICE_OS_USER_DOMAIN_NAME}" \
|
||||||
|
--user="${USER_ID}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Manage user service role
|
||||||
|
export USER_ROLE_ID=$(openstack role create --or-show -f value -c id \
|
||||||
"${SERVICE_OS_ROLE}");
|
"${SERVICE_OS_ROLE}");
|
||||||
|
ks_assign_user_role
|
||||||
|
|
||||||
# Manage user role assignment
|
# Manage user member role
|
||||||
openstack role add \
|
: ${MEMBER_OS_ROLE:="_member_"}
|
||||||
--user="${USER_ID}" \
|
export USER_ROLE_ID=$(openstack role create --or-show -f value -c id \
|
||||||
--user-domain="${SERVICE_OS_USER_DOMAIN_NAME}" \
|
"${MEMBER_OS_ROLE}");
|
||||||
--project-domain="${SERVICE_OS_PROJECT_DOMAIN_NAME}" \
|
ks_assign_user_role
|
||||||
--project="${USER_PROJECT_ID}" \
|
|
||||||
"${USER_ROLE_ID}"
|
|
||||||
|
|
||||||
# Display user role assignment
|
|
||||||
openstack role assignment list \
|
|
||||||
--role="${SERVICE_OS_ROLE}" \
|
|
||||||
--user-domain="${SERVICE_OS_USER_DOMAIN_NAME}" \
|
|
||||||
--user="${USER_ID}"
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -58,8 +58,14 @@ keystone:
|
|||||||
admin_project_domain: default
|
admin_project_domain: default
|
||||||
|
|
||||||
bootstrap:
|
bootstrap:
|
||||||
enabled: false
|
enabled: true
|
||||||
script: null
|
script: |
|
||||||
|
openstack role add \
|
||||||
|
--user="${OS_USERNAME}" \
|
||||||
|
--user-domain="${OS_USER_DOMAIN_NAME}" \
|
||||||
|
--project-domain="${OS_PROJECT_DOMAIN_NAME}" \
|
||||||
|
--project="${OS_PROJECT_NAME}" \
|
||||||
|
"_member_"
|
||||||
|
|
||||||
network:
|
network:
|
||||||
api:
|
api:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user