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

fix(bpflsm): readonly and owneronly behaviour #1578

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

daemon1024
Copy link
Member

@daemon1024 daemon1024 commented Jan 11, 2024

Fixed 2 bugs
When owneronly and readonly flags are set, expected behaviour is that the owner should be allowed only read access but it seemed that owner had universal access here

When readonly is set for allow policy, we did not enforce readonly on it since the code was to check for deny flag in the policy, updated the check to check for absence of write flag instead

Enabled tests for the earlier failing scenarios due the bug

Purpose of PR?:

Fixes #1385

Checklist:

  • Bug fix. Fixes #
  • PR Title follows the convention of <type>(<scope>): <subject>
  • Commit has unit tests
  • Commit has integration tests

@daemon1024 daemon1024 marked this pull request as draft January 11, 2024 19:16
Aryan-sharma11 added a commit to Aryan-sharma11/KubeArmor that referenced this pull request Feb 29, 2024
Aryan-sharma11 added a commit to Aryan-sharma11/KubeArmor that referenced this pull request Mar 1, 2024
@Aryan-sharma11 Aryan-sharma11 marked this pull request as ready for review February 4, 2025 17:35
@Aryan-sharma11 Aryan-sharma11 marked this pull request as draft February 4, 2025 17:36
daemon1024 and others added 2 commits February 5, 2025 23:24
Fixed 2 bugs
When owneronly and readonly flags are set, expected behaviour is that the owner should be allowed only read access but it seemed that owner had universal access here

When readonly is set for allow policy, we did not enforce readonly on it since the code was to check for deny flag in the policy, updated the check to check for absence of write flag instead

Enabled tests for the earlier failing scenarios due the bug

Signed-off-by: daemon1024 <[email protected]>
Signed-off-by: Aryan-sharma11 <[email protected]>
@Aryan-sharma11 Aryan-sharma11 force-pushed the bpflsm-fix-readonly-owneronly branch 2 times, most recently from aec81bc to 0a6bed0 Compare February 6, 2025 10:07
@Aryan-sharma11 Aryan-sharma11 force-pushed the bpflsm-fix-readonly-owneronly branch from 0a6bed0 to 9ecd20a Compare February 6, 2025 11:02
Signed-off-by: Aryan-sharma11 <[email protected]>
Signed-off-by: Aryan-sharma11 <[email protected]>
@Aryan-sharma11 Aryan-sharma11 marked this pull request as ready for review February 7, 2025 08:20
@Aryan-sharma11 Aryan-sharma11 force-pushed the bpflsm-fix-readonly-owneronly branch 2 times, most recently from 068acca to bb6fd61 Compare February 7, 2025 10:34
Signed-off-by: Aryan-sharma11 <[email protected]>
@Aryan-sharma11 Aryan-sharma11 force-pushed the bpflsm-fix-readonly-owneronly branch from bb6fd61 to 6ce9da3 Compare February 7, 2025 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Triage
Development

Successfully merging this pull request may close these issues.

bpflsm inconsistent behaviour with readonly and owneronly rules
2 participants