-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recomposing security overview content to diataxis
Recomposing security overview content to diataxis
- Loading branch information
1 parent
1540814
commit 521b869
Showing
6 changed files
with
160 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
//// | ||
This document 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-architecture-concept"] | ||
= Quarkus Security architecture | ||
include::_attributes.adoc[] | ||
:categories: security | ||
The Quarkus Security architecture provides several built-in authentication mechanisms. The `HttpAuthenticationMechanism` interface is the main entry mechanism for securing HTTP applications in Quarkus. Quarkus Security is also highly customizable. | ||
|
||
== Core components of Quarkus Security | ||
|
||
Quarkus Security uses `HttpAuthenticationMechanism` to extract the authentication credentials from the HTTP request and delegates them to `IdentityProvider` to convert the credentials to `SecurityIdentity`. | ||
For example, the credentials can come from the `Authorization` header, client HTTPS certificates, or cookies. | ||
|
||
`IdentityProvider` verifies the authentication credentials and maps them to `SecurityIdentity`, which has the username, roles, original authentication credentials, and other attributes. | ||
|
||
For every authenticated resource, you can inject a `SecurityIdentity` instance to get the authenticated identity information. | ||
|
||
In other contexts, it is possible to have other parallel representations of the same information or parts of it, for example, `SecurityContext` for JAX-RS or `JsonWebToken` for JSON Web Tokens (JWT). | ||
|
||
For more information, see xref:security-built-in-authentication-support.adoc[Built-in authentication support]. | ||
|
||
== Proactive authentication | ||
|
||
By default, Quarkus does proactive authentication, which means that all incoming requests with credentials are authenticated regardless of whether the target page requires authentication. | ||
For more information, see xref:security-built-in-authentication-support-concept.adoc#proactive-authentication[Proactive authentication]. | ||
|
||
== Quarkus Security customization | ||
|
||
Quarkus Security is also highly customizable. You can customize the following core security components of Quarkus: | ||
|
||
* `HttpAuthenticationMechanism` | ||
* `IdentityProvider` | ||
* `SecurityidentityAugmentor` | ||
|
||
For more information about customizing Quarkus Security including reactive security and how to register a security provider, see xref:security-customization.adoc[Security customization]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
docs/src/main/asciidoc/security-basic-authentication-concept.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
docs/src/main/asciidoc/security-identity-providers-concept.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
//// | ||
This document 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-identity-providers-concept"] | ||
= Identity providers | ||
include::_attributes.adoc[] | ||
:categories: security | ||
In the Quarkus Security framework, identity providers play a key role in authentication and authorization, providing services for storing and verifying user identities. | ||
The JPA `IdentityProvider` creates a `SecurityIdentity` instance, which is used during user authentication to verify and authorize access requests making your Quarkus application secure. | ||
[[identity-providers]] | ||
|
||
`IdentityProvider` converts the authentication credentials provided by `HttpAuthenticationMechanism` to a `SecurityIdentity` instance. | ||
|
||
Some extensions, for example, `OIDC`, `OAuth2`, and `SmallRye JWT` have inline `IdentityProvider` implementations specific to the supported authentication flow. | ||
For example, `quarkus-oidc` uses its own `IdentityProvider` to convert a token to a `SecurityIdentity` instance. | ||
|
||
If you use Basic or form-based authentication then you must add an `IdentityProvider` instance that can convert a username and password to a `SecurityIdentity` instance. | ||
|
||
To get started with security in Quarkus, we recommend that you first combine the Quarkus built-in Basic HTTP authentication with the JPA identity provider to enable role-based access control (RBAC). | ||
|
||
* For more information about Basic authentication or form-based authentication, see the following resources: | ||
** xref:security-basic-authentication-tutorial.adoc[Secure a Quarkus application with Basic authentication] | ||
** xref:security-built-in-authentication-support-concept.adoc#form-auth[Form-based authentication] | ||
** xref:security-jdbc.adoc[Using security with JDBC] | ||
** xref:security-ldap.adoc[Using security with an LDAP realm] |
Oops, something went wrong.