spring-projects / spring-projects/spring-security

ACL module supports UUIDs as ObjectIdentity, documentation update needed

Open
#7,978 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: acl
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

Summary

Since issue #6141 has been merged, the ACL module supports non-Long ObjectIdentity. @jzheaux has mentioned creating specific issues for documentation updates. I love Spring Security and have been a follower since the beta days of Acegi in 2006. I'm very proud to be a user and would greatly appreciate being able to contribute to the longevity of this wonderful project.

Actual Behavior

In the documentation, Section 11.6.3 Getting Started states:

Many parts of the ACL module rely on long identifiers. If you’re not using long (or an int, byte etc), there is a very good chance you’ll need to reimplement a number of classes. We do not intend to support non-long identifiers in Spring Security’s ACL module, as longs are already compatible with all database sequences, the most common identifier data type, and are of sufficient length to accommodate all common usage scenarios.

This statement is false. The ACL module fully supports UUID and String.

Expected Behavior

This statement should be removed. Updated schema DDL and instructions for using non-Long identifiers should be included.

Configuration

DDL updates

CREATE TABLE IF NOT EXISTS acl_class (
  id BIGINT NOT NULL AUTO_INCREMENT,
  class varchar(255) NOT NULL,
  class_id_type varchar(255),
  PRIMARY KEY (id),
  UNIQUE KEY unique_uk_2 (class)
);
 
CREATE TABLE IF NOT EXISTS acl_object_identity (
  id BIGINT NOT NULL AUTO_INCREMENT,
  object_id_class BIGINT NOT NULL,
  object_id_identity varchar(255) NOT NULL,
  parent_object BIGINT DEFAULT NULL,
  owner_sid BIGINT DEFAULT NULL,
  entries_inheriting tinyint(1) NOT NULL,
  PRIMARY KEY (id),
  UNIQUE KEY unique_uk_3 (object_id_class,object_id_identity)
);

Settings in ACL configuration

jdbcMutableAclService.setAclClassIdSupported(true);
lookupStrategy.setAclClassIdSupported(true);
Version

5.2.2

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 with Section 11.6.3 of the linked Spring Security authorization documentation and review issue #6141 for the ACL behavior it introduced. Update the outdated statement, include the supplied schema changes and ACL configuration guidance, and consider the work done when the documentation accurately explains UUID and String identifiers.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, sql
Domain
databases, documentation, security
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.