[java-identity-provider] 02/04: Revert "IDP-1418 Throw a BreanCreation error if useStartTLS is specified but trustFile isn't"
Rod Widdowson
rdw at steadingsoftware.com
Fri Apr 12 08:01:23 EDT 2019
This is an automated email from the git hooks/post-receive script.
rdw 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=75e68ecd5f91141e68a83e28dee8e95fcf103805
commit 75e68ecd5f91141e68a83e28dee8e95fcf103805
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Thu Apr 11 17:24:19 2019 +0100
Revert "IDP-1418 Throw a BreanCreation error if useStartTLS is specified but trustFile isn't"
This reverts commit 717d4ba036f5d28495731fb9fc4d1de52acba01a.
---
.../dc/ldap/impl/CredentialConfigFactoryBean.java | 25 ----------------------
.../dc/ldap/impl/LDAPDataConnectorParser.java | 14 +++---------
2 files changed, 3 insertions(+), 36 deletions(-)
diff --git a/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/ldap/impl/CredentialConfigFactoryBean.java b/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/ldap/impl/CredentialConfigFactoryBean.java
index e92d9b4..d36a446 100644
--- a/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/ldap/impl/CredentialConfigFactoryBean.java
+++ b/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/ldap/impl/CredentialConfigFactoryBean.java
@@ -47,9 +47,6 @@ public class CredentialConfigFactoryBean extends AbstractComponentAwareFactoryBe
/** Our authentication credential for the LDAP connection. */
@Nullable private Credential authCredential;
- /** Did the user specify useStartTLS? */
- private boolean useStartTLS;
-
/** {@inheritDoc} */
@Override public Class<?> getObjectType() {
return CredentialConfig.class;
@@ -59,10 +56,6 @@ public class CredentialConfigFactoryBean extends AbstractComponentAwareFactoryBe
@Override protected CredentialConfig doCreateInstance() throws Exception {
X509Certificate[] trustCerts = null;
- if (getUseStartTLS() && trustCredential == null) {
- throw new BeanCreationException("setting useStartTLS=\"true\" requires 'trustFile' bet set to a value");
- }
-
if (trustCredential != null) {
if (trustCredential instanceof X509Credential) {
final X509Credential cred = (X509Credential) trustCredential;
@@ -93,24 +86,6 @@ public class CredentialConfigFactoryBean extends AbstractComponentAwareFactoryBe
}
/**
- * Get the useStartTLS setting the Data Connector.
- *
- * @return the specified value
- */
- @Nullable public boolean getUseStartTLS() {
- return useStartTLS;
- }
-
- /**
- * Set the useStartTLS setting the Data Connector.
- *
- * @param value the Value specified
- */
- public void setUseStartTLS(@Nullable final boolean value) {
- useStartTLS = value;
- }
-
- /**
* Get the authentication credential for the LDAP connection.
*
* @return Returns the authnCredential.
diff --git a/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/ldap/impl/LDAPDataConnectorParser.java b/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/ldap/impl/LDAPDataConnectorParser.java
index 4c467cb..6c83887 100644
--- a/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/ldap/impl/LDAPDataConnectorParser.java
+++ b/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/ldap/impl/LDAPDataConnectorParser.java
@@ -294,7 +294,7 @@ public class LDAPDataConnectorParser extends AbstractDataConnectorParser {
connectionConfig.addPropertyValue("responseTimeout", 3000);
}
final BeanDefinitionBuilder sslConfig = BeanDefinitionBuilder.genericBeanDefinition(SslConfig.class);
- sslConfig.addPropertyValue("credentialConfig", createCredentialConfig(parserContext, useStartTLS));
+ sslConfig.addPropertyValue("credentialConfig", createCredentialConfig(parserContext));
connectionConfig.addPropertyValue("sslConfig", sslConfig.getBeanDefinition());
final BeanDefinitionBuilder connectionInitializer =
BeanDefinitionBuilder.genericBeanDefinition(BindConnectionInitializer.class);
@@ -325,19 +325,12 @@ public class LDAPDataConnectorParser extends AbstractDataConnectorParser {
* Read StartTLS trust and authentication credentials.
*
* @param parserContext bean definition parsing context
- * @param useStartTLS the value of useStartTls (if specified)
* @return credential config
*/
- // CheckStyle: CyclomaticComplexity|MethodLength OFF
- @Nonnull protected BeanDefinition createCredentialConfig(@Nonnull final ParserContext parserContext,
- @Nullable final String useStartTLS) {
+ @Nonnull protected BeanDefinition createCredentialConfig(@Nonnull final ParserContext parserContext) {
final BeanDefinitionBuilder result =
BeanDefinitionBuilder.genericBeanDefinition(CredentialConfigFactoryBean.class);
- if (useStartTLS != null) {
- result.addPropertyValue("useStartTLS", useStartTLS);
- }
-
final List<Element> trustElements =
ElementSupport.getChildElementsByTagNameNS(configElement,
AttributeResolverNamespaceHandler.NAMESPACE,
@@ -399,8 +392,7 @@ public class LDAPDataConnectorParser extends AbstractDataConnectorParser {
return result.getBeanDefinition();
}
- // CheckStyle: CyclomaticComplexity|MethodLength ON
-
+
/**
* Get the textual content of the <FilterTemplate>.
*
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list