Skip to content

Commit

Permalink
Merge pull request wildfly-extras#95 from mchoma/elytron
Browse files Browse the repository at this point in the history
fix trust-manager -> trust-managers
  • Loading branch information
mchoma authored May 30, 2017
2 parents 04b2142 + e63e341 commit aaa8d75
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 38 deletions.
2 changes: 1 addition & 1 deletion commands/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.wildfly.extras.creaper</groupId>
<artifactId>creaper-parent</artifactId>
<version>1.5.1-elytron.DR18-SNAPSHOT</version>
<version>1.5.1-elytron.DR19.1</version>
</parent>

<artifactId>creaper-commands</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@ def keyManagerDefinition = {

def isExistingTls = elytronSubsystem.'tls'.any { it.name() == 'tls' }
if (! isExistingTls) {
elytronSubsystem.appendNode { 'tls' { 'key-manager' keyManagerDefinition } }
elytronSubsystem.appendNode { 'tls' { 'key-managers' keyManagerDefinition } }
return
}

def isExistingKeyManager = elytronSubsystem.'tls'.'key-manager'.any { it.name() == 'key-manager' }
if (! isExistingKeyManager) {
elytronSubsystem.'tls'.appendNode { 'key-manager' keyManagerDefinition }
def isExistingKeyManagers = elytronSubsystem.'tls'.'key-managers'.any { it.name() == 'key-managers' }
if (! isExistingKeyManagers) {
elytronSubsystem.'tls'.appendNode { 'key-managers' keyManagerDefinition }
return
}

def existingKeyManager = elytronSubsystem.'tls'.'key-manager'.'key-manager'.find { it.'@name' == atrName }
def existingKeyManager = elytronSubsystem.'tls'.'key-managers'.'key-manager'.find { it.'@name' == atrName }
if (existingKeyManager && !atrReplaceExisting) {
throw new IllegalStateException("KeyManager with name $atrName already exists in configuration. Use different name.")
} else {
if (existingKeyManager) {
existingKeyManager.replaceNode keyManagerDefinition
} else {
elytronSubsystem.'tls'.'key-manager'.appendNode keyManagerDefinition
elytronSubsystem.'tls'.'key-managers'.appendNode keyManagerDefinition
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ def trustManagerDefinition = {

def isExistingTls = elytronSubsystem.'tls'.any { it.name() == 'tls' }
if (! isExistingTls) {
elytronSubsystem.appendNode { 'tls' { 'trust-manager' trustManagerDefinition } }
elytronSubsystem.appendNode { 'tls' { 'trust-managers' trustManagerDefinition } }
return
}

def isExistingTrustManager = elytronSubsystem.'tls'.'trust-manager'.any { it.name() == 'trust-manager' }
if (! isExistingTrustManager) {
elytronSubsystem.'tls'.appendNode { 'trust-manager' trustManagerDefinition }
def isExistingTrustManagers = elytronSubsystem.'tls'.'trust-managers'.any { it.name() == 'trust-managers' }
if (! isExistingTrustManagers) {
elytronSubsystem.'tls'.appendNode { 'trust-managers' trustManagerDefinition }
return
}

def existingTrustManager = elytronSubsystem.'tls'.'trust-manager'.'trust-manager'.find { it.'@name' == atrName }
def existingTrustManager = elytronSubsystem.'tls'.'trust-managers'.'trust-manager'.find { it.'@name' == atrName }
if (existingTrustManager && !atrReplaceExisting) {
throw new IllegalStateException("TrustManager with name $atrName already exists in configuration. Use different name.")
} else {
if (existingTrustManager) {
existingTrustManager.replaceNode trustManagerDefinition
} else {
elytronSubsystem.'tls'.'trust-manager'.appendNode trustManagerDefinition
elytronSubsystem.'tls'.'trust-managers'.appendNode trustManagerDefinition
}
}
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.wildfly.extras.creaper</groupId>
<artifactId>creaper-parent</artifactId>
<version>1.5.1-elytron.DR18-SNAPSHOT</version>
<version>1.5.1-elytron.DR19.1</version>
</parent>

<artifactId>creaper-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.wildfly.extras.creaper</groupId>
<artifactId>creaper-parent</artifactId>
<version>1.5.1-elytron.DR18-SNAPSHOT</version>
<version>1.5.1-elytron.DR19.1</version>
<packaging>pom</packaging>

<name>Creaper: Parent</name>
Expand Down
2 changes: 1 addition & 1 deletion testsuite/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.wildfly.extras.creaper</groupId>
<artifactId>creaper-testsuite</artifactId>
<version>1.5.1-elytron.DR18-SNAPSHOT</version>
<version>1.5.1-elytron.DR19.1</version>
</parent>

<artifactId>creaper-testsuite-common</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion testsuite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.wildfly.extras.creaper</groupId>
<artifactId>creaper-parent</artifactId>
<version>1.5.1-elytron.DR18-SNAPSHOT</version>
<version>1.5.1-elytron.DR19.1</version>
</parent>

<artifactId>creaper-testsuite</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion testsuite/standalone/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.wildfly.extras.creaper</groupId>
<artifactId>creaper-testsuite</artifactId>
<version>1.5.1-elytron.DR18-SNAPSHOT</version>
<version>1.5.1-elytron.DR19.1</version>
</parent>

<artifactId>creaper-testsuite-standalone</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

import java.util.Arrays;
import java.util.List;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.wildfly.extras.creaper.commands.elytron.AbstractElytronOnlineTest;
import org.wildfly.extras.creaper.core.online.OnlineManagementClient;
import org.wildfly.extras.creaper.core.online.operations.Address;
import org.wildfly.extras.creaper.core.online.operations.Operations;
import org.wildfly.extras.creaper.core.online.operations.admin.Administration;

public class AbstractAddPrincipalDecoderOnlineTest extends AbstractElytronOnlineTest {

Expand Down Expand Up @@ -54,6 +56,7 @@ public static void removePrincipalDecoders() throws Exception {
ops.removeIfExists(TEST_CONSTANT_PRINCIPAL_DECODER_ADDRESS);
ops.removeIfExists(TEST_CONSTANT_PRINCIPAL_DECODER_ADDRESS2);
ops.removeIfExists(TEST_DIFFERENT_PRINCIPAL_DECODER_ADDRESS);
new Administration(client).reloadIfRequired();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public class AddKeyManagerOfflineTest {
+ " <profile>\n"
+ " <subsystem xmlns=\"urn:wildfly:elytron:1.0\">\n"
+ " <tls>\n"
+ " <key-manager>\n"
+ " </key-manager>\n"
+ " <key-managers>\n"
+ " </key-managers>\n"
+ " </tls>\n"
+ " </subsystem>\n"
+ " </profile>\n"
Expand All @@ -56,11 +56,11 @@ public class AddKeyManagerOfflineTest {
+ " <profile>\n"
+ " <subsystem xmlns=\"urn:wildfly:elytron:1.0\">\n"
+ " <tls>\n"
+ " <key-manager>\n"
+ " <key-managers>\n"
+ " <key-manager name=\"creaperKeyManager\" algorithm=\"SunX509\">\n"
+ " <credential-reference clear-text=\"secret\"/>\n"
+ " </key-manager>\n"
+ " </key-manager>\n"
+ " </key-managers>\n"
+ " </tls>\n"
+ " </subsystem>\n"
+ " </profile>\n"
Expand All @@ -71,11 +71,11 @@ public class AddKeyManagerOfflineTest {
+ " <profile>\n"
+ " <subsystem xmlns=\"urn:wildfly:elytron:1.0\">\n"
+ " <tls>\n"
+ " <key-manager>\n"
+ " <key-managers>\n"
+ " <key-manager name=\"creaperKeyManager\" algorithm=\"SunX509\">\n"
+ " <credential-reference clear-text=\"secret2\"/>\n"
+ " </key-manager>\n"
+ " </key-manager>\n"
+ " </key-managers>\n"
+ " </tls>\n"
+ " </subsystem>\n"
+ " </profile>\n"
Expand All @@ -86,14 +86,14 @@ public class AddKeyManagerOfflineTest {
+ " <profile>\n"
+ " <subsystem xmlns=\"urn:wildfly:elytron:1.0\">\n"
+ " <tls>\n"
+ " <key-manager>\n"
+ " <key-managers>\n"
+ " <key-manager name=\"creaperKeyManager\" algorithm=\"SunX509\">\n"
+ " <credential-reference clear-text=\"secret\"/>\n"
+ " </key-manager>\n"
+ " <key-manager name=\"creaperKeyManager2\" algorithm=\"SunX509\">\n"
+ " <credential-reference clear-text=\"secret\"/>\n"
+ " </key-manager>\n"
+ " </key-manager>\n"
+ " </key-managers>\n"
+ " </tls>\n"
+ " </subsystem>\n"
+ " </profile>\n"
Expand All @@ -104,12 +104,12 @@ public class AddKeyManagerOfflineTest {
+ " <profile>\n"
+ " <subsystem xmlns=\"urn:wildfly:elytron:1.0\">\n"
+ " <tls>\n"
+ " <key-manager>\n"
+ " <key-managers>\n"
+ " <key-manager name=\"creaperKeyManager\" algorithm=\"SunX509\" key-store=\"creaperKeyStore\" "
+ " provider-name=\"ksProvider\" providers=\"ksProviderLoader\" alias-filter=\"aliasInFilter\">\n"
+ " <credential-reference alias=\"crAlias\" type=\"crType\" store=\"crStore\" clear-text=\"secret\" />\n"
+ " </key-manager>\n"
+ " </key-manager>\n"
+ " </key-managers>\n"
+ " </tls>\n"
+ " </subsystem>\n"
+ " </profile>\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public class AddTrustManagerOfflineTest {
+ " <profile>\n"
+ " <subsystem xmlns=\"urn:wildfly:elytron:1.0\">\n"
+ " <tls>\n"
+ " <trust-manager>\n"
+ " </trust-manager>\n"
+ " <trust-managers>\n"
+ " </trust-managers>\n"
+ " </tls>\n"
+ " </subsystem>\n"
+ " </profile>\n"
Expand All @@ -56,9 +56,9 @@ public class AddTrustManagerOfflineTest {
+ " <profile>\n"
+ " <subsystem xmlns=\"urn:wildfly:elytron:1.0\">\n"
+ " <tls>\n"
+ " <trust-manager>\n"
+ " <trust-managers>\n"
+ " <trust-manager name=\"creaperTrustManager\" algorithm=\"SunX509\"/>\n"
+ " </trust-manager>\n"
+ " </trust-managers>\n"
+ " </tls>\n"
+ " </subsystem>\n"
+ " </profile>\n"
Expand All @@ -69,9 +69,9 @@ public class AddTrustManagerOfflineTest {
+ " <profile>\n"
+ " <subsystem xmlns=\"urn:wildfly:elytron:1.0\">\n"
+ " <tls>\n"
+ " <trust-manager>\n"
+ " <trust-managers>\n"
+ " <trust-manager name=\"creaperTrustManager\" algorithm=\"SunX509-2\"/>\n"
+ " </trust-manager>\n"
+ " </trust-managers>\n"
+ " </tls>\n"
+ " </subsystem>\n"
+ " </profile>\n"
Expand All @@ -82,10 +82,10 @@ public class AddTrustManagerOfflineTest {
+ " <profile>\n"
+ " <subsystem xmlns=\"urn:wildfly:elytron:1.0\">\n"
+ " <tls>\n"
+ " <trust-manager>\n"
+ " <trust-managers>\n"
+ " <trust-manager name=\"creaperTrustManager\" algorithm=\"SunX509\"/>\n"
+ " <trust-manager name=\"creaperTrustManager2\" algorithm=\"SunX509\"/>\n"
+ " </trust-manager>\n"
+ " </trust-managers>\n"
+ " </tls>\n"
+ " </subsystem>\n"
+ " </profile>\n"
Expand All @@ -96,12 +96,12 @@ public class AddTrustManagerOfflineTest {
+ " <profile>\n"
+ " <subsystem xmlns=\"urn:wildfly:elytron:1.0\">\n"
+ " <tls>\n"
+ " <trust-manager>\n"
+ " <trust-managers>\n"
+ " <trust-manager name=\"creaperTrustManager\" algorithm=\"SunX509\" key-store=\"creaperKeyStore\" "
+ " provider-name=\"ksProvider\" providers=\"ksProviderLoader\" alias-filter=\"aliasInFilter\">\n"
+ " <certificate-revocation-list path=\"path\" relative-to=\"relativeTo\" maximum-cert-path=\"3\"/>\n"
+ " </trust-manager>\n"
+ " </trust-manager>\n"
+ " </trust-managers>\n"
+ " </tls>\n"
+ " </subsystem>\n"
+ " </profile>\n"
Expand Down

0 comments on commit aaa8d75

Please sign in to comment.