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

stackrox: can't create drop all policy #8559

Open
innokgoldberg opened this issue Nov 9, 2023 · 2 comments
Open

stackrox: can't create drop all policy #8559

innokgoldberg opened this issue Nov 9, 2023 · 2 comments

Comments

@innokgoldberg
Copy link

innokgoldberg commented Nov 9, 2023

Hello.

Due to documentation https://access.redhat.com/documentation/ru-ru/red_hat_advanced_cluster_security_for_kubernetes/4.2/html/operating/default-security-policies rhacs has default Drop All Capabilities policy, but it lacks in stackrox v4.2.

We attempted to create it manually with Drop capabilities set to ALL in the policy section. Unfortunately, we receive such error at Review Policy step:

policy invalid error: error validating lifecycle stage error: policy configuration is invalid for deploy time: policy validation error: validation of section "Policy Section 1" error: policy criteria "Drop Capabilities" has invalid value[0]="ALL" must match regex "((?m)^(?i:(AUDIT_CONTROL|AUDIT_READ|AUDIT_WRITE|BLOCK_SUSPEND|CHOWN|DAC_OVERRIDE|DAC_READ_SEARCH|FOWNER|FSETID|IPC_LOCK|IPC_OWNER|KILL|LEASE|LINUX_IMMUTABLE|MAC_ADMIN|MAC_OVERRIDE|MKNOD|NET_ADMIN|NET_BIND_SERVICE|NET_BROADCAST|NET_RAW|SETGID|SETFCAP|SETPCAP|SETUID|SYS_ADMIN|SYS_BOOT|SYS_CHROOT|SYS_MODULE|SYS_NICE|SYS_PACCT|SYS_PTRACE|SYS_RAWIO|SYS_RESOURCE|SYS_TIME|SYS_TTY_CONFIG|SYSLOG|WAKE_ALARM))$)": invalid arguments
Screenshot at Nov 09 11-44-28

This is pretty strange as due to source of https://github.com/stackrox/stackrox/blob/dd575bc009f1289f31c374f99673ef1e0372de3a/pkg/booleanpolicy/value_regex.go#L23C9-L23C9 it uses addCapabilitiesValueRegex with Drop capability policy criteria instead of dropCapabilitiesValueRegex

@innokgoldberg innokgoldberg changed the title stackrox drop all policy doesn't work stackrox: can't create drop all policy Nov 9, 2023
@connorgorman
Copy link
Collaborator

Based on this ticket: #8562 it seems like you may be on a dev build, could you try with the 4.3 release that was just published?

@porridge
Copy link
Contributor

Any updates from you side @innokgoldberg ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants