Search before asking
Environment
I am using Shiro 1.13.0 with SpringBoot, integrated with Active Directory (using ActiveDirectoryRealm). After migrating to versioni 2.0.5 Shiro fails to initialize.
Removing deprecated DefaultLdapContextFactory (commit 140b786) may have created this issue.
I am willing to submit a PR to fix this issue
Shiro version
Problem occurs after migrating from Shiro 1.13.0 to 2.0.5
What was the actual outcome?
Error is: Property 'principalSuffix' does not exist for object of type org.apache.shiro.realm.activedirectory.ActiveDirectoryRealm
What was the expected outcome?
Shiro initializes successfully
How to reproduce
Use something like this in shiro.ini:
[main]
ldapRealm = org.apache.shiro.realm.activedirectory.ActiveDirectoryRealm
ldapRealm.principalSuffix = @example.com
Debug logs
org.apache.shiro.config.ConfigurationException: Property 'principalSuffix' does not exist for object of type org.apache.shiro.realm.activedirectory.ActiveDirectoryRealm.
at org.apache.shiro.config.ogdl.ReflectionBuilder.isTypedProperty(ReflectionBuilder.java:473) ~[shiro-config-ogdl-2.0.5.jar:2.0.5]
at org.apache.shiro.config.ogdl.ReflectionBuilder.applyProperty(ReflectionBuilder.java:761) ~[shiro-config-ogdl-2.0.5.jar:2.0.5]
at org.apache.shiro.config.ogdl.ReflectionBuilder.applySingleProperty(ReflectionBuilder.java:424) ~[shiro-config-ogdl-2.0.5.jar:2.0.5]
at org.apache.shiro.config.ogdl.ReflectionBuilder.applyProperty(ReflectionBuilder.java:385) ~[shiro-config-ogdl-2.0.5.jar:2.0.5]
at org.apache.shiro.config.ogdl.ReflectionBuilder$AssignmentStatement.doExecute(ReflectionBuilder.java:1039) ~[shiro-config-ogdl-2.0.5.jar:2.0.5]
at org.apache.shiro.config.ogdl.ReflectionBuilder$Statement.execute(ReflectionBuilder.java:971) ~[shiro-config-ogdl-2.0.5.jar:2.0.5]
at org.apache.shiro.config.ogdl.ReflectionBuilder$BeanConfigurationProcessor.execute(ReflectionBuilder.java:842) ~[shiro-config-ogdl-2.0.5.jar:2.0.5]
at org.apache.shiro.config.ogdl.ReflectionBuilder.buildObjects(ReflectionBuilder.java:309) ~[shiro-config-ogdl-2.0.5.jar:2.0.5]
at org.apache.shiro.ini.IniSecurityManagerFactory.buildInstances(IniSecurityManagerFactory.java:194) ~[shiro-core-2.0.5-jakarta.jar:2.0.5]
at org.apache.shiro.ini.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:152) ~[shiro-core-2.0.5-jakarta.jar:2.0.5]
at org.apache.shiro.ini.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:120) ~[shiro-core-2.0.5-jakarta.jar:2.0.5]
at org.apache.shiro.ini.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:111) ~[shiro-core-2.0.5-jakarta.jar:2.0.5]
at org.apache.shiro.ini.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:50) ~[shiro-core-2.0.5-jakarta.jar:2.0.5]
at org.apache.shiro.ini.IniFactorySupport.createInstance(IniFactorySupport.java:156) ~[shiro-core-2.0.5-jakarta.jar:2.0.5]
at org.apache.shiro.util.AbstractFactory.getInstance(AbstractFactory.java:50) ~[shiro-core-2.0.5-jakarta.jar:2.0.5]
(...)
Search before asking
Environment
I am using Shiro 1.13.0 with SpringBoot, integrated with Active Directory (using
ActiveDirectoryRealm). After migrating to versioni 2.0.5 Shiro fails to initialize.Removing deprecated
DefaultLdapContextFactory(commit 140b786) may have created this issue.I am willing to submit a PR to fix this issue
Shiro version
Problem occurs after migrating from Shiro 1.13.0 to 2.0.5
What was the actual outcome?
Error is: Property 'principalSuffix' does not exist for object of type org.apache.shiro.realm.activedirectory.ActiveDirectoryRealm
What was the expected outcome?
Shiro initializes successfully
How to reproduce
Use something like this in
shiro.ini:Debug logs