We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
apiVersion: security.kubearmor.com/v1 kind: KubeArmorPolicy metadata: name: autopol-system-1080768273 namespace: default spec: action: Allow file: matchDirectories: - dir: / fromSource: - path: /bin/bash recursive: true - dir: /etc/ fromSource: - path: /bin/cat recursive: true process: matchPaths: - path: /bin/bash - path: /bin/cat selector: matchLabels: app: default severity: 1
Applying the following yaml policy should allow us to:
We will be using apparmor domain transitions to enforce prolicies for each binary.
For white listed processes we are going to enforce the following rules:
apiVersion: security.kubearmor.com/v1 kind: KubeArmorPolicy metadata: name: autopol-system-xxxxxxx namespace: default spec: action: Allow process: matchPaths: - path: /bin/bash - path: /bin/cat selector: matchLabels: app: default severity: 1
The above policy should generate the following psedo-apparmor profile
## == Managed by KubeArmor == ## #include <tunables/global> profile kubearmor-default-deploy01-c1 flags=(attach_disconnected,mediate_deleted) { #include <abstractions/base> network, capability, /bin/bash px -> kubearmor-default-deploy01-c1-XXXXX-bash, /bin/cat px -> kubearmor-default-deploy01-c1-XXXXX-cat, } profile kubearmor-default-deploy01-c1-XXXXX-bash flags=(attach_disconnected,mediate_deleted) { } profile kubearmor-default-deploy01-c1-XXXXX-cat flags=(attach_disconnected,mediate_deleted) { }
apiVersion: security.kubearmor.com/v1 kind: KubeArmorPolicy metadata: name: autopol-system-xxxxxxx namespace: default spec: action: Allow process: matchPaths: - path: /bin/cat fromSource: - path: /bin/bash - path: /bin/bash selector: matchLabels: app: default severity: 1
## == Managed by KubeArmor == ## #include <tunables/global> profile kubearmor-default-deploy01-c1 flags=(attach_disconnected,mediate_deleted) { #include <abstractions/base> network, capability, /bin/bash px -> kubearmor-default-deploy01-c1-XXXXX-bash, } profile kubearmor-default-deploy01-c1-XXXXX-bash flags=(attach_disconnected,mediate_deleted) { /bin/cat px -> kubearmor-default-deploy01-c1-XXXXX-cat, } profile kubearmor-default-deploy01-c1-XXXXX-cat flags=(attach_disconnected,mediate_deleted) { }
bash should be explicitly defined in the whitelisted processes, else cat will never be able to run.
The text was updated successfully, but these errors were encountered:
Merge pull request #962 from achrefbensaad/update-apparmor
b1b7f7c
Fixes #954 Fixes undefined
achrefbensaad
Successfully merging a pull request may close this issue.
Description
Applying the following yaml policy should allow us to:
Acutual behavior
Proposed behavior for AppArmor allow based policies
We will be using apparmor domain transitions to enforce prolicies for each binary.
White listed processes
For white listed processes we are going to enforce the following rules:
The above policy should generate the following psedo-apparmor profile
The above policy should generate the following psedo-apparmor profile
The text was updated successfully, but these errors were encountered: