[java-identity-provider COMMIT] in /trunk: idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractSubjectCanoni...
noreply at shibboleth.net
noreply at shibboleth.net
Mon Jul 7 22:41:30 EDT 2014
Author: scantor
Date: Mon Jul 7 22:41:30 2014
New Revision: 6240
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6240&view=rev
Log:
IDP-359: draft c14n flow that uses attribute resolver
Added:
trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/AttributeSourcedSubjectCanonicalization.java (with props)
trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/AttributeSourcedSubjectCanonicalizationTest.java (with props)
trunk/idp-conf/src/main/resources/conf/c14n/attribute-sourced-subject-c14n-config.xml (with props)
trunk/idp-conf/src/main/resources/system/flows/c14n/attribute-sourced-subject-c14n-beans.xml (with props)
trunk/idp-conf/src/main/resources/system/flows/c14n/attribute-sourced-subject-c14n-flow.xml (with props)
Modified:
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractSubjectCanonicalizationAction.java
trunk/idp-authn-impl/pom.xml
trunk/idp-conf/src/main/resources/conf/c14n/subject-c14n.xml
trunk/idp-conf/src/main/resources/system/conf/subject-c14n-system.xml
trunk/idp-conf/src/main/resources/system/conf/utilities.xml
trunk/idp-conf/src/main/resources/system/conf/webflow-config.xml
Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractSubjectCanonicalizationAction.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractSubjectCanonicalizationAction.java?rev=6240&r1=6239&r2=6240&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractSubjectCanonicalizationAction.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractSubjectCanonicalizationAction.java Mon Jul 7 22:41:30 2014
@@ -186,7 +186,14 @@
protected boolean doPreExecute(
@Nonnull final ProfileRequestContext<InboundMessageType, OutboundMessageType> profileRequestContext,
@Nonnull final SubjectCanonicalizationContext c14nContext) {
- return c14nContext.getSubject() != null;
+
+ if (c14nContext.getSubject() == null) {
+ c14nContext.setException(new SubjectCanonicalizationException("No Subject found in context"));
+ ActionSupport.buildEvent(profileRequestContext, AuthnEventIds.INVALID_SUBJECT);
+ return false;
+ }
+
+ return true;
}
/** {@inheritDoc} */
Modified: trunk/idp-authn-impl/pom.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-impl/pom.xml?rev=6240&r1=6239&r2=6240&view=diff
==============================================================================
--- trunk/idp-authn-impl/pom.xml (original)
+++ trunk/idp-authn-impl/pom.xml Mon Jul 7 22:41:30 2014
@@ -17,6 +17,11 @@
<dependencies>
<!-- Compile Dependencies -->
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>idp-attribute-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>idp-authn-api</artifactId>
Modified: trunk/idp-conf/src/main/resources/conf/c14n/subject-c14n.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/conf/c14n/subject-c14n.xml?rev=6240&r1=6239&r2=6240&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/conf/c14n/subject-c14n.xml (original)
+++ trunk/idp-conf/src/main/resources/conf/c14n/subject-c14n.xml Mon Jul 7 22:41:30 2014
@@ -24,9 +24,17 @@
<!-- Flows used after authentication to produce canonical principal name. -->
<util:list id="shibboleth.PostLoginSubjectCanonicalizationFlows">
<!--
+ This is an advanced post-login step that performs attribute resolution and then produces a username
+ from an attribute value. Most of this configuration is handled by attribute-sourced-c14n-config.xml.
+ To enable universally, just uncomment, but if you want it to run under more specific conditions,
+ set an activationCondition property to a condition function to use to control when it should run.
+ -->
+ <!-- <bean id="c14n/attribute" parent="shibboleth.PostLoginSubjectCanonicalizationFlow" /> -->
+
+ <!--
This is the standard post-login step that returns a username derived from the login process. If you
have more complex needs such as mapping a certificate DN into a principal name, an alternative may
- be required, but you can configure some simple transforms in simple-subject-c14n-config.xml
+ be required such as that above, but you can configure simple transforms in simple-subject-c14n-config.xml
-->
<ref bean="c14n/simple" />
</util:list>
Modified: trunk/idp-conf/src/main/resources/system/conf/subject-c14n-system.xml
[... 60 lines stripped ...]
More information about the commits
mailing list