[java-identity-provider] branch master updated: Expose encodedSalt property on ComputedId/StoredId data connectors.
Scott Cantor
cantor.2 at osu.edu
Mon Dec 9 15:05:27 EST 2019
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=90c54c223dcdc70c92a9cb9d04b010ad1759bc2a
The following commit(s) were added to refs/heads/master by this push:
new 90c54c2 Expose encodedSalt property on ComputedId/StoredId data connectors.
90c54c2 is described below
commit 90c54c223dcdc70c92a9cb9d04b010ad1759bc2a
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Dec 9 14:05:23 2019 -0600
Expose encodedSalt property on ComputedId/StoredId data connectors.
---
.../dc/impl/ComputedIdDataConnectorParser.java | 22 +++++++++++++++++-----
.../spring/dc/resolver/computedDataConnector.xml | 2 +-
.../schema/shibboleth-attribute-resolver.xsd | 16 +++++++++++++++-
3 files changed, 33 insertions(+), 7 deletions(-)
diff --git a/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/impl/ComputedIdDataConnectorParser.java b/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/impl/ComputedIdDataConnectorParser.java
index 19be01c..bfbdeac 100644
--- a/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/impl/ComputedIdDataConnectorParser.java
+++ b/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/impl/ComputedIdDataConnectorParser.java
@@ -78,21 +78,33 @@ public class ComputedIdDataConnectorParser extends PairwiseIdDataConnectorParser
}
final String salt;
+ final String encodedSalt;
if (config.hasAttributeNS(null, "salt")) {
salt = config.getAttributeNS(null, "salt");
+ encodedSalt = null;
+ if (config.hasAttributeNS(null, "encodedSalt")) {
+ log.warn("{} Ignoring encodedSalt in favor of salt", getLogPrefix());
+ }
+ } else if (config.hasAttributeNS(null, "encodedSalt")) {
+ salt = null;
+ encodedSalt = config.getAttributeNS(null, "encodedSalt");
} else {
+ encodedSalt = null;
salt = null;
}
- if (null == salt) {
- log.debug("{} No salt provided", getLogPrefix());
- } else {
+ if (salt != null) {
log.debug("{} See TRACE log for the salt value", getLogPrefix());
log.trace("{} Salt: '{}'", getLogPrefix(), salt);
+ builder.addPropertyValue("salt", salt);
+ } else if (encodedSalt != null) {
+ log.debug("{} See TRACE log for the salt value", getLogPrefix());
+ log.trace("{} Encoded Salt: '{}'", getLogPrefix(), encodedSalt);
+ builder.addPropertyValue("encodedSalt", encodedSalt);
+ } else {
+ log.debug("{} No salt provided", getLogPrefix());
}
- builder.addPropertyValue("salt", salt);
-
return builder.getBeanDefinition();
}
diff --git a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/resolver/computedDataConnector.xml b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/resolver/computedDataConnector.xml
index 7cbc1d0..8a8e484 100644
--- a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/resolver/computedDataConnector.xml
+++ b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/resolver/computedDataConnector.xml
@@ -3,7 +3,7 @@
xsi:type="ComputedId" xmlns="urn:mace:shibboleth:2.0:resolver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
generatedAttributeID="jenny"
- salt="abcdefghijklmnopqrst "
+ encodedSalt="YWJjZGVmZ2hpamtsbW5vcHFyc3Qg"
xsi:schemaLocation="urn:mace:shibboleth:2.0:resolver http://shibboleth.net/schema/idp/shibboleth-attribute-resolver.xsd">
<FailoverDataConnector ref="2123"/>
<InputDataConnector ref="DC" attributeNames="theSourceRemainsTheSame" />
diff --git a/idp-schema/src/main/resources/schema/shibboleth-attribute-resolver.xsd b/idp-schema/src/main/resources/schema/shibboleth-attribute-resolver.xsd
index 9308298..d9b079c 100644
--- a/idp-schema/src/main/resources/schema/shibboleth-attribute-resolver.xsd
+++ b/idp-schema/src/main/resources/schema/shibboleth-attribute-resolver.xsd
@@ -708,13 +708,20 @@
</documentation>
</annotation>
</attribute>
- <attribute name="salt" type="resolver:string" use="required">
+ <attribute name="salt" type="resolver:string">
<annotation>
<documentation>
A salt, of at least 16 bytes, used in the computed ID.
</documentation>
</annotation>
</attribute>
+ <attribute name="encodedSalt" type="resolver:string">
+ <annotation>
+ <documentation>
+ A base64-encoded salt, of at least 16 bytes, used in the computed ID.
+ </documentation>
+ </annotation>
+ </attribute>
<attribute name="algorithm" type="resolver:string">
<annotation>
<documentation>
@@ -1489,6 +1496,13 @@
</documentation>
</annotation>
</attribute>
+ <attribute name="encodedSalt" type="resolver:string">
+ <annotation>
+ <documentation>
+ A base64-encoded salt, of at least 16 bytes, used in the computed ID.
+ </documentation>
+ </annotation>
+ </attribute>
<attribute name="algorithm" type="resolver:string">
<annotation>
<documentation>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list