From 5826c034eb6c46ebc732b08a9bd97c5e330f493e Mon Sep 17 00:00:00 2001 From: Marko Strukelj Date: Tue, 26 Jan 2016 17:20:00 +0100 Subject: [PATCH] KEYCLOAK-2315 Remove jboss-earlyaccess-repository repository --- .../as7/KeycloakAdapterConfigService.java | 2 +- .../saml/as7/IdentityProviderAddHandler.java | 9 ++++- .../subsystem/saml/as7/KeyAddHandler.java | 9 ++++- .../saml/as7/KeycloakSubsystemAdd.java | 5 +++ .../saml/as7/KeycloakSubsystemParser.java | 21 ++++++++--- .../saml/as7/SecureDeploymentAddHandler.java | 4 ++ .../saml/as7/ServiceProviderAddHandler.java | 9 ++++- pom.xml | 37 +------------------ 8 files changed, 50 insertions(+), 46 deletions(-) diff --git a/adapters/oidc/as7-eap6/as7-subsystem/src/main/java/org/keycloak/subsystem/as7/KeycloakAdapterConfigService.java b/adapters/oidc/as7-eap6/as7-subsystem/src/main/java/org/keycloak/subsystem/as7/KeycloakAdapterConfigService.java index 9efe15ca39..845da8ed36 100755 --- a/adapters/oidc/as7-eap6/as7-subsystem/src/main/java/org/keycloak/subsystem/as7/KeycloakAdapterConfigService.java +++ b/adapters/oidc/as7-eap6/as7-subsystem/src/main/java/org/keycloak/subsystem/as7/KeycloakAdapterConfigService.java @@ -85,7 +85,7 @@ public final class KeycloakAdapterConfigService { } String credentialName = credentialNameFromOp(operation); - if (!credentialName.contains("")) { + if (!credentialName.contains(".")) { credentials.get(credentialName).set(model.get("value").asString()); } else { String[] parts = credentialName.split("\\."); diff --git a/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/IdentityProviderAddHandler.java b/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/IdentityProviderAddHandler.java index 679658bc3e..1e36ffeba1 100644 --- a/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/IdentityProviderAddHandler.java +++ b/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/IdentityProviderAddHandler.java @@ -17,6 +17,7 @@ package org.keycloak.subsystem.saml.as7; import org.jboss.as.controller.AbstractAddStepHandler; +import org.jboss.as.controller.AttributeDefinition; import org.jboss.as.controller.OperationContext; import org.jboss.as.controller.OperationFailedException; import org.jboss.as.controller.ServiceVerificationHandler; @@ -31,11 +32,17 @@ import java.util.List; class IdentityProviderAddHandler extends AbstractAddStepHandler { IdentityProviderAddHandler() { - super(IdentityProviderDefinition.ALL_ATTRIBUTES); } @Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List> newControllers) throws OperationFailedException { Configuration.INSTANCE.updateModel(operation, model); } + + @Override + protected void populateModel(ModelNode operation, ModelNode model) throws OperationFailedException { + for (AttributeDefinition attr : IdentityProviderDefinition.ALL_ATTRIBUTES) { + attr.validateAndSet(operation, model); + } + } } diff --git a/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/KeyAddHandler.java b/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/KeyAddHandler.java index b362d4f579..204d30b4f4 100644 --- a/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/KeyAddHandler.java +++ b/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/KeyAddHandler.java @@ -17,6 +17,7 @@ package org.keycloak.subsystem.saml.as7; import org.jboss.as.controller.AbstractAddStepHandler; +import org.jboss.as.controller.AttributeDefinition; import org.jboss.as.controller.OperationContext; import org.jboss.as.controller.OperationFailedException; import org.jboss.as.controller.ServiceVerificationHandler; @@ -31,11 +32,17 @@ import java.util.List; class KeyAddHandler extends AbstractAddStepHandler { KeyAddHandler() { - super(KeyDefinition.ALL_ATTRIBUTES); } @Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List> newControllers) throws OperationFailedException { Configuration.INSTANCE.updateModel(operation, model); } + + @Override + protected void populateModel(ModelNode operation, ModelNode model) throws OperationFailedException { + for (AttributeDefinition attr : KeyDefinition.ALL_ATTRIBUTES) { + attr.validateAndSet(operation, model); + } + } } diff --git a/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/KeycloakSubsystemAdd.java b/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/KeycloakSubsystemAdd.java index eda678fe07..a66c79f7d6 100755 --- a/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/KeycloakSubsystemAdd.java +++ b/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/KeycloakSubsystemAdd.java @@ -18,6 +18,7 @@ package org.keycloak.subsystem.saml.as7; import org.jboss.as.controller.AbstractBoottimeAddStepHandler; import org.jboss.as.controller.OperationContext; +import org.jboss.as.controller.OperationFailedException; import org.jboss.as.controller.ServiceVerificationHandler; import org.jboss.as.server.AbstractDeploymentChainStep; import org.jboss.as.server.DeploymentProcessorTarget; @@ -58,4 +59,8 @@ class KeycloakSubsystemAdd extends AbstractBoottimeAddStepHandler { private DeploymentUnitProcessor chooseConfigDeploymentProcessor() { return new KeycloakAdapterConfigDeploymentProcessor(); } + + @Override + protected void populateModel(ModelNode operation, ModelNode model) throws OperationFailedException { + } } diff --git a/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/KeycloakSubsystemParser.java b/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/KeycloakSubsystemParser.java index 0b2cef9130..3a81056a9c 100755 --- a/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/KeycloakSubsystemParser.java +++ b/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/KeycloakSubsystemParser.java @@ -32,11 +32,11 @@ import org.jboss.staxmapper.XMLExtendedStreamWriter; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; -import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.LinkedList; import java.util.List; +import java.util.Set; /** * The subsystem parser, which uses stax to read and write to and from xml @@ -265,7 +265,7 @@ class KeycloakSubsystemParser implements XMLStreamConstants, XMLElementReader
  • asSet(String ... values) { + HashSet ret = new HashSet(); + for (String value: values) { + ret.add(value); + } + return ret; + } } diff --git a/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/SecureDeploymentAddHandler.java b/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/SecureDeploymentAddHandler.java index c5325f6bd9..14e6e3fd41 100644 --- a/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/SecureDeploymentAddHandler.java +++ b/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/SecureDeploymentAddHandler.java @@ -39,4 +39,8 @@ class SecureDeploymentAddHandler extends AbstractAddStepHandler { protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List> newControllers) throws OperationFailedException { Configuration.INSTANCE.updateModel(operation, model); } + + @Override + protected void populateModel(ModelNode operation, ModelNode model) throws OperationFailedException { + } } diff --git a/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/ServiceProviderAddHandler.java b/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/ServiceProviderAddHandler.java index 33d601503b..f8ee1ae6ca 100644 --- a/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/ServiceProviderAddHandler.java +++ b/adapters/saml/as7-eap6/subsystem/src/main/java/org/keycloak/subsystem/saml/as7/ServiceProviderAddHandler.java @@ -17,6 +17,7 @@ package org.keycloak.subsystem.saml.as7; import org.jboss.as.controller.AbstractAddStepHandler; +import org.jboss.as.controller.AttributeDefinition; import org.jboss.as.controller.OperationContext; import org.jboss.as.controller.OperationFailedException; import org.jboss.as.controller.ServiceVerificationHandler; @@ -33,11 +34,17 @@ class ServiceProviderAddHandler extends AbstractAddStepHandler { static final ServiceProviderAddHandler INSTANCE = new ServiceProviderAddHandler(); ServiceProviderAddHandler() { - super(ServiceProviderDefinition.ALL_ATTRIBUTES); } @Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List> newControllers) throws OperationFailedException { Configuration.INSTANCE.updateModel(operation, model); } + + @Override + protected void populateModel(ModelNode operation, ModelNode model) throws OperationFailedException { + for (AttributeDefinition attr : ServiceProviderDefinition.ALL_ATTRIBUTES) { + attr.validateAndSet(operation, model); + } + } } diff --git a/pom.xml b/pom.xml index 567282c281..8a0b8411fb 100644 --- a/pom.xml +++ b/pom.xml @@ -55,8 +55,7 @@ 7.0.0.Beta - - 7.5.0.Final-redhat-15 + 7.2.0.Final 1.0.2.Final 3.2.1 @@ -1332,39 +1331,5 @@ - - - - jboss-earlyaccess-repository - - - !no-jboss-ea-repo - - - - - jboss-earlyaccess-repository - http://maven.repository.redhat.com/earlyaccess/all/ - - true - - - false - - - - - - jboss-earlyaccess-plugin-repository - http://maven.repository.redhat.com/earlyaccess/all/ - - true - - - false - - - -