Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checklist edits #6836

Merged
merged 1 commit into from
Aug 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions modules/reference/pages/feature/jwtSso/examples.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

With the JSON Web Token Single Sign-On feature, you can configure JSON Web Tokens (JWT) as an authentication mechanism for single-sign-on (SSO) authentication.

The JWT SSO cookie is configured by enabling the JSON Web Token Single Sign-On feature.
When a user is authenticated, Open Liberty creates a signed JWT as an SSO cookie and returns it to the browser.
When this feature is enabled and a user is authenticated, Open Liberty creates a signed JWT as an SSO cookie and returns it to the browser.
The browser can then include the JWT cookie in subsequent requests to the Open Liberty server.

=== Change the token expiration time
Expand All @@ -18,14 +17,14 @@ To customize the expiration time of a JWT, configure the `jwtBuilder` element, a
----

The `jwtBuilderRef` attribute refers to the `jwtBuilder` element with the `myBuilder` ID.
The `id` attribute for the `jwtBuilder` element that is named `myBuilder` identifies the JWT builder.
The `expiresInSeconds` attribute indicates the token expiration time that is set to 1800 seconds for a newly generated token.

The `expiresInSeconds` attribute sets the token expiration time to 1800 seconds for newly generated tokens.

=== Disable JWT cookies

By default, when a client is authenticated with Open Liberty through the JWT SSO feature, a JWT cookie is created and sent to the HTTP servlet.
In the following example, the JWT cookies are disabled by specifying the `disableJwtCookie` attribute with a value of `true` in the `server.xml` file.
You can use a mechanism other than JWT cookies for authentication, as the JWT cookies are disabled in this example:


[source, xml]
----
Expand All @@ -35,9 +34,9 @@ You can use a mechanism other than JWT cookies for authentication, as the JWT co
=== Configure JWT SSO authentication for a subset of requests

You can configure an authentication filter to specify whether certain requests for protected resources are authenticated with JWT SSO.
If the request meets the criteria that are specified in the authentication filter, then the request can authenticate with JWT to access the protected resource.
If the request meets the criteria that are specified in the authentication filter, then the request can authenticate with a JWT to access the protected resource.
Conversely, if the request does not meet the criteria that are configured in the JWT SSO authentication filter, then the user is prompted to provide login credentials.
For more information, see xref:ROOT:authentication-filters.adoc[Authentication filters].
If the JSON Web Token Single Sign-On feature is enabled but no authentication filter is configured, all requests that include a JWT cookie are processed by JWT SSO authentication.

[source, xml]
----
Expand All @@ -48,8 +47,8 @@ For more information, see xref:ROOT:authentication-filters.adoc[Authentication f
</authFilter>
----

In the example, request URLs that contain the `/SimpleServlet` pattern are authenticated by using JWT SSO authentication.
If the JSON Web Token Single Sign-On feature is enabled but no authentication filter is configured, all requests that include a JWT cookie are processed by JWT SSO authentication.
In the example, request URLs that contain the `/SimpleServlet` pattern are authenticated by using JWT SSO authentication. For more information, see xref:ROOT:authentication-filters.adoc[Authentication filters].


=== Change JWT validation criteria

Expand Down