Skip to content

Commit 9476e5a

Browse files
committed
SWITCHYARD-2602 Update quickstarts demos that use jboss-as-web to deploy in wildfly
1 parent d1cd03f commit 9476e5a

File tree

21 files changed

+290
-21
lines changed

21 files changed

+290
-21
lines changed

Diff for: demos/policy-security-basic/Readme.md

+38-3
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ SSL is used for "confidentiality", and Basic Authentication is used for "clientA
88
Running the quickstart
99
======================
1010

11-
JBoss AS 7
12-
----------
11+
EAP
12+
--------
1313

1414
1. Create an application user:
1515

16-
${AS}/bin/add-user.sh --user kermit --password the-frog-1 --realm ApplicationRealm --group friend
16+
${AS}/bin/add-user.sh
17+
18+
realm=ApplicationRealm Username=kermit Password=the-frog-1 group=friend
1719

1820
2. Start JBoss AS in standalone mode:
1921

@@ -56,6 +58,39 @@ org.ops4j.pax.web.ssl.clientauthneeded=false
5658

5759
4. When executing the test (as directed below), add the following system property: -Dorg.switchyard.component.soap.client.port=8183
5860

61+
62+
Wildfly
63+
----------
64+
65+
66+
1. Create an application user:
67+
68+
${WILDFLY}/bin/add-user.sh
69+
70+
realm=ApplicationRealm Username=kermit Password=the-frog-1 group=friend
71+
72+
2. Start Wildfly in standalone mode :
73+
74+
${WILDFLY}/bin/standalone.sh
75+
76+
3. Build and deploy the demo :
77+
78+
mvn install -Pdeploy -Pwildfly
79+
80+
4. Execute the test. (See "Options" section below.)
81+
82+
5. Check the server console for output from the service.
83+
84+
6. Undeploy the application
85+
86+
mvn clean -Pdeploy -Pwildfly
87+
88+
Warning --> Wildfly 8.0.0 When the application is undeployed, it is required to restart the server to get all the undeployment changes done.
89+
90+
91+
92+
93+
5994
Options
6095
=======
6196

Diff for: demos/policy-security-basic/config_wildfly.cli

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
if (outcome != success) of /subsystem=undertow/server=default-server/https-listener=https/:read-resource
2+
/core-service=management/security-realm=https:add()
3+
/core-service=management/security-realm=https/server-identity=ssl:add(keystore-path=${jboss.home.dir}/quickstarts/demos/policy-security-basic/connector.jks, keystore-password=changeit)
4+
/subsystem=undertow/server=default-server/https-listener=https:add(socket-binding=https, security-realm=https)
5+
end-if

Diff for: demos/policy-security-basic/pom.xml

+6-2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
<version.enforcer.maven>1.3.1</version.enforcer.maven>
6262
<version.felix.maven>2.4.0</version.felix.maven>
6363
<version.wildfly.maven>1.0.2.Final</version.wildfly.maven>
64+
<config.file>config.cli</config.file>
65+
<unconfig.file>unconfig.cli</unconfig.file>
6466
</properties>
6567
<dependencyManagement>
6668
<dependencies>
@@ -181,7 +183,7 @@
181183
<configuration>
182184
<beforeDeployment>
183185
<scripts>
184-
<script>config.cli</script>
186+
<script>${config.file}</script>
185187
</scripts>
186188
</beforeDeployment>
187189
<filename>${project.build.finalName}.jar</filename>
@@ -197,7 +199,7 @@
197199
<configuration>
198200
<afterDeployment>
199201
<scripts>
200-
<script>unconfig.cli</script>
202+
<script>${unconfig.file}</script>
201203
</scripts>
202204
</afterDeployment>
203205
<filename>${project.build.finalName}.jar</filename>
@@ -242,6 +244,8 @@
242244
<profile>
243245
<id>wildfly</id>
244246
<properties>
247+
<config.file>config_wildfly.cli</config.file>
248+
<unconfig.file>unconfig_wildfly.cli</unconfig.file>
245249
<wildfly.port>9990</wildfly.port>
246250
</properties>
247251
</profile>

Diff for: demos/policy-security-basic/unconfig_wildfly.cli

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
if (outcome == success) of /subsystem=undertow/server=default-server/https-listener=https/:read-resource
2+
/subsystem=undertow/server=default-server/https-listener=https/:remove
3+
/core-service=management/security-realm=https/:remove
4+
end-if

Diff for: demos/policy-security-cert/Readme.md

+27
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,33 @@ org.ops4j.pax.web.ssl.clientauthneeded=false
4545

4646
3. When executing the test (as directed below), add the following system property: -Dorg.switchyard.component.soap.client.port=8183
4747

48+
49+
Wildfly
50+
----------
51+
52+
53+
1. Start Wildfly in standalone mode :
54+
55+
${WILDFLY}/bin/standalone.sh
56+
57+
2. Build and deploy the demo :
58+
59+
mvn install -Pdeploy -Pwildfly
60+
61+
3. Execute the test. (See "Options" section below.)
62+
63+
4. Check the server console for output from the service.
64+
65+
5. Undeploy the application
66+
67+
mvn clean -Pdeploy -Pwildfly
68+
69+
Warning --> Wildfly 8.0.0 When the application is undeployed, it is required to restart the server to get all the undeployment changes done.
70+
71+
72+
73+
74+
4875
Options
4976
=======
5077

Diff for: demos/policy-security-cert/config_wildfly.cli

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
if (outcome != success) of /subsystem=undertow/server=default-server/https-listener=https/:read-resource
2+
/core-service=management/security-realm=https:add()
3+
/core-service=management/security-realm=https/server-identity=ssl:add(keystore-path=${jboss.home.dir}/quickstarts/demos/policy-security-cert/connector.jks, keystore-password=changeit)
4+
/subsystem=undertow/server=default-server/https-listener=https:add(socket-binding=https, security-realm=https)
5+
end-if
6+
if (outcome != success) of /subsystem=security/security-domain=policy-security-cert:read-resource
7+
/subsystem=security/security-domain=policy-security-cert:add(cache-type=default)
8+
/subsystem=security/security-domain=policy-security-cert/authentication=classic:add(login-modules=[{"code"=>"org.switchyard.security.login.CertificateLoginModule", "flag"=>"required", "module-options"=>[("keyStoreLocation"=>"${jboss.home.dir}/quickstarts/demos/policy-security-cert/users.jks"),("keyStorePassword"=>"changeit"),("rolesProperties"=>"${jboss.home.dir}/quickstarts/demos/policy-security-cert/roles.properties")] }] )
9+
end-if

Diff for: demos/policy-security-cert/pom.xml

+6-2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
<version.enforcer.maven>1.3.1</version.enforcer.maven>
6262
<version.felix.maven>2.4.0</version.felix.maven>
6363
<version.wildfly.maven>1.0.2.Final</version.wildfly.maven>
64+
<config.file>config.cli</config.file>
65+
<unconfig.file>unconfig.cli</unconfig.file>
6466
</properties>
6567
<dependencyManagement>
6668
<dependencies>
@@ -181,7 +183,7 @@
181183
<configuration>
182184
<beforeDeployment>
183185
<scripts>
184-
<script>config.cli</script>
186+
<script>${config.file}</script>
185187
</scripts>
186188
</beforeDeployment>
187189
<filename>${project.build.finalName}.jar</filename>
@@ -197,7 +199,7 @@
197199
<configuration>
198200
<afterDeployment>
199201
<scripts>
200-
<script>unconfig.cli</script>
202+
<script>${unconfig.file}</script>
201203
</scripts>
202204
</afterDeployment>
203205
<filename>${project.build.finalName}.jar</filename>
@@ -243,6 +245,8 @@
243245
<id>wildfly</id>
244246
<properties>
245247
<wildfly.port>9990</wildfly.port>
248+
<config.file>config_wildfly.cli</config.file>
249+
<unconfig.file>unconfig_wildfly.cli</unconfig.file>
246250
</properties>
247251
</profile>
248252
</profiles>

Diff for: demos/policy-security-cert/unconfig_wildfly.cli

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
if (outcome == success) of /subsystem=undertow/server=default-server/https-listener=https/:read-resource
2+
/subsystem=undertow/server=default-server/https-listener=https/:remove
3+
/core-service=management/security-realm=https/:remove
4+
end-if
5+
if (outcome == success) of /subsystem=security/security-domain=policy-security-cert:read-resource
6+
/subsystem=security/security-domain=policy-security-cert:remove
7+
end-if

Diff for: demos/policy-security-saml/Readme.md

+28-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ SSL is used for "confidentiality", and SAML Assertion is used for "clientAuthent
88
Running the quickstart
99
======================
1010

11-
1. Start JBoss AS in standalone mode:
11+
EAP
12+
----------
13+
1. Start JBoss EAP in standalone mode:
1214

1315
${AS}/bin/standalone.sh
1416

@@ -25,6 +27,31 @@ Running the quickstart
2527
mvn clean -Pdeploy
2628

2729

30+
31+
Wildfly
32+
----------
33+
34+
35+
1. Start Wildfly in standalone mode :
36+
37+
${WILDFLY}/bin/standalone.sh
38+
39+
2. Build and deploy the demo :
40+
41+
mvn install -Pdeploy -Pwildfly
42+
43+
3. Execute the test. (See "Options" section below.)
44+
45+
4. Check the server console for output from the service.
46+
47+
5. Undeploy the application
48+
49+
mvn clean -Pdeploy -Pwildfly
50+
51+
Warning --> Wildfly 8.0.0 When the application is undeployed, it is required to restart the server to get all the undeployment changes done.
52+
53+
54+
2855
Options
2956
=======
3057

Diff for: demos/policy-security-saml/config_wildfly.cli

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
if (outcome != success) of /subsystem=undertow/server=default-server/https-listener=https/:read-resource
2+
/core-service=management/security-realm=https:add()
3+
/core-service=management/security-realm=https/server-identity=ssl:add(keystore-path=${jboss.home.dir}/quickstarts/demos/policy-security-saml/connector.jks, keystore-password=changeit)
4+
/subsystem=undertow/server=default-server/https-listener=https:add(socket-binding=https, security-realm=https)
5+
end-if
6+
if (outcome != success) of /subsystem=security/security-domain=picketlink-sts:read-resource
7+
/subsystem=security/security-domain=picketlink-sts:add(cache-type=default)
8+
/subsystem=security/security-domain=picketlink-sts/authentication=classic:add(login-modules=[{"code"=>"UsersRoles", "flag"=>"required", "module-options"=>[("usersProperties"=>"users.properties"),("rolesProperties"=>"roles.properties")] }] )
9+
end-if
10+
if (outcome != success) of /subsystem=security/security-domain=saml-validate-token:read-resource
11+
/subsystem=security/security-domain=saml-validate-token:add(cache-type=default)
12+
/subsystem=security/security-domain=saml-validate-token/authentication=classic:add(login-modules=[{"code"=>"org.picketlink.identity.federation.core.wstrust.auth.STSValidatingLoginModule", "flag"=>"required", "module-options"=>[("configFile"=>"${jboss.home.dir}/quickstarts/demos/policy-security-saml/sts-client.properties"),("useOptionsCredentials"=>"true")] }] )
13+
end-if

Diff for: demos/policy-security-saml/pom.xml

+6-2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
<version.enforcer.maven>1.3.1</version.enforcer.maven>
6262
<version.felix.maven>2.4.0</version.felix.maven>
6363
<version.wildfly.maven>1.0.2.Final</version.wildfly.maven>
64+
<config.file>config.cli</config.file>
65+
<unconfig.file>unconfig.cli</unconfig.file>
6466
</properties>
6567
<dependencyManagement>
6668
<dependencies>
@@ -186,7 +188,7 @@
186188
<configuration>
187189
<beforeDeployment>
188190
<scripts>
189-
<script>config.cli</script>
191+
<script>${config.file}</script>
190192
</scripts>
191193
</beforeDeployment>
192194
<filename>${project.build.finalName}.jar</filename>
@@ -213,7 +215,7 @@
213215
<configuration>
214216
<afterDeployment>
215217
<scripts>
216-
<script>unconfig.cli</script>
218+
<script>${unconfig.file}</script>
217219
</scripts>
218220
</afterDeployment>
219221
<filename>${project.build.finalName}.jar</filename>
@@ -270,6 +272,8 @@
270272
<id>wildfly</id>
271273
<properties>
272274
<wildfly.port>9990</wildfly.port>
275+
<config.file>config_wildfly.cli</config.file>
276+
<unconfig.file>unconfig_wildfly.cli</unconfig.file>
273277
</properties>
274278
</profile>
275279
</profiles>

Diff for: demos/policy-security-saml/unconfig_wildfly.cli

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
if (outcome == success) of /subsystem=undertow/server=default-server/https-listener=https/:read-resource
2+
/subsystem=undertow/server=default-server/https-listener=https/:remove
3+
/core-service=management/security-realm=https/:remove
4+
end-if
5+
if (outcome == success) of /subsystem=security/security-domain=picketlink-sts:read-resource
6+
/subsystem=security/security-domain=picketlink-sts:remove
7+
end-if
8+
if (outcome == success) of /subsystem=security/security-domain=saml-validate-token:read-resource
9+
/subsystem=security/security-domain=saml-validate-token:remove
10+
end-if

Diff for: demos/policy-security-wss-signencrypt/Readme.md

+29-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ of the SOAP message.
99
Running the quickstart
1010
======================
1111

12-
1. Start JBoss AS in standalone mode:
12+
13+
EAP
14+
----------
15+
16+
1. Start JBoss EAP in standalone mode:
1317

1418
${AS}/bin/standalone.sh
1519

@@ -26,6 +30,30 @@ Running the quickstart
2630
mvn clean -Pdeploy
2731

2832

33+
Wildfly
34+
----------
35+
36+
37+
1. Start Wildfly in standalone mode :
38+
39+
${WILDFLY}/bin/standalone.sh
40+
41+
2. Build and deploy the demo :
42+
43+
mvn install -Pdeploy -Pwildfly
44+
45+
3. Execute the test. (See "Options" section below.)
46+
47+
4. Check the server console for output from the service.
48+
49+
5. Undeploy the application
50+
51+
mvn clean -Pdeploy -Pwildfly
52+
53+
Warning --> Wildfly 8.0.0 When the application is undeployed, it is required to restart the server to get all the undeployment changes done.
54+
55+
56+
2957
Options
3058
=======
3159

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
if (outcome != success) of /subsystem=undertow/server=default-server/https-listener=https/:read-resource
2+
/core-service=management/security-realm=https:add()
3+
/core-service=management/security-realm=https/server-identity=ssl:add(keystore-path=${jboss.home.dir}/quickstarts/demos/policy-security-wss-signencrypt/connector.jks, keystore-password=changeit)
4+
/subsystem=undertow/server=default-server/https-listener=https:add(socket-binding=https, security-realm=https)
5+
end-if

Diff for: demos/policy-security-wss-signencrypt/pom.xml

+6-2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
<version.enforcer.maven>1.3.1</version.enforcer.maven>
6262
<version.felix.maven>2.4.0</version.felix.maven>
6363
<version.wildfly.maven>1.0.2.Final</version.wildfly.maven>
64+
<config.file>config.cli</config.file>
65+
<unconfig.file>unconfig.cli</unconfig.file>
6466
</properties>
6567
<dependencyManagement>
6668
<dependencies>
@@ -186,7 +188,7 @@
186188
<configuration>
187189
<beforeDeployment>
188190
<scripts>
189-
<script>config.cli</script>
191+
<script>${config.file}</script>
190192
</scripts>
191193
</beforeDeployment>
192194
<filename>${project.build.finalName}.jar</filename>
@@ -202,7 +204,7 @@
202204
<configuration>
203205
<afterDeployment>
204206
<scripts>
205-
<script>unconfig.cli</script>
207+
<script>${unconfig.file}</script>
206208
</scripts>
207209
</afterDeployment>
208210
<filename>${project.build.finalName}.jar</filename>
@@ -248,6 +250,8 @@
248250
<id>wildfly</id>
249251
<properties>
250252
<wildfly.port>9990</wildfly.port>
253+
<config.file>config_wildfly.cli</config.file>
254+
<unconfig.file>unconfig_wildfly.cli</unconfig.file>
251255
</properties>
252256
</profile>
253257
</profiles>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
if (outcome == success) of /subsystem=undertow/server=default-server/https-listener=https/:read-resource
2+
/subsystem=undertow/server=default-server/https-listener=https/:remove
3+
/core-service=management/security-realm=https/:remove
4+
end-if

0 commit comments

Comments
 (0)