Skip to content

Add validation of configued policy rules

Current state (as soon as !235 (merged) and !237 (merged) are merged (see #116 (closed)))

The user can configure the policy rules used by some of the openstack services, e.g., in nova like so:

apiVersion: yaook.cloud/v1
kind: NovaDeployment
metadata:
  name: nova
spec:
  ...
  policy:
    "context_is_admin": "role:admin"
    "invalid rule": "should be forbidden"
    ...
...

Desired state

The provided policy rules should be validated.

Suggested approach

(see this discussion)

  1. Take the known default policy file (generated or just hard coded (since it does not change for a certain release)).
  2. validate that all rules (i.e., rule names) the user gave in the cr are present in the default policy file.
  3. validate the (rule) values somehow
Edited by Karin Fetzer
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information