keycloak-scim/getting_started/topics/secure-jboss-app/subsystem.adoc

51 lines
1.6 KiB
Text
Raw Normal View History

2016-05-11 02:48:33 +00:00
=== Configuring the Subsystem
2016-05-11 02:48:33 +00:00
To configure the {appserver_name} instance that the application is deployed on so that this app is secured by {project_name}, complete the following steps.
2016-05-11 02:48:33 +00:00
. Open the `standalone/configuration/standalone.xml` file in the {appserver_name} instance that the application is deployed on and search for the following text:
+
2016-05-11 02:48:33 +00:00
[source,xml]
----
<subsystem xmlns="urn:jboss:domain:keycloak:1.1"/>
2016-05-11 02:48:33 +00:00
----
2020-03-25 12:31:12 +00:00
. Modify this text to prepare the file for pasting in contents from the *Keycloak OIDC JBoss Subsystem XML* template we obtained from {project_name} admin console *Installation* tab by changing the XML entry from self-closing to using a pair of opening and closing tags:
+
2016-05-11 02:48:33 +00:00
[source,xml]
----
<subsystem xmlns="urn:jboss:domain:keycloak:1.1">
2016-05-11 02:48:33 +00:00
</subsystem>
----
. Paste the contents of the template within the `<subsystem>` element, as shown in this example:
+
2016-05-11 02:48:33 +00:00
[source,xml]
----
<subsystem xmlns="urn:jboss:domain:keycloak:1.1">
2016-05-11 02:48:33 +00:00
<secure-deployment name="WAR MODULE NAME.war">
<realm>demo</realm>
<auth-server-url>http://localhost:8180/auth</auth-server-url>
<public-client>true</public-client>
<ssl-required>EXTERNAL</ssl-required>
<resource>vanilla</resource>
</secure-deployment>
</subsystem>
----
. Change the `name` to `vanilla.war`:
+
2016-05-11 02:48:33 +00:00
[source,xml]
----
<subsystem xmlns="urn:jboss:domain:keycloak:1.1">
2016-05-11 02:48:33 +00:00
<secure-deployment name="vanilla.war">
...
</subsystem>
----
. Reboot the application server.
. Go to http://localhost:8080/vanilla and click *Login*. When the {project_name} login page opens, log in using the user you created in <<_create-new-user, Creating a New User>>.
2016-05-11 02:48:33 +00:00