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

Policy can't be started without all settings #45

Open
1 task done
kravciak opened this issue Feb 10, 2023 · 0 comments
Open
1 task done

Policy can't be started without all settings #45

kravciak opened this issue Feb 10, 2023 · 0 comments
Labels
kind/bug Something isn't working

Comments

@kravciak
Copy link

kravciak commented Feb 10, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Policy requires all the settings to start.

When I fill settings only partially policy server won't start it with following errors:

# I don't fill any settings:
settings are not valid: Some("Invalid run_as_user settings: invalid rule.")

# I fill only run_as_user:
settings are not valid: Some("Invalid run_as_group settings: Invalid rule.")

# I fill run_as_user and run_as_group:
settings are not valid: Some("Invalid supplemental_groups settings: Invalid rule.")

To compare with original PSP - yaml copied from kubernetes.io docs: It defines only runAsUser settings.

apiVersion: v1
kind: Pod
metadata:
  name: security-context-demo-2
spec:
  securityContext:
    runAsUser: 1000
  containers:
  - name: sec-ctx-demo-2
    image: gcr.io/google-samples/node-hello:1.0
    securityContext:
      runAsUser: 2000
      allowPrivilegeEscalation: false

Expected Behavior

Policy should require only some setting to start (or none of them).

To Reproduce

Start policy with following settings:

  settings:
    run_as_group:
      rule: RunAsAny
@kravciak kravciak added the kind/bug Something isn't working label Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant