2016-05-11 02:48:33 +00:00
|
|
|
|
2020-07-20 21:00:52 +00:00
|
|
|
[id="modifying-app_{context}"]
|
|
|
|
= Modifying the {appserver_name} instance
|
2016-05-11 02:48:33 +00:00
|
|
|
|
2020-06-18 01:54:58 +00:00
|
|
|
The {appserver_name} servlet application requires additional configuration before it is secured by {project_name}.
|
2016-05-11 02:48:33 +00:00
|
|
|
|
2020-06-18 01:54:58 +00:00
|
|
|
.Prerequisites
|
|
|
|
|
|
|
|
* You created a client named *vanilla* in the *demo* realm.
|
|
|
|
|
|
|
|
* You saved a template XML file for this client.
|
|
|
|
|
|
|
|
.Procedure
|
|
|
|
|
|
|
|
. Go to the `standalone/configuration` directory in your {appserver_name} root directory.
|
|
|
|
. Open the `standalone.xml` file and search for the following text:
|
2016-12-12 20:20:58 +00:00
|
|
|
+
|
2016-05-11 02:48:33 +00:00
|
|
|
[source,xml]
|
|
|
|
----
|
2016-06-02 10:14:03 +00:00
|
|
|
<subsystem xmlns="urn:jboss:domain:keycloak:1.1"/>
|
2016-05-11 02:48:33 +00:00
|
|
|
----
|
|
|
|
|
2020-06-18 01:54:58 +00:00
|
|
|
. Change the XML entry from self-closing to using a pair of opening and closing tags as shown here:
|
2016-12-12 20:20:58 +00:00
|
|
|
+
|
2016-05-11 02:48:33 +00:00
|
|
|
[source,xml]
|
|
|
|
----
|
2016-06-02 10:14:03 +00:00
|
|
|
<subsystem xmlns="urn:jboss:domain:keycloak:1.1">
|
2016-05-11 02:48:33 +00:00
|
|
|
</subsystem>
|
|
|
|
----
|
|
|
|
|
2020-06-18 01:54:58 +00:00
|
|
|
. Paste the contents of the XML template within the `<subsystem>` element, as shown in this example:
|
2016-12-12 20:20:58 +00:00
|
|
|
+
|
2016-05-11 02:48:33 +00:00
|
|
|
[source,xml]
|
|
|
|
----
|
2016-06-02 10:14:03 +00:00
|
|
|
<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>
|
|
|
|
----
|
|
|
|
|
2020-06-18 01:54:58 +00:00
|
|
|
. Change `WAR MODULE NAME.war` to `vanilla.war`:
|
2016-12-12 20:20:58 +00:00
|
|
|
+
|
2016-05-11 02:48:33 +00:00
|
|
|
[source,xml]
|
|
|
|
----
|
2016-06-02 10:14:03 +00:00
|
|
|
<subsystem xmlns="urn:jboss:domain:keycloak:1.1">
|
2016-05-11 02:48:33 +00:00
|
|
|
<secure-deployment name="vanilla.war">
|
|
|
|
...
|
|
|
|
</subsystem>
|
|
|
|
----
|
|
|
|
|
2018-06-07 07:05:21 +00:00
|
|
|
. Reboot the application server.
|
2016-12-12 20:20:58 +00:00
|
|
|
|