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
@Aryan-sharma11 Aryan-sharma11 force-pushed the bpflsm-fix-readonly-owneronly branch 3 times, most recently from 0a6bed0 to 9ecd20a Compare February 6, 2025 11:02
@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 9 times, most recently from 522a0a2 to 526bced Compare February 12, 2025 06:38
Aryan-sharma11
Aryan-sharma11 previously approved these changes Feb 13, 2025
Copy link
Member Author

@daemon1024 daemon1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

image

@rksharma95
Copy link
Collaborator

tested locally, working as expected 👍
image

daemon1024 and others added 2 commits February 14, 2025 17:05
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]>
Signed-off-by: Aryan-sharma11 <[email protected]>
Signed-off-by: Aryan-sharma11 <[email protected]>
Signed-off-by: Aryan-sharma11 <[email protected]>
@rksharma95 rksharma95 force-pushed the bpflsm-fix-readonly-owneronly branch from b749390 to 92b038e Compare February 14, 2025 11:35
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
3 participants