spring-projects / spring-projects/spring-security

ACL change Permission#getMask() type from "int" to "long"

Open
#9,224 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: declined type: enhancement
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

Expected Behavior

Permission#getMask() returns long.

Current Behavior

Permission#getMask() returns int.

Context
In our project we have very complex security restrictions. We have a lot of tiny permissions (1 bit for each) which we compose to a single mask permission. We reached a limit of int size (32 bits).
I think java.util.BitSet mask will be perfect in our case, but it will be breaking change.
But if we change a mask type to a long it will be a completely backward compatible change. And I think that 64 bits will be enough for us.

Will you accept PR from me with this change?

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 by locating the ACL API entry point Permission#getMask() and tracing its callers to identify the affected surface. Review the surrounding ACL implementation and compatibility expectations; done means the mask supports the requested wider range and the affected checks remain consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.