-
Notifications
You must be signed in to change notification settings - Fork 116
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
Add a flag in ApparmorProfile CRD to switch to switch the profile into complain mode #2598
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
saschagrunert
approved these changes
Dec 4, 2024
@ccojocar you'd have to rebase to fix the macos CI. |
This falg will place the apparmor profile into compalin mode, otherwise it defaults to enforce mode. In complain mode, if a given action is not allowed, it will be allowed, but this violation will be logged with a tag of access being "ALLOWED unconfined". Change-Id: I597883a528edf60f05f1cb7914429b3c5b05b2cd Signed-off-by: Cosmin Cojocar <[email protected]>
Change-Id: Id5272f5ba5b6858e3d620718964e4798f75bec6d Signed-off-by: Cosmin Cojocar <[email protected]>
… the generate profile Change-Id: If59b953c69e48e68b2bb56198567342ca9483170 Signed-off-by: Cosmin Cojocar <[email protected]>
Change-Id: I8a676faa5ccfbfe409905c5d10ade66a591e542d Signed-off-by: Cosmin Cojocar <[email protected]>
Change-Id: Idd9ac0c6d409293f905df44df974646f0c48b3fb Signed-off-by: Cosmin Cojocar <[email protected]>
Change-Id: I61832a638e8c17cc14175841c8e0d2e3e97bb2ab Signed-off-by: Cosmin Cojocar <[email protected]>
9fe95df
to
285f6e2
Compare
saschagrunert
approved these changes
Dec 4, 2024
Change-Id: I2c79838716ddac5a2a0a8f79902599ae590f55b3 Signed-off-by: Cosmin Cojocar <[email protected]>
saschagrunert
approved these changes
Dec 4, 2024
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ccojocar, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
approved
Indicates a PR has been approved by an approver from all required OWNERS files.
cncf-cla: yes
Indicates the PR's author has signed the CNCF CLA.
kind/feature
Categorizes issue or PR as related to a new feature.
lgtm
"Looks good to me", indicates that a PR is ready to be merged.
release-note
Denotes a PR that will be considered when it comes time to generate release notes.
size/L
Denotes a PR that changes 100-499 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds a flag into
ApparmorProfile CRD
which allows to switch the profile mode fromenfoce
mode tocomplain
mode.It the current implementation the
Profile Mode
flag is not specified in the apparmor profile file, whichplaces the profile by default into enforce mode. In this mode if a profile action is not allowed in the rules,
it will automatically terminate the container execution with an error. This is the expected behavior when running
productively but sometimes during the development is useful to put the profile in
complain
mode. In this mode,if the profile rules don't grant permissions to an action, that action will be allowed, but the violation will
be logged with a tag of
ALLOWED unconfined
.Which issue(s) this PR fixes:
Fixes #2559
Does this PR have test?
Yes
Special notes for your reviewer:
Does this PR introduce a user-facing change?
cc @mhils