You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Spring ACL database schema for PostgreSQL (specified in createAclSchemaPostgres.sql) definition for table acl_object_identity look like this:
create table acl_object_identity(
id bigserial primary key,
object_id_class bigint not null,
object_id_identity varchar(36) not null,
parent_object bigint,
owner_sid bigint,
entries_inheriting boolean not null,
-- constraints are omitted for brevity
);
So, column object_id_identity is of text type.
Actual Behavior
When I execute this piece of code
ObjectIdentity identity = new ObjectIdentityImpl("com.example.data.model.Card", "42");
MutableAcl acl = mutableAclService.createAcl(identity);
I get an exception telling me there is a problem with finding object identity:
org.springframework.security.acls.model.NotFoundException: Unable to find ACL information for object identity 'org.springframework.security.acls.domain.ObjectIdentityImpl[Type: com.example.data.model.Card; Identifier: 42]'
at org.springframework.security.acls.jdbc.JdbcAclService.readAclsById(JdbcAclService.java:136) ~[spring-security-acl-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.security.acls.jdbc.JdbcAclService.readAclById(JdbcAclService.java:112) ~[spring-security-acl-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.security.acls.jdbc.JdbcAclService.readAclById(JdbcAclService.java:120) ~[spring-security-acl-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.security.acls.jdbc.JdbcMutableAclService.createAcl(JdbcMutableAclService.java:122) ~[spring-security-acl-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at com.example.security.acl.AclModelService.create(AclModelService.java:22) ~[classes/:na]
Basically, there is a problem with resolving type of column object_id_identity in BasicLookupStrategy:639
While actually being String type, identifier is treated as of type Long. Later in code it leads to the aforementioned exception.
I guess this check it totally pointless since the type of object_id_identity is text.
Expected Behavior
Such piece of code must execute correctly
ObjectIdentity identity = new ObjectIdentityImpl("com.example.data.model.Card", "42");
MutableAcl acl = mutableAclService.createAcl(identity);
Configuration
Standard configuration with schema provided in createAclSchemaPostgres.sql
Summary
In the Spring ACL database schema for PostgreSQL (specified in createAclSchemaPostgres.sql) definition for table acl_object_identity look like this:
So, column object_id_identity is of text type.
Actual Behavior
When I execute this piece of code
I get an exception telling me there is a problem with finding object identity:
Basically, there is a problem with resolving type of column object_id_identity in
BasicLookupStrategy:639
While actually being String type, identifier is treated as of type Long. Later in code it leads to the aforementioned exception.
I guess this check it totally pointless since the type of object_id_identity is text.
Expected Behavior
Such piece of code must execute correctly
Configuration
Standard configuration with schema provided in createAclSchemaPostgres.sql
Version
org.springframework.security:spring-security-acl:jar:5.0.8.RELEASE
The text was updated successfully, but these errors were encountered: