From time to time people need to implement a custom Sid. Searches on the internet show that (see links below).
In most cases these people needed to support Groups of Sids. My case was similar. I agree that in most situations people don't need this, but additional flexibility for complicated situations would be great.
The pull request is waiting there for a year, but no one even commented there.
The change is very simple:
- Adding a method Sid#getSidId() instead of casting Sids all the time to PrincipalSid or GrantedAuthority
- Adding a SidFactory which can be replaced by anyone who's using the framework
This pull request doesn't actually change anything, the logic stays the same, but flexibility is added.
Here are examples of people asking for this flexibility: