You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2022/11/14 09:15:23 UTC
[isis] branch spring6 updated (739bbfbdf6 -> 4f0fc70361)
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a change to branch spring6
in repository https://gitbox.apache.org/repos/asf/isis.git
from 739bbfbdf6 ISIS-3275: fixes surefire launch (module path issues)
new 832d2c8306 ISIS-3275: migrate shiro 1.10.x to 2.x snapshot
new 4f0fc70361 ISIS-3275: dropping Shiro from CI build (no jakarta support yet)
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
bom/pom.xml | 23 ++++++++++++++++++----
core/pom.xml | 2 +-
.../realm/impl/CausewayLdapRealm.java | 4 ++--
.../testdomain/shiro/AbstractShiroTest.java | 4 ++--
security/shiro/pom.xml | 1 -
...AuthenticatorOrAuthorizorTest_authenticate.java | 6 +++---
...ticatorOrAuthorizorTest_isVisibleInAnyRole.java | 8 ++++----
7 files changed, 31 insertions(+), 17 deletions(-)
[isis] 01/02: ISIS-3275: migrate shiro 1.10.x to 2.x snapshot
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch spring6
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 832d2c830691af6bfb84badeabf5336dcb501261
Author: Andi Huber <ah...@apache.org>
AuthorDate: Mon Nov 14 10:09:43 2022 +0100
ISIS-3275: migrate shiro 1.10.x to 2.x snapshot
---
bom/pom.xml | 23 ++++++++++++++++++----
.../realm/impl/CausewayLdapRealm.java | 4 ++--
.../testdomain/shiro/AbstractShiroTest.java | 4 ++--
security/shiro/pom.xml | 1 -
...AuthenticatorOrAuthorizorTest_authenticate.java | 6 +++---
...ticatorOrAuthorizorTest_isVisibleInAnyRole.java | 8 ++++----
6 files changed, 30 insertions(+), 16 deletions(-)
diff --git a/bom/pom.xml b/bom/pom.xml
index c77d4ffe15..35c46bf685 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -411,12 +411,16 @@ It is therefore a copy of org.apache:apache, with customisations clearly identif
<select2.version>4.0.13</select2.version>
- <shiro.version>1.10.0</shiro.version>
+ <shiro.version>2.0.0-SNAPSHOT</shiro.version> <!-- latest release was 1.10.0, however we need jakarta namespace support -->
<simpleslackapi.version>1.4.0</simpleslackapi.version>
<slf4j-api.version>2.0.3</slf4j-api.version> <!-- also provided by spring-boot-starter-logging, needed to solve convergence issues -->
<spring-boot.version>3.0.0-RC2</spring-boot.version>
<summernote.version>0.8.11</summernote.version>
- <surefire-plugin.argLine>-Xmx512m --add-modules com.sun.tools.xjc --add-reads org.eclipse.persistence.moxy=com.sun.tools.xjc</surefire-plugin.argLine>
+ <surefire-plugin.argLine>
+ -Xmx512m
+ --add-modules com.sun.tools.xjc
+ --add-reads org.eclipse.persistence.moxy=com.sun.tools.xjc
+ </surefire-plugin.argLine>
<swagger-core.version>1.6.8</swagger-core.version>
<togglz.version>3.2.1</togglz.version>
@@ -444,13 +448,20 @@ It is therefore a copy of org.apache:apache, with customisations clearly identif
</dependencyManagement>
<repositories>
<!-- APACHE CAUSEWAY customisation 7/21: start -->
- <!-- temporary till Nov 24, 2022 -->
<repository>
+ <!-- temporary till Nov 24, 2022 -->
<id>spring.snapshots</id>
<name>Spring Milestones Repository</name>
<url>https://repo.spring.io/milestone/</url>
<snapshots><enabled>false</enabled></snapshots>
</repository>
+ <repository>
+ <!-- temporary till release of shiro 2.0.0 -->
+ <id>shiro.snapshots</id>
+ <name>Shiro Snapshot Repository</name>
+ <url>https://repository.apache.org/content/groups/snapshots/</url>
+ <snapshots><enabled>true</enabled></snapshots>
+ </repository>
<!-- breaks dependabot run: timeout due to repo not accessible
<repository>
<id>apache.snapshots</id>
@@ -1362,7 +1373,11 @@ It is therefore a copy of org.apache:apache, with customisations clearly identif
</property>
</activation>
<properties>
- <surefire-plugin.argLine>@{argLine} -Xmx512m</surefire-plugin.argLine>
+ <surefire-plugin.argLine>
+ @{argLine}
+ --add-modules com.sun.tools.xjc
+ --add-reads org.eclipse.persistence.moxy=com.sun.tools.xjc
+ </surefire-plugin.argLine>
</properties>
<build>
<plugins>
diff --git a/extensions/security/shiro-realm-ldap/impl/src/main/java/org/apache/causeway/extensions/shirorealmldap/realm/impl/CausewayLdapRealm.java b/extensions/security/shiro-realm-ldap/impl/src/main/java/org/apache/causeway/extensions/shirorealmldap/realm/impl/CausewayLdapRealm.java
index 1bfe0f5f54..8e72451344 100644
--- a/extensions/security/shiro-realm-ldap/impl/src/main/java/org/apache/causeway/extensions/shirorealmldap/realm/impl/CausewayLdapRealm.java
+++ b/extensions/security/shiro-realm-ldap/impl/src/main/java/org/apache/causeway/extensions/shirorealmldap/realm/impl/CausewayLdapRealm.java
@@ -39,8 +39,8 @@ import org.apache.shiro.realm.ldap.DefaultLdapRealm;
import org.apache.shiro.realm.ldap.LdapContextFactory;
import org.apache.shiro.realm.ldap.LdapUtils;
import org.apache.shiro.subject.PrincipalCollection;
-import org.apache.shiro.util.StringUtils;
+import org.apache.causeway.commons.internal.base._Strings;
import org.apache.causeway.commons.internal.collections._Maps;
import org.apache.causeway.commons.internal.collections._Sets;
import org.apache.causeway.security.shiro.permrolemapper.PermissionToRoleMapper;
@@ -371,7 +371,7 @@ public class CausewayLdapRealm extends DefaultLdapRealm {
}
public void setUniqueMemberAttributeValueTemplate(final String template) {
- if (!StringUtils.hasText(template)) {
+ if (_Strings.isNullOrEmpty(template)) {
String msg = "User DN template cannot be null or empty.";
throw new IllegalArgumentException(msg);
}
diff --git a/regressiontests/incubating/src/test/java/org/apache/causeway/testdomain/shiro/AbstractShiroTest.java b/regressiontests/incubating/src/test/java/org/apache/causeway/testdomain/shiro/AbstractShiroTest.java
index b9fd03f1c9..fd67931ca3 100644
--- a/regressiontests/incubating/src/test/java/org/apache/causeway/testdomain/shiro/AbstractShiroTest.java
+++ b/regressiontests/incubating/src/test/java/org/apache/causeway/testdomain/shiro/AbstractShiroTest.java
@@ -21,11 +21,11 @@ package org.apache.causeway.testdomain.shiro;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.UnavailableSecurityManagerException;
import org.apache.shiro.config.Ini;
-import org.apache.shiro.config.IniSecurityManagerFactory;
+import org.apache.shiro.ini.IniSecurityManagerFactory;
+import org.apache.shiro.lang.util.LifecycleUtils;
import org.apache.shiro.mgt.SecurityManager;
import org.apache.shiro.subject.Subject;
import org.apache.shiro.subject.support.SubjectThreadState;
-import org.apache.shiro.util.LifecycleUtils;
import org.apache.shiro.util.ThreadContext;
import org.apache.shiro.util.ThreadState;
diff --git a/security/shiro/pom.xml b/security/shiro/pom.xml
index 4e62e6be69..23e68a7a9e 100644
--- a/security/shiro/pom.xml
+++ b/security/shiro/pom.xml
@@ -96,7 +96,6 @@
</exclusion>
</exclusions>
</dependency>
-
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-web</artifactId>
diff --git a/security/shiro/src/test/java/org/apache/causeway/security/shiro/ShiroAuthenticatorOrAuthorizorTest_authenticate.java b/security/shiro/src/test/java/org/apache/causeway/security/shiro/ShiroAuthenticatorOrAuthorizorTest_authenticate.java
index 0ad28d9c82..2f0938103a 100644
--- a/security/shiro/src/test/java/org/apache/causeway/security/shiro/ShiroAuthenticatorOrAuthorizorTest_authenticate.java
+++ b/security/shiro/src/test/java/org/apache/causeway/security/shiro/ShiroAuthenticatorOrAuthorizorTest_authenticate.java
@@ -19,10 +19,10 @@
package org.apache.causeway.security.shiro;
import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.config.IniSecurityManagerFactory;
+import org.apache.shiro.ini.IniFactorySupport;
+import org.apache.shiro.ini.IniSecurityManagerFactory;
import org.apache.shiro.mgt.SecurityManager;
import org.apache.shiro.subject.Subject;
-import org.apache.shiro.util.Factory;
import org.apache.shiro.util.ThreadContext;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
@@ -78,7 +78,7 @@ class ShiroAuthenticatorOrAuthorizorTest_authenticate {
@Test
public void happyCase() throws Exception {
- Factory<SecurityManager> factory = new IniSecurityManagerFactory("classpath:shiro.ini");
+ IniFactorySupport<SecurityManager> factory = new IniSecurityManagerFactory("classpath:shiro.ini");
SecurityManager securityManager = factory.getInstance();
SecurityUtils.setSecurityManager(securityManager);
diff --git a/security/shiro/src/test/java/org/apache/causeway/security/shiro/ShiroAuthenticatorOrAuthorizorTest_isVisibleInAnyRole.java b/security/shiro/src/test/java/org/apache/causeway/security/shiro/ShiroAuthenticatorOrAuthorizorTest_isVisibleInAnyRole.java
index 52bd0dc76d..213b67928a 100644
--- a/security/shiro/src/test/java/org/apache/causeway/security/shiro/ShiroAuthenticatorOrAuthorizorTest_isVisibleInAnyRole.java
+++ b/security/shiro/src/test/java/org/apache/causeway/security/shiro/ShiroAuthenticatorOrAuthorizorTest_isVisibleInAnyRole.java
@@ -19,10 +19,10 @@
package org.apache.causeway.security.shiro;
import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.config.IniSecurityManagerFactory;
+import org.apache.shiro.ini.IniFactorySupport;
+import org.apache.shiro.ini.IniSecurityManagerFactory;
import org.apache.shiro.mgt.SecurityManager;
import org.apache.shiro.subject.Subject;
-import org.apache.shiro.util.Factory;
import org.apache.shiro.util.ThreadContext;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
@@ -70,7 +70,7 @@ class ShiroAuthenticatorOrAuthorizorTest_isVisibleInAnyRole {
@Test
public void vetoing() throws Exception {
// given
- Factory<SecurityManager> factory = new IniSecurityManagerFactory("classpath:shiro.ini");
+ IniFactorySupport<SecurityManager> factory = new IniSecurityManagerFactory("classpath:shiro.ini");
SecurityManager securityManager = factory.getInstance();
SecurityUtils.setSecurityManager(securityManager);
@@ -87,7 +87,7 @@ class ShiroAuthenticatorOrAuthorizorTest_isVisibleInAnyRole {
@Test
public void vetoingOverridden() throws Exception {
// given
- Factory<SecurityManager> factory = new IniSecurityManagerFactory("classpath:shiro.ini");
+ IniFactorySupport<SecurityManager> factory = new IniSecurityManagerFactory("classpath:shiro.ini");
SecurityManager securityManager = factory.getInstance();
SecurityUtils.setSecurityManager(securityManager);
[isis] 02/02: ISIS-3275: dropping Shiro from CI build (no jakarta support yet)
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch spring6
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 4f0fc7036136ff59de47ce976b3b93c3a1075019
Author: Andi Huber <ah...@apache.org>
AuthorDate: Mon Nov 14 10:15:16 2022 +0100
ISIS-3275: dropping Shiro from CI build (no jakarta support yet)
---
core/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/pom.xml b/core/pom.xml
index e55932c205..57a3529d21 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -1682,7 +1682,7 @@
<module>security</module>
<module>../security/bypass</module>
<module>../security/keycloak</module>
- <module>../security/shiro</module>
+<!-- <module>../security/shiro</module> TODO[ISIS-3275] no jakarta namespace support on 2.0.0-SNAPSHOT as of Nov 2022 -->
<module>../security/spring</module>
<module>../viewers/commons</module>