[java-idp-plugin-duo] branch dev/nimbus updated: Fix nimbus client package
Phil Smart
philip.smart at jisc.ac.uk
Mon Sep 28 16:03:10 UTC 2020
This is an automated email from the git hooks/post-receive script.
philsmart pushed a commit to branch dev/nimbus
in repository java-idp-plugin-duo.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-duo.git;a=commit;h=6d8a527e8615c25829d9f899d89cdf1b7688a40c
The following commit(s) were added to refs/heads/dev/nimbus by this push:
new 6d8a527 Fix nimbus client package
6d8a527 is described below
commit 6d8a527e8615c25829d9f899d89cdf1b7688a40c
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Mon Sep 28 17:03:04 2020 +0100
Fix nimbus client package
---
idp-duo-distribution/pom.xml | 29 ++++--
.../src/main/assembly/duo-nimbus-assembly.xml | 17 +---
idp-duo-impl/pom.xml | 7 +-
.../idp/plugin/authn/duo/PluginTest.java | 107 ---------------------
.../idp/plugin/authn/duo/package-info.java | 19 ----
5 files changed, 29 insertions(+), 150 deletions(-)
diff --git a/idp-duo-distribution/pom.xml b/idp-duo-distribution/pom.xml
index 05d94b0..683783c 100644
--- a/idp-duo-distribution/pom.xml
+++ b/idp-duo-distribution/pom.xml
@@ -17,6 +17,7 @@
<properties>
<checkstyle.configLocation>${project.basedir}/../checkstyle.xml</checkstyle.configLocation>
<dist.duosdk.finalName>shibboleth-idp-plugin-duo-native-sdk-${project.version}</dist.duosdk.finalName>
+ <dist.nimbus.finalName>shibboleth-idp-plugin-duo-nimbus-${project.version}</dist.nimbus.finalName>
<dist.bare.finalName>shibboleth-idp-plugin-duo-bare-${project.version}</dist.bare.finalName>
</properties>
@@ -25,8 +26,24 @@
<!-- Assemble -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
+ <executions>
+ <execution>
+ <id>make-assembly-bare</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>src/main/assembly/duo-bare-assembly.xml</descriptor>
+ </descriptors>
+ <finalName>${dist.bare.finalName}</finalName>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ </configuration>
+ </execution>
+ <execution>
+ <!-- Duo SDK version -->
<id>make-assembly-duo-sdk</id>
<phase>package</phase>
<goals>
@@ -42,8 +59,8 @@
</configuration>
</execution>
<execution>
- <!-- This could become a native Nimbus client etc. -->
- <id>make-assembly-bare</id>
+ <!-- Nimbus version -->
+ <id>make-assembly-nimbus</id>
<phase>package</phase>
<goals>
<goal>single</goal>
@@ -51,9 +68,9 @@
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
- <descriptor>src/main/assembly/duo-bare-assembly.xml</descriptor>
+ <descriptor>src/main/assembly/duo-nimbus-assembly.xml</descriptor>
</descriptors>
- <finalName>${dist.bare.finalName}</finalName>
+ <finalName>${dist.nimbus.finalName}</finalName>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
</execution>
diff --git a/idp-duo-distribution/src/main/assembly/duo-nimbus-assembly.xml b/idp-duo-distribution/src/main/assembly/duo-nimbus-assembly.xml
index ede9694..8004f2d 100644
--- a/idp-duo-distribution/src/main/assembly/duo-nimbus-assembly.xml
+++ b/idp-duo-distribution/src/main/assembly/duo-nimbus-assembly.xml
@@ -1,7 +1,7 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
- <id>bin-native</id>
+ <id>bin-nimbus</id>
<formats>
<format>tar.gz</format>
<format>tar.bz2</format>
@@ -41,10 +41,10 @@
</excludes>
</fileSet>
<fileSet>
- <directory>../idp-plugin-duo-nimbus-impl/target</directory>
+ <directory>../idp-duo-nimbus-client-impl/target</directory>
<outputDirectory>edit-webapp/WEB-INF/lib</outputDirectory>
<includes>
- <include>idp-plugin-duo-nimbus-impl-*.jar</include>
+ <include>idp-plugin-duo-nimbus-client-impl-*.jar</include>
</includes>
<excludes>
<exclude>*test*.jar</exclude>
@@ -53,17 +53,10 @@
</excludes>
</fileSet>
<fileSet>
- <directory>../idp-plugin-duo-nimbus-impl/target/dependency</directory>
+ <directory>../idp-duo-nimbus-client-impl/target/dependency</directory>
<outputDirectory>edit-webapp/WEB-INF/lib</outputDirectory>
<includes>
- <include>duo-*.jar</include>
- <include>java-jwt-*.jar</include>
- <include>lombook-*.jar</include>
- <include>okhttp-*.jar</include>
- <include>okio-*.jar</include>
- <include>retrofit-*.jar</include>
- <include>jackson-*.jar</include>
- <include>converter-jackson-*.jar</include>
+ <include>nimbus-jose-jwt-*.jar</include>
</includes>
</fileSet>
<fileSet>
diff --git a/idp-duo-impl/pom.xml b/idp-duo-impl/pom.xml
index 383a0d1..f01f76e 100644
--- a/idp-duo-impl/pom.xml
+++ b/idp-duo-impl/pom.xml
@@ -103,12 +103,7 @@
<groupId>${spring.groupId}</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${idp.groupId}</groupId>
- <artifactId>idp-admin-impl</artifactId>
- <scope>test</scope>
- </dependency>
+ </dependency>
<dependency>
<groupId>net.shibboleth.idp</groupId>
<artifactId>idp-conf</artifactId>
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/PluginTest.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/PluginTest.java
deleted file mode 100644
index 0e5dcac..0000000
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/PluginTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements. See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You under the Apache
- * License, Version 2.0 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.shibboleth.idp.plugin.authn.duo;
-
-import org.testng.annotations.Test;
-
-import net.shibboleth.idp.plugin.PluginDescription;
-import net.shibboleth.idp.plugin.PluginSupport.SupportLevel;
-import net.shibboleth.idp.plugin.PluginVersion;
-import net.shibboleth.idp.plugin.impl.PluginState;
-import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
-import net.shibboleth.utilities.java.support.primitive.StringSupport;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.Properties;
-import java.util.ServiceLoader;
-
-import org.testng.annotations.BeforeClass;
-
-/** Test the plugin description. If nothing else, it ensures the plugin has the correct basic setup. */
-public class PluginTest {
-
- /** The plugin to test. */
- private PluginDescription duo;
-
- /**
- * Find the plugin.
- */
- @BeforeClass
- public void setupPlugin() {
-
- final ServiceLoader<PluginDescription> loader = ServiceLoader.load(PluginDescription.class);
- for (final PluginDescription service : loader) {
- if ("net.shibboleth.idp.plugin.duo".contentEquals(service.getPluginId())) {
- duo = service;
- break;
- }
- }
- assertNotNull(duo);
-
- }
-
- /**
- * Test files.
- *
- * @throws IOException on error
- */
- @Test
- public void testFiles() throws IOException {
- final Path distDir = Path.of("../idp-duo-distribution/src/main/resources");
- assertTrue(Files.exists(distDir));
- for (final Path p : duo.getFilePathsToCopy()) {
- assertTrue(Files.exists(distDir.resolve(p)));
- }
- final File propFile = distDir.resolve("bootstrap").resolve("id.property").toFile();
- assertTrue(propFile.exists());
- Properties props = new Properties(2);
- try(final BufferedInputStream stream = new BufferedInputStream(new FileInputStream(propFile))) {
- props.load(stream);
- assertEquals(StringSupport.trimOrNull(props.getProperty("pluginid")), duo.getPluginId());
- }
- }
-
- /**
- * Test the plugin state.
- *
- * @throws ComponentInitializationException on error
- */
- @Test
- public void testState() throws ComponentInitializationException {
-
- final PluginState state = new PluginState(duo);
- state.initialize();
- final PluginVersion version =
- new PluginVersion(duo.getMajorVersion(), duo.getMinorVersion(), duo.getPatchVersion());
- assertTrue(state.getAvailableVersions().containsKey(version));
- assertEquals(state.getCurrentInfo().getSupportLevel(), SupportLevel.Current);
- assertTrue(state.isSupportedWithIdPVersion(version, new PluginVersion("4.1.0")));
- assertFalse(state.isSupportedWithIdPVersion(version, new PluginVersion("5.0.0")));
- }
-
-}
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/package-info.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/package-info.java
deleted file mode 100644
index 8315aff..0000000
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/package-info.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements. See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You under the Apache
- * License, Version 2.0 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/** Duo OIDC 2FA login flow test classes. */
-package net.shibboleth.idp.plugin.authn.duo;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list