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

Renamed doc filename and xrefs to include token #33502

Merged
merged 1 commit into from
May 23, 2023
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
include::_attributes.adoc[]
:categories: security,web

The Quarkus Security framework supports multiple authentication mechanisms, which you can use to secure your applications.
The Quarkus Security framework supports multiple authentication mechanisms, which you can use to secure your applications.
You can also combine authentication mechanisms.

[TIP]
Expand All @@ -27,7 +27,7 @@ The following table maps specific authentication requirements to a supported mec

|Username and password |xref:security-basic-authentication-concept.adoc[Basic], xref:security-authentication-mechanisms-concept.adoc#form-auth[Form]

|Bearer access token |xref:security-oidc-bearer-authentication-concept.adoc[OIDC Bearer], xref:security-jwt.adoc[JWT], xref:security-oauth2.adoc[OAuth2]
|Bearer access token |xref:security-oidc-bearer-token-authentication-concept.adoc[OIDC Bearer authentication], xref:security-jwt.adoc[JWT], xref:security-oauth2.adoc[OAuth2]

|Single sign-on (SSO) |xref:security-oidc-code-flow-authentication-concept.adoc[OIDC Code Flow], xref:security-authentication-mechanisms-concept.adoc#form-auth[Form]

Expand All @@ -51,7 +51,7 @@ Quarkus Security provides the following built-in authentication support:

=== Basic authentication

You can secure your Quarkus application endpoints with the built-in HTTP Basic authentication mechanism.
You can secure your Quarkus application endpoints with the built-in HTTP Basic authentication mechanism.
For more information, see the following documentation:

* xref:security-basic-authentication-concept.adoc[Basic authentication]
Expand All @@ -69,7 +69,7 @@ Instead, the authentication information is stored in an encrypted cookie, which

To apply encryption, add the `quarkus.http.auth.session.encryption-key` property, and ensure that the value you set is at least 16 characters long.
This key is hashed using SHA-256.
The resulting digest is used as a key for AES-256 encryption of the cookie value.
The resulting digest is used as a key for AES-256 encryption of the cookie value.
The cookie contains an expiry time as part of the encrypted value, so all nodes in the cluster must have their clocks synchronized.
At one-minute intervals, a new cookie gets generated with an updated expiry time if the session is in use.

Expand Down Expand Up @@ -195,7 +195,7 @@ For more information about OIDC authentication and authorization methods you can
[options="header"]
|====
|OIDC topic |Quarkus information resource
|Bearer token authentication mechanism |xref:security-oidc-bearer-authentication-concept.adoc[OIDC Bearer authentication]
|Bearer token authentication mechanism |xref:security-oidc-bearer-token-authentication-concept.adoc[OIDC Bearer authentication]
|Authorization code flow authentication mechanism |xref:security-oidc-code-flow-authentication-concept.adoc[OpenID Connect (OIDC) authorization code flow mechanism]
|Multiple tenants that can support bearer token or authorization code flow mechanisms |xref:security-openid-connect-multitenancy.adoc[Using OpenID Connect (OIDC) multi-tenancy]
|Using Keycloak to centralize authorization |xref:security-keycloak-authorization.adoc[Using OpenID Connect (OIDC) and Keycloak to centralize authorization]
Expand Down Expand Up @@ -354,7 +354,7 @@ For more information, see xref:security-proactive-authentication-concept.adoc[Pr
== References

* xref:security-overview-concept.adoc[Quarkus Security overview]
* xref:security-architecture-concept.adoc[Quarkus Security architecture]
* xref:security-architecture-concept.adoc[Quarkus Security architecture]
* xref:security-authentication-mechanisms-concept.adoc#other-supported-authentication-mechanisms[Authentication mechanisms in Quarkus]
* xref:security-identity-providers-concept.adoc[Identity providers]
* xref:security-authorize-web-endpoints-reference.adoc[Authorization of web endpoints]
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ You have learned how to create and test a secure Quarkus application by combinin
After you have completed this tutorial, explore some of the more advanced security mechanisms in Quarkus.
Use the following information to learn how you can securely use `OpenID Connect` to provide secure single sign-on access to your Quarkus endpoints:

* xref:security-oidc-bearer-authentication-concept.adoc[OIDC Bearer authentication]
* xref:security-oidc-bearer-token-authentication-concept.adoc[OIDC Bearer authentication]
* xref:security-oidc-code-flow-authentication-concept.adoc[OIDC code flow mechanism for protecting web applications]

== References
Expand All @@ -524,7 +524,7 @@ Use the following information to learn how you can securely use `OpenID Connect`
* xref:security-architecture-concept.adoc[Quarkus Security architecture]
* xref:security-authentication-mechanisms-concept.adoc#other-supported-authentication-mechanisms[Authentication mechanisms in Quarkus]
* xref:security-identity-providers-concept.adoc[Identity providers]
* xref:security-oidc-bearer-authentication-concept.adoc[OIDC Bearer authentication]
* xref:security-oidc-bearer-token-authentication-concept.adoc[OIDC Bearer authentication]
* xref:security-oidc-code-flow-authentication-concept.adoc[OIDC code flow mechanism for protecting web applications]
* xref:hibernate-orm-panache.adoc[Simplified Hibernate ORM with Panache]
* xref:hibernate-orm.adoc[Using Hibernate ORM and Jakarta Persistence]
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/security-jwt-build.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,6 @@ SmallRye JWT supports the following properties which can be used to customize th
* link:https://tools.ietf.org/html/rfc7516[JSON Web Encryption]
* link:https://tools.ietf.org/html/rfc7518[JSON Web Algorithms]
* link:https://bitbucket.org/b_c/jose4j/wiki/Home[Jose4J]
* xref:security-oidc-bearer-authentication-concept.adoc[OIDC Bearer authentication]
* xref:security-oidc-bearer-token-authentication-concept.adoc[OIDC Bearer authentication]
* xref:security-jwt.adoc[Using Smallrye JWT to Protect Service Applications]
* xref:security-overview-concept.adoc[Quarkus Security overview]
8 changes: 4 additions & 4 deletions docs/src/main/asciidoc/security-jwt.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ to verify https://tools.ietf.org/html/rfc7519[JSON Web Token]s, represent them a
and provide secured access to the Quarkus HTTP endpoints using Bearer Token Authorization and https://en.wikipedia.org/wiki/Role-based_access_control[Role-Based Access Control].

NOTE: Quarkus OpenID Connect `quarkus-oidc` extension also supports Bearer Token Authorization and uses `smallrye-jwt` to represent the bearer tokens as `JsonWebToken`.
For more information, read the xref:security-oidc-bearer-authentication-concept.adoc[OIDC Bearer authentication] guide.
For more information, read the xref:security-oidc-bearer-token-authentication-concept.adoc[OIDC Bearer authentication] guide.
OpenID Connect extension has to be used if the Quarkus application needs to authenticate the users using OIDC Authorization Code Flow.
For more information, see xref:security-oidc-code-flow-authentication-concept.adoc[OIDC code flow mechanism for protecting web applications]

Expand Down Expand Up @@ -804,7 +804,7 @@ Please see the xref:security-openid-connect-client.adoc#token-propagation[Token
[[integration-testing-wiremock]]
==== Wiremock

If you configure `mp.jwt.verify.publickey.location` to point to HTTPS or HTTP based JsonWebKey (JWK) set then you can use the same approach as described in the xref:security-oidc-bearer-authentication-concept.adoc#integration-testing[OpenID Connect Bearer Token Integration testing] `Wiremock` section but only change the `application.properties` to use MP JWT configuration properties instead:
If you configure `mp.jwt.verify.publickey.location` to point to HTTPS or HTTP based JsonWebKey (JWK) set then you can use the same approach as described in the xref:security-oidc-bearer-token-authentication-concept.adoc#integration-testing[OpenID Connect Bearer Token Integration testing] `Wiremock` section but only change the `application.properties` to use MP JWT configuration properties instead:

[source, properties]
----
Expand All @@ -816,7 +816,7 @@ mp.jwt.verify.issuer=${keycloak.url}/realms/quarkus
[[integration-testing-keycloak]]
==== Keycloak

If you work with Keycloak and configure `mp.jwt.verify.publickey.location` to point to HTTPS or HTTP based JsonWebKey (JWK) set then you can use the same approach as described in the xref:security-oidc-bearer-authentication-concept.adoc#integration-testing[OpenID Connect Bearer Token Integration testing] Keycloak section but only change the `application.properties` to use MP JWT configuration properties instead:
If you work with Keycloak and configure `mp.jwt.verify.publickey.location` to point to HTTPS or HTTP based JsonWebKey (JWK) set then you can use the same approach as described in the xref:security-oidc-bearer-token-authentication-concept.adoc#integration-testing[OpenID Connect Bearer Token Integration testing] Keycloak section but only change the `application.properties` to use MP JWT configuration properties instead:

[source, properties]
----
Expand Down Expand Up @@ -844,7 +844,7 @@ mp.jwt.verify.issuer=${client.quarkus.oidc.auth-server-url}
[[integration-testing-public-key]]
==== Local Public Key

You can use the same approach as described in the xref:security-oidc-bearer-authentication-concept.adoc#integration-testing[OpenID Connect Bearer Token Integration testing] `Local Public Key` section but only change the `application.properties` to use MP JWT configuration properties instead:
You can use the same approach as described in the xref:security-oidc-bearer-token-authentication-concept.adoc#integration-testing[OpenID Connect Bearer Token Integration testing] `Local Public Key` section but only change the `application.properties` to use MP JWT configuration properties instead:

[source, properties]
----
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/security-keycloak-admin-client.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,6 @@ include::{generated-dir}/config/quarkus-keycloak-admin-client.adoc[leveloffset=+
* https://www.keycloak.org/documentation.html[Keycloak Documentation]
* xref:security-keycloak-authorization.adoc[Keycloak Authorization extension]
* xref:security-oidc-code-flow-authentication-concept.adoc[OIDC code flow mechanism for protecting web applications]
* xref:security-oidc-bearer-authentication-concept.adoc[OIDC Bearer authentication]
* xref:security-oidc-bearer-token-authentication-concept.adoc[OIDC Bearer authentication]
* xref:security-openid-connect-client.adoc[OpenID Connect Client and Token Propagation Quickstart]
* xref:security-overview-concept.adoc[Quarkus Security overview]
6 changes: 3 additions & 3 deletions docs/src/main/asciidoc/security-keycloak-authorization.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include::_attributes.adoc[]

This guide demonstrates how your Quarkus application can authorize a bearer token access to protected resources using https://www.keycloak.org/docs/latest/authorization_services/index.html[Keycloak Authorization Services].

The `quarkus-keycloak-authorization` extension is based on `quarkus-oidc` and provides a policy enforcer that enforces access to protected resources based on permissions managed by Keycloak and currently can only be used with the Quarkus xref:security-oidc-bearer-authentication-concept.adoc[OIDC service applications].
The `quarkus-keycloak-authorization` extension is based on `quarkus-oidc` and provides a policy enforcer that enforces access to protected resources based on permissions managed by Keycloak and currently can only be used with the Quarkus xref:security-oidc-bearer-token-authentication-concept.adoc[OIDC service applications].

It provides a flexible and dynamic authorization capability based on Resource-Based Access Control.

Expand All @@ -20,7 +20,7 @@ Use `quarkus-keycloak-authorization` only if you work with Keycloak and have Key

By externalizing authorization from your application, you are allowed to protect your applications using different access control mechanisms as well as avoid re-deploying your application every time your security requirements change, where Keycloak will be acting as a centralized authorization service from where your protected resources and their associated permissions are managed.

See the xref:security-oidc-bearer-authentication-concept.adoc[OIDC Bearer authentication] guide for more information about `Bearer Token` authentication mechanism. It is important to realize that it is the `Bearer Token` authentication mechanism which does the authentication and creates a security identity - while the `quarkus-keycloak-authorization` extension is responsible for applying a Keycloak Authorization Policy to this identity based on the current request path and other policy settings.
See the xref:security-oidc-bearer-token-authentication-concept.adoc[OIDC Bearer authentication] guide for more information about `Bearer Token` authentication mechanism. It is important to realize that it is the `Bearer Token` authentication mechanism which does the authentication and creates a security identity - while the `quarkus-keycloak-authorization` extension is responsible for applying a Keycloak Authorization Policy to this identity based on the current request path and other policy settings.

Please see https://www.keycloak.org/docs/latest/authorization_services/index.html#_enforcer_overview[Keycloak Authorization Services documentation] for more information.

Expand Down Expand Up @@ -361,7 +361,7 @@ Note that, depending on how many resources you have in Keycloak the time taken t

In the default configuration, Keycloak is responsible for managing the roles and deciding who can access which routes.

To configure the protected routes using the `@RolesAllowed` annotation or the `application.properties` file, check the xref:security-oidc-bearer-authentication-concept.adoc[Using OpenID Connect Adapter to Protect Jakarta REST Applications] and xref:security-authorize-web-endpoints-reference.adoc[Security Authorization] guides. For more details, check the xref:security-overview-concept.adoc[Security guide].
To configure the protected routes using the `@RolesAllowed` annotation or the `application.properties` file, check the xref:security-oidc-bearer-token-authentication-concept.adoc[Using OpenID Connect Adapter to Protect Jakarta REST Applications] and xref:security-authorize-web-endpoints-reference.adoc[Security Authorization] guides. For more details, check the xref:security-overview-concept.adoc[Security guide].

== Access to Public Resources

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/security-oauth2.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ It can be used to implement an application authentication mechanism based on tok

This extension provides a light-weight support for using the opaque Bearer Tokens and validating them by calling an introspection endpoint.

If the OAuth2 Authentication server provides JWT Bearer Tokens, consider using either xref:security-oidc-bearer-authentication-concept.adoc[OIDC Bearer authentication] or xref:security-jwt.adoc[SmallRye JWT] extensions instead.
If the OAuth2 Authentication server provides JWT Bearer Tokens, consider using either xref:security-oidc-bearer-token-authentication-concept.adoc[OIDC Bearer authentication] or xref:security-jwt.adoc[SmallRye JWT] extensions instead.
OpenID Connect extension has to be used if the Quarkus application needs to authenticate the users using OIDC Authorization Code Flow. For more information, see the xref:security-oidc-code-flow-authentication-concept.adoc[OIDC code flow mechanism for protecting web applications] guide.

include::{includes}/extension-status.adoc[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This guide is maintained in the main Quarkus repository
and pull requests should be submitted there:
https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
////
[id="security-oidc-bearer-authentication-concept"]
[id="security-oidc-bearer-token-authentication-concept"]
= OpenID Connect (OIDC) Bearer authentication
include::_attributes.adoc[]
:categories: security,web
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include::_attributes.adoc[]
Here, you use the Quarkus OpenID Connect (OIDC) extension to secure a Jakarta REST application using Bearer authentication.
The bearer tokens are issued by OIDC and OAuth 2.0 compliant authorization servers, such as link:https://www.keycloak.org[Keycloak].

To better understand OIDC Bearer authentication, see xref:security-oidc-bearer-authentication-concept.adoc[OIDC Bearer authentication].
To better understand OIDC Bearer authentication, see xref:security-oidc-bearer-token-authentication-concept.adoc[OIDC Bearer authentication].

== Prerequisites

Expand Down Expand Up @@ -311,12 +311,12 @@ export access_token=$(\
)
----

Please also see the xref:security-oidc-bearer-authentication-concept.adoc#integration-testing-keycloak-devservices[OIDC Bearer authentication, Dev Services for Keycloak] section, about writing the integration tests which depend on `Dev Services for Keycloak`.
Please also see the xref:security-oidc-bearer-token-authentication-concept.adoc#integration-testing-keycloak-devservices[OIDC Bearer authentication, Dev Services for Keycloak] section, about writing the integration tests which depend on `Dev Services for Keycloak`.

== References

* xref:security-oidc-configuration-properties-reference.adoc[OIDC configuration properties]
* xref:security-oidc-bearer-authentication-concept.adoc[OIDC Bearer authentication]
* xref:security-oidc-bearer-token-authentication-concept.adoc[OIDC Bearer authentication]
* link:https://www.keycloak.org/documentation.html[Keycloak Documentation]
* link:https://openid.net/connect/[OpenID Connect]
* link:https://tools.ietf.org/html/rfc7519[JSON Web Token]
Expand Down
Loading