[java-identity-provider] branch main updated: Add second module.
Scott Cantor
cantor.2 at osu.edu
Tue Sep 8 22:43:26 UTC 2020
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=68998234a4306ba12bfb048a2db57cdad6543e40
The following commit(s) were added to refs/heads/main by this push:
new 68998234a Add second module.
68998234a is described below
commit 68998234a4306ba12bfb048a2db57cdad6543e40
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Sep 8 18:43:17 2020 -0400
Add second module.
---
.../idp/module/impl/ModuleManagerCLI.java | 2 +-
.../shibboleth/idp/module/authn/impl/Function.java | 41 ++++++++++++++++++++++
.../services/net.shibboleth.idp.module.IdPModule | 1 +
.../idp/flows/authn/function-authn-beans.xml | 12 +++++--
.../idp/module/authn/impl/module.properties | 9 ++++-
.../module}/conf/authn/function-authn-config.xml | 0
6 files changed, 60 insertions(+), 5 deletions(-)
diff --git a/idp-admin-impl/src/main/java/net/shibboleth/idp/module/impl/ModuleManagerCLI.java b/idp-admin-impl/src/main/java/net/shibboleth/idp/module/impl/ModuleManagerCLI.java
index e7f53685c..0714eb3ac 100644
--- a/idp-admin-impl/src/main/java/net/shibboleth/idp/module/impl/ModuleManagerCLI.java
+++ b/idp-admin-impl/src/main/java/net/shibboleth/idp/module/impl/ModuleManagerCLI.java
@@ -134,6 +134,7 @@ public final class ModuleManagerCLI extends AbstractIdPHomeAwareCommandLine<Modu
System.out.println("\tResource: (" + (r.isReplace() ? " replace" : "noreplace") + ") " +
r.getDestination());
});
+ System.out.println();
} else {
if (module.isEnabled(moduleContext)) {
System.out.println("Module: " + module.getId() +
@@ -143,7 +144,6 @@ public final class ModuleManagerCLI extends AbstractIdPHomeAwareCommandLine<Modu
ANSIColors.ANSI_RED + " [DISABLED]" + ANSIColors.ANSI_RESET);
}
}
- System.out.println();
}
}
diff --git a/idp-conf-impl/src/main/java/net/shibboleth/idp/module/authn/impl/Function.java b/idp-conf-impl/src/main/java/net/shibboleth/idp/module/authn/impl/Function.java
new file mode 100644
index 000000000..3dba46da2
--- /dev/null
+++ b/idp-conf-impl/src/main/java/net/shibboleth/idp/module/authn/impl/Function.java
@@ -0,0 +1,41 @@
+/*
+ * 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.module.authn.impl;
+
+import java.io.IOException;
+
+import net.shibboleth.idp.module.IdPModule;
+import net.shibboleth.idp.module.ModuleException;
+import net.shibboleth.idp.module.PropertyDrivenIdPModule;
+
+/**
+ * {@link IdPModule} implementation.
+ */
+public final class Function extends PropertyDrivenIdPModule {
+
+ /**
+ * Constructor.
+ *
+ * @throws ModuleException on error
+ * @throws IOException on error
+ */
+ public Function() throws IOException, ModuleException {
+ super(Function.class);
+ }
+
+}
\ No newline at end of file
diff --git a/idp-conf-impl/src/main/resources/META-INF/services/net.shibboleth.idp.module.IdPModule b/idp-conf-impl/src/main/resources/META-INF/services/net.shibboleth.idp.module.IdPModule
index c4fefba10..c7dec094c 100644
--- a/idp-conf-impl/src/main/resources/META-INF/services/net.shibboleth.idp.module.IdPModule
+++ b/idp-conf-impl/src/main/resources/META-INF/services/net.shibboleth.idp.module.IdPModule
@@ -1 +1,2 @@
+net.shibboleth.idp.module.authn.impl.Function
net.shibboleth.idp.module.authn.impl.IPAddress
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/authn/function-authn-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/authn/function-authn-beans.xml
index 6f5c00821..9aede41d9 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/authn/function-authn-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/authn/function-authn-beans.xml
@@ -18,12 +18,18 @@
<bean class="net.shibboleth.ext.spring.config.IdentifiableBeanPostProcessor" />
<bean class="net.shibboleth.idp.profile.impl.ProfileActionBeanPostProcessor" />
- <import resource="%{idp.home}/conf/authn/function-authn-config.xml" />
-
+ <import resource="conditional:%{idp.home}/conf/authn/function-authn-config.xml" />
+
+ <bean id="DefaultResultLookupStrategy" parent="shibboleth.Functions.Constant">
+ <constructor-arg>
+ <null/>
+ </constructor-arg>
+ </bean>
+
<bean id="ValidateFunctionResult" class="net.shibboleth.idp.authn.impl.ValidateFunctionResult" scope="prototype"
p:addDefaultPrincipals="#{getObject('shibboleth.authn.Function.addDefaultPrincipals') ?: true}"
p:resultCachingPredicate="#{getObject('shibboleth.authn.Function.resultCachingPredicate')}"
- p:resultLookupStrategy-ref="shibboleth.authn.Function.ResultLookupStrategy" />
+ p:resultLookupStrategy="#{getObject('shibboleth.authn.Function.ResultLookupStrategy') ?: getObject('DefaultResultLookupStrategy')" />
<bean id="PopulateSubjectCanonicalizationContext"
class="net.shibboleth.idp.authn.impl.PopulateSubjectCanonicalizationContext" scope="prototype"
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/authn/impl/module.properties b/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/authn/impl/module.properties
index 29f2be0d1..304db81c1 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/authn/impl/module.properties
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/authn/impl/module.properties
@@ -1,10 +1,17 @@
# Properties defining authn modules
+# Class to Module ID mappings
+net.shibboleth.idp.module.authn.impl.Function.id = idp.authn.Function
net.shibboleth.idp.module.authn.impl.IPAddress.id = idp.authn.IPAddress
+idp.authn.Function.name = Function Authentication
+idp.authn.Function.desc = Authentication flow that produces a result from a function.
+idp.authn.Function.url = https://wiki.shibboleth.net/confluence/display/IDP4/FunctionAuthnConfiguration
+idp.authn.Function.1.src = /net/shibboleth/idp/module/conf/authn/function-authn-config.xml
+idp.authn.Function.1.dest = conf/authn/function-authn-config.xml
+
idp.authn.IPAddress.name = IPAddress Authentication
idp.authn.IPAddress.desc = Authentication flow that maps IP Address ranges to subjects.
idp.authn.IPAddress.url = https://wiki.shibboleth.net/confluence/display/IDP4/IPAddressAuthnConfiguration
-
idp.authn.IPAddress.1.src = /net/shibboleth/idp/module/conf/authn/ipaddress-authn-config.xml
idp.authn.IPAddress.1.dest = conf/authn/ipaddress-authn-config.xml
diff --git a/idp-conf/src/main/resources/conf/authn/function-authn-config.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/conf/authn/function-authn-config.xml
similarity index 100%
rename from idp-conf/src/main/resources/conf/authn/function-authn-config.xml
rename to idp-conf-impl/src/main/resources/net/shibboleth/idp/module/conf/authn/function-authn-config.xml
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list