spring-projects / spring-projects/spring-security

ACL ownership insufficient to CHANGE_AUDITING

Open
#17,848 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage type: bug
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

If we create a new ACL, set ourselves as the owner, create the first ACE assigning some permission to some SID, and try to change the auditing flags on the ACE, the request fails in AclAuthorizationStrategyImpl#securityCheck:

https://github.com/spring-projects/spring-security/blob/f30cc9c5a94ce408f971f8822568dcf2d25c2ed6/acl/src/main/java/org/springframework/security/acls/domain/AclAuthorizationStrategyImpl.java#L100-L105

Apparently ownership is enough to give away ownership to another SID or to add, update, and delete ACEs, but it is not enough to update the auditing flags on existing ACEs.

To work around this we must make our first ACE one which gives the administration permission to the owner; securityCheck will then accept our attempts to update the auditing flags on subsequent ACEs.

Is this intentional? If so, why? If not, can securityCheck be changed so that ACL ownership is good enough for auditing changes too?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at acl/src/main/java/org/springframework/security/acls/domain/AclAuthorizationStrategyImpl.java, especially securityCheck around lines 100-105, and reproduce the owner-created ACL/ACE auditing update described in the issue. Compare the authorization checks for ownership, ACE administration, and auditing changes; done means the intended behavior is confirmed or corrected with a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
authorization, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.