Skip to content

Commit

Permalink
Deployment fix for Jakarta QS
Browse files Browse the repository at this point in the history
Fixed documentation for Jakarta Quickstarts: realm import, OIDC
integration in Wildfly, project requirements, URLs.

Updated outdated dependency for wildfly maven plugin.
  • Loading branch information
vaceksimon committed Aug 1, 2023
1 parent 498d10e commit 7a64258
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 22 deletions.
22 changes: 13 additions & 9 deletions jakarta/jaxrs-resource-server/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
jakarta-jaxrs-resource-server: JAX-RS Resource Server
===================================================

Level: Beginner
Technologies: Jakarta EE
Summary: A JAX-RS resource server protected with Wildfly Elytron OIDC
Level: Beginner \
Technologies: Jakarta EE \
Summary: A JAX-RS resource server protected with Wildfly Elytron OIDC\
Target Product: <span>Keycloak</span>, <span>WildFly</span>

What is it?
Expand All @@ -30,7 +30,7 @@ Starting and Configuring the Keycloak Server
To start a Keycloak Server you can use OpenJDK on Bare Metal, Docker, Openshift or any other option described in [Keycloak Getting Started guides]https://www.keycloak.org/guides#getting-started. For example when using Docker just run the following command in the root directory of this quickstart:

```shell
docker run --name keycloak \
docker run --name keycloak \
-e KEYCLOAK_ADMIN=admin \
-e KEYCLOAK_ADMIN_PASSWORD=admin \
--network=host \
Expand All @@ -45,8 +45,10 @@ You should be able to access your Keycloak Server at http://localhost:8180.

Log in as the admin user to access the Keycloak Administration Console. Username should be `admin` and password `admin`.

Import the [realm configuration file](config/realm-import.json) to create a new realm called `quickstart`.
For more details, see the Keycloak documentation about how to [create a new realm](https://www.keycloak.org/docs/latest/server_admin/index.html#_create-realm).
Import the [realm configuration file](config/realm-import.json) to create a new realm called `quickstart`. The easiest way to do this is using the gui. After you click on `Create Realm`, you have the option to choose a Resource JSON file.

You can also import the realm with cli.
For more details, see the Keycloak documentation about how to [import a realm using cli](https://www.keycloak.org/docs/latest/server_admin/index.html#importing-a-realm-from-exported-json-file) and [create a new realm](https://www.keycloak.org/docs/latest/server_admin/index.html#proc-creating-a-realm_server_administration_guide).

Starting the Wildfly Server
-------------------
Expand All @@ -55,6 +57,8 @@ In order to deploy the example application, you need a Wildfly Server up and run

Make sure the server is accessible from `localhost` and listening on port `8080`.

> You no longer need the Keycloak OIDC Client Adapter anymore as `elytron-oidc-client` subsystem has been added to Wildfly 25
Build and Deploy the Quickstart
-------------------------------

Expand All @@ -71,9 +75,9 @@ Access the Quickstart

There are 3 endpoints exposed by the service:

* http://localhost:8080/service/public - requires no authentication
* http://localhost:8080/service/secured - can be invoked by users with the `user` role
* http://localhost:8080/service/admin - can be invoked by users with the `admin` role
* http://localhost:8080/jakarta-jaxrs-resource-server/public - requires no authentication
* http://localhost:8080/jakarta-jaxrs-resource-server/secured - can be invoked by users with the `user` role
* http://localhost:8080/jakarta-jaxrs-resource-server/admin - can be invoked by users with the `admin` role

You can open the public endpoint directly in the browser to test the service. The two other endpoints are protected and require
invoking them with a bearer token.
Expand Down
14 changes: 9 additions & 5 deletions jakarta/servlet-authz-client/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
jakarta-servlet-authz-client: Servlet Application Using Fine-grained Authorization
================================================

Level: Beginner
Technologies: Jakarta EE
Summary: Servlet application protected with Elytron OIDC and Keycloak Authorization Services
Level: Beginner \
Technologies: Jakarta EE \
Summary: Servlet application protected with Elytron OIDC and Keycloak Authorization Services \
Target Product: <span>Keycloak</span>, <span>WildFly</span>

What is it?
Expand Down Expand Up @@ -58,8 +58,10 @@ You should be able to access your Keycloak Server at http://localhost:8180.

Log in as the admin user to access the Keycloak Administration Console. Username should be `admin` and password `admin`.

Import the [realm configuration file](config/realm-import.json) to create a new realm called `quickstart`.
For more details, see the Keycloak documentation about how to [create a new realm](https://www.keycloak.org/docs/latest/server_admin/index.html#_create-realm).
Import the [realm configuration file](config/realm-import.json) to create a new realm called `quickstart`. The easiest way to do this is using the gui. After you click on `Create Realm`, you have the option to choose a Resource JSON file.

You can also import the realm with cli.
For more details, see the Keycloak documentation about how to [import a realm using cli](https://www.keycloak.org/docs/latest/server_admin/index.html#importing-a-realm-from-exported-json-file) and [create a new realm](https://www.keycloak.org/docs/latest/server_admin/index.html#proc-creating-a-realm_server_administration_guide).

Starting the Wildfly Server
-------------------
Expand All @@ -68,6 +70,8 @@ In order to deploy the example application, you need a Wildfly Server up and run

Make sure the server is accessible from `localhost` and listening on port `8080`.

> You no longer need the Keycloak OIDC Client Adapter anymore as `elytron-oidc-client` subsystem has been added to Wildfly 25
Build and Deploy the Quickstart
-------------------------------

Expand Down
25 changes: 18 additions & 7 deletions jakarta/servlet-saml-service-provider/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
servlet-saml-service-provider: Servlet SAML Service Provider
=============================================================

Level: Beginner
Technologies: JavaEE
Summary: JSP Profile Application
Level: Beginner \
Technologies: JavaEE \
Summary: JSP Profile Application \
Target Product: <span>Keycloak</span>, <span>WildFly</span>

What is it?
Expand All @@ -17,9 +17,9 @@ System Requirements

To compile and run this quickstart you will need:

* JDK 11
* JDK 17
* Apache Maven 3.8.6
* Wildfly 28+
* Wildfly <= 23
* Keycloak 21+
* Docker 20+

Expand All @@ -44,8 +44,10 @@ You should be able to access your Keycloak Server at http://localhost:8180.

Log in as the admin user to access the Keycloak Administration Console. Username should be `admin` and password `admin`.

Import the [realm configuration file](config/realm-import.json) to create a new realm called `quickstart`.
For more details, see the Keycloak documentation about how to [create a new realm](https://www.keycloak.org/docs/latest/server_admin/index.html#_create-realm).
Import the [realm configuration file](config/realm-import.json) to create a new realm called `quickstart`. The easiest way to do this is using the gui. After you click on `Create Realm`, you have the option to choose a Resource JSON file.

You can also import the realm with cli.
For more details, see the Keycloak documentation about how to [import a realm using cli](https://www.keycloak.org/docs/latest/server_admin/index.html#importing-a-realm-from-exported-json-file) and [create a new realm](https://www.keycloak.org/docs/latest/server_admin/index.html#proc-creating-a-realm_server_administration_guide).

Starting the Wildfly Server
-------------------
Expand All @@ -54,6 +56,15 @@ In order to deploy the example application, you need a Wildfly Server up and run

Make sure the server is accessible from `localhost` and listening on port `8080`.

Installing the SAML 2.0 Wildfly Adapter
-----------------------------------

Install the WildFly SAML 2.0 Client Adapter following [this guide](https://www.keycloak.org/docs/latest/securing_apps/index.html#_saml-jboss-adapter-installation).

> Please consider the supported WildFly version for this adapter


Build and Deploy the Quickstart
-------------------------------

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<version.jee.jaxb.api>2.3.1</version.jee.jaxb.api>

<arquillian-managed>true</arquillian-managed>
<version.wildfly.maven.plugin>1.2.2.Final</version.wildfly.maven.plugin>
<version.wildfly.maven.plugin>4.1.1.Final</version.wildfly.maven.plugin>
<jboss-cli.executable>./jboss-cli.sh</jboss-cli.executable>
<keycloak.management.port>10090</keycloak.management.port>
<selenium-bom.version>3.11.0</selenium-bom.version>
Expand Down

0 comments on commit 7a64258

Please sign in to comment.