Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforcing scope with SRBAC breaks heat #395

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions api/bases/keystone.openstack.org_keystoneapis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ spec:
files. Those get added to the service config dir in /etc/<service>
. TODO: -> implement'
type: object
enableSecureRBAC:
default: true
description: EnableSecureRBAC - Enable Consistent and Secure RBAC
policies
type: boolean
memcachedInstance:
default: memcached
description: Memcached instance name.
Expand Down Expand Up @@ -365,6 +360,12 @@ spec:
description: Secret containing OpenStack password information for
keystone AdminPassword
type: string
secureRBACEnforceNewDefaults:
default: true
type: boolean
secureRBACEnforceScope:
default: false
type: boolean
tls:
description: TLS - Parameters related to the TLS
properties:
Expand Down
7 changes: 5 additions & 2 deletions api/v1beta1/keystoneapi_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,13 @@ type KeystoneAPISpecCore struct {
// Secret containing OpenStack password information for keystone AdminPassword
Secret string `json:"secret"`

// +kubebuilder:validation:Optional
// +kubebuilder:default=false
SecureRBACEnforceScope bool `json:"secureRBACEnforceScope"`

// +kubebuilder:validation:Optional
// +kubebuilder:default=true
// EnableSecureRBAC - Enable Consistent and Secure RBAC policies
EnableSecureRBAC bool `json:"enableSecureRBAC"`
SecureRBACEnforceNewDefaults bool `json:"secureRBACEnforceNewDefaults"`

// +kubebuilder:validation:Optional
// +kubebuilder:default=""
Expand Down
11 changes: 6 additions & 5 deletions config/crd/bases/keystone.openstack.org_keystoneapis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ spec:
files. Those get added to the service config dir in /etc/<service>
. TODO: -> implement'
type: object
enableSecureRBAC:
default: true
description: EnableSecureRBAC - Enable Consistent and Secure RBAC
policies
type: boolean
memcachedInstance:
default: memcached
description: Memcached instance name.
Expand Down Expand Up @@ -365,6 +360,12 @@ spec:
description: Secret containing OpenStack password information for
keystone AdminPassword
type: string
secureRBACEnforceNewDefaults:
default: true
type: boolean
secureRBACEnforceScope:
default: false
type: boolean
tls:
description: TLS - Parameters related to the TLS
properties:
Expand Down
3 changes: 2 additions & 1 deletion controllers/keystoneapi_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,8 @@ func (r *KeystoneAPIReconciler) generateServiceConfigMaps(
instance.Status.DatabaseHostname,
keystone.DatabaseName,
),
"enableSecureRBAC": instance.Spec.EnableSecureRBAC,
"EnforceScope": instance.Spec.SecureRBACEnforceScope,
"EnforceNewDefaults": instance.Spec.SecureRBACEnforceNewDefaults,
}

// create httpd vhost template parameters
Expand Down
4 changes: 2 additions & 2 deletions templates/keystoneapi/config/keystone.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ db_max_retries=-1
connection={{ .DatabaseConnection }}

[oslo_policy]
enforce_new_defaults = {{ .enableSecureRBAC }}
enforce_scope = {{ .enableSecureRBAC }}
enforce_new_defaults = {{ .EnforceNewDefaults }}
enforce_scope = {{ .EnforceScope }}

[fernet_tokens]
key_repository=/etc/keystone/fernet-keys
Expand Down
Loading