Skip to content

Commit f987413

Browse files
author
quarkusbot
committed
Sync web site with Quarkus documentation
1 parent 7543f26 commit f987413

8 files changed

+69
-17
lines changed

_generated-doc/latest/config/quarkus-all-config.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9810,7 +9810,7 @@ a|icon:lock[title=Fixed at build time] [[quarkus-vertx-http_quarkus-http-auth-in
98109810
--
98119811
Require that all registered HTTP authentication mechanisms must complete the authentication.
98129812

9813-
Typically, this property has to be true when the credentials are carried over mTLS, when both mTLS and another authentication, for example, OIDC bearer token authentication, must succeed. In such cases, `SecurityIdentity` created by the first mechanism, mTLS, can be injected, identities created by other mechanisms will be available on `SecurityIdentity`. The identities can be retrieved using utility method as in the example below:
9813+
Typically, this property has to be true when the credentials are carried over mTLS, when both mTLS and another authentication, for example, OIDC bearer token authentication, must succeed. In such cases, `SecurityIdentity` created by the first mechanism, mTLS, can be injected, identities created by other mechanisms will be available on `SecurityIdentity`. The mTLS mechanism is always the first mechanism, because its priority is elevated when inclusive authentication is enabled. The identities can be retrieved using utility method as in the example below:
98149814

98159815
```
98169816
`io.quarkus.vertx.http.runtime.security.HttpSecurityUtils.getSecurityIdentities(securityIdentity)`

_generated-doc/latest/config/quarkus-vertx-http_quarkus.http.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ a|icon:lock[title=Fixed at build time] [[quarkus-vertx-http_quarkus-http-auth-in
9898
--
9999
Require that all registered HTTP authentication mechanisms must complete the authentication.
100100

101-
Typically, this property has to be true when the credentials are carried over mTLS, when both mTLS and another authentication, for example, OIDC bearer token authentication, must succeed. In such cases, `SecurityIdentity` created by the first mechanism, mTLS, can be injected, identities created by other mechanisms will be available on `SecurityIdentity`. The identities can be retrieved using utility method as in the example below:
101+
Typically, this property has to be true when the credentials are carried over mTLS, when both mTLS and another authentication, for example, OIDC bearer token authentication, must succeed. In such cases, `SecurityIdentity` created by the first mechanism, mTLS, can be injected, identities created by other mechanisms will be available on `SecurityIdentity`. The mTLS mechanism is always the first mechanism, because its priority is elevated when inclusive authentication is enabled. The identities can be retrieved using utility method as in the example below:
102102

103103
```
104104
`io.quarkus.vertx.http.runtime.security.HttpSecurityUtils.getSecurityIdentities(securityIdentity)`

_guides/_attributes.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Common attributes.
22
// --> No blank lines (it ends the document header)
33
:project-name: Quarkus
4-
:quarkus-version: 3.17.4
4+
:quarkus-version: 3.17.5
55
:quarkus-platform-groupid: io.quarkus.platform
66
// .
77
:maven-version: 3.9.9

_guides/centralized-log-management.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ For this you can use the same `docker-compose.yml` file as above but with a diff
250250
input {
251251
tcp {
252252
port => 4560
253-
coded => json
253+
codec => json
254254
}
255255
}
256256

_guides/security-authentication-mechanisms.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,11 @@ quarkus.http.auth.inclusive=true
602602
If the authentication is inclusive then `SecurityIdentity` created by the first authentication mechanism can be
603603
injected into the application code.
604604
For example, if both <<mutual-tls>> and basic authentication mechanism authentications are required,
605-
the <<mutual-tls>> authentication mechanism will create `SecurityIdentity` first.
605+
the <<mutual-tls>> mechanism will create `SecurityIdentity` first.
606+
607+
NOTE: The <<mutual-tls>> mechanism has the highest priority when inclusive authentication is enabled, to ensure
608+
that an injected `SecurityIdentity` always represents <<mutual-tls>> and can be used to get access to `SecurityIdentity`
609+
identities provided by other authentication mechanisms.
606610

607611
Additional `SecurityIdentity` instances can be accessed as a `quarkus.security.identities` attribute on the first
608612
`SecurityIdentity`, however, accessing these extra identities directly may not be necessary, for example,

_guides/security-oidc-bearer-token-authentication.adoc

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,6 +1345,49 @@ Authentication that requires a dynamic tenant will fail.
13451345
You can filter OIDC requests made by Quarkus to the OIDC provider by registering one or more `OidcRequestFilter` implementations, which can update or add new request headers, and log requests.
13461346
For more information, see xref:security-oidc-code-flow-authentication#code-flow-oidc-request-filters[OIDC request filters].
13471347

1348+
[[bearer-token-oidc-response-filters]]
1349+
=== OIDC response filters
1350+
1351+
You can filter responses from the OIDC providers by registering one or more `OidcResponseFilter` implementations, which can check the response status, headers and body in order to log them or perform other actions.
1352+
1353+
You can have a single filter intercepting all the OIDC responses, or use an `@OidcEndpoint` annotation to apply this filter to the specific endpoint responses only. For example:
1354+
1355+
[source,java]
1356+
----
1357+
package io.quarkus.it.keycloak;
1358+
1359+
import jakarta.enterprise.context.ApplicationScoped;
1360+
1361+
import io.quarkus.arc.Unremovable;
1362+
import io.quarkus.logging.Log;
1363+
import io.quarkus.oidc.common.OidcEndpoint;
1364+
import io.quarkus.oidc.common.OidcEndpoint.Type;
1365+
import io.quarkus.oidc.common.OidcResponseFilter;
1366+
import io.quarkus.oidc.common.runtime.OidcConstants;
1367+
import io.quarkus.oidc.runtime.OidcUtils;
1368+
1369+
@ApplicationScoped
1370+
@Unremovable
1371+
@OidcEndpoint(value = Type.DISCOVERY) <1>
1372+
public class DiscoveryEndpointResponseFilter implements OidcResponseFilter {
1373+
1374+
@Override
1375+
public void filter(OidcResponseContext rc) {
1376+
String contentType = rc.responseHeaders().get("Content-Type"); <2>
1377+
if (contentType.equals("application/json") {
1378+
String tenantId = rc.requestProperties().get(OidcUtils.TENANT_ID_ATTRIBUTE); <3>
1379+
String metadata = rc.responseBody().toString(); <4>
1380+
Log.debugf("Tenant %s OIDC metadata: %s", tenantId, metadata);
1381+
}
1382+
}
1383+
}
1384+
1385+
----
1386+
<1> Restrict this filter to requests targeting the OIDC discovery endpoint only.
1387+
<2> Check the response `Content-Type` header.
1388+
<3> Use `OidcRequestContextProperties` request properties to get the tenant id.
1389+
<4> Get the response data as String.
1390+
13481391
== References
13491392

13501393
* xref:security-oidc-configuration-properties-reference.adoc[OIDC configuration properties]

_guides/security-oidc-code-flow-authentication.adoc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,8 @@ package io.quarkus.it.keycloak;
392392
393393
import jakarta.enterprise.context.ApplicationScoped;
394394
395-
import org.jboss.logging.Logger;
396-
397395
import io.quarkus.arc.Unremovable;
396+
import io.quarkus.logging.Log;
398397
import io.quarkus.oidc.common.OidcEndpoint;
399398
import io.quarkus.oidc.common.OidcEndpoint.Type;
400399
import io.quarkus.oidc.common.OidcResponseFilter;
@@ -405,16 +404,15 @@ import io.quarkus.oidc.runtime.OidcUtils;
405404
@Unremovable
406405
@OidcEndpoint(value = Type.TOKEN) <1>
407406
public class TokenEndpointResponseFilter implements OidcResponseFilter {
408-
private static final Logger LOG = Logger.getLogger(TokenResponseFilter.class);
409-
407+
410408
@Override
411409
public void filter(OidcResponseContext rc) {
412410
String contentType = rc.responseHeaders().get("Content-Type"); <2>
413411
if (contentType.equals("application/json")
414412
&& OidcConstants.AUTHORIZATION_CODE.equals(rc.requestProperties().get(OidcConstants.GRANT_TYPE)) <3>
415413
&& "code-flow-user-info-cached-in-idtoken".equals(rc.requestProperties().get(OidcUtils.TENANT_ID_ATTRIBUTE)) <3>
416414
&& rc.responseBody().toJsonObject().containsKey("id_token")) { <4>
417-
LOG.debug("Authorization code completed for tenant 'code-flow-user-info-cached-in-idtoken'");
415+
Log.debug("Authorization code completed for tenant 'code-flow-user-info-cached-in-idtoken'");
418416
}
419417
}
420418
}

_guides/writing-native-applications-tips.adoc

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public class MyReflectionConfiguration {
197197
}
198198
----
199199

200-
Note: By default the `@RegisterForReflection` annotation will also registered any potential nested classes for reflection. If you want to avoid this behavior, you can set the `ignoreNested` attribute to `true`.
200+
Note: By default the `@RegisterForReflection` annotation will also register any potential nested classes for reflection. If you want to avoid this behavior, you can set the `ignoreNested` attribute to `true`.
201201

202202
==== Using a configuration file
203203

@@ -320,6 +320,7 @@ and in the case of using the Maven configuration instead of `application.propert
320320
----
321321
====
322322

323+
[[managing-proxy-classes-app]]
323324
=== Managing Proxy Classes
324325

325326
While writing native application you'll need to define proxy classes at image build time by specifying the list of interfaces that they implement.
@@ -331,9 +332,10 @@ In such a situation, the error you might encounter is:
331332
com.oracle.svm.core.jdk.UnsupportedFeatureError: Proxy class defined by interfaces [interface org.apache.http.conn.HttpClientConnectionManager, interface org.apache.http.pool.ConnPoolControl, interface com.amazonaws.http.conn.Wrapped] not found. Generating proxy classes at runtime is not supported. Proxy classes need to be defined at image build time by specifying the list of interfaces that they implement. To define proxy classes use -H:DynamicProxyConfigurationFiles=<comma-separated-config-files> and -H:DynamicProxyConfigurationResources=<comma-separated-config-resources> options.
332333
----
333334

334-
Solving this issue requires creating a `proxy-config.json` file under the `src/main/resources/META-INF/native-image/<group-id>/<artifact-id>` folder.
335-
This way the configuration will be automatically parsed by the native build, without additional configuration.
336-
For more information about the format of this file, see the link:https://www.graalvm.org/{graalvm-docs-version}/reference-manual/native-image/metadata/#dynamic-proxy-metadata-in-json[Dynamic Proxy Metadata in JSON] documentation.
335+
To solve the issue you can create a `proxy-config.json` file under the `src/main/resources/META-INF/native-image/<group-id>/<artifact-id>` folder.
336+
For more information about the format of the `proxy-config.json`, see the https://www.graalvm.org/{graalvm-docs-version}/reference-manual/native-image/metadata/#dynamic-proxy-metadata-in-json[Dynamic Proxy Metadata in JSON] documentation.
337+
338+
Alternatively, you can create a quarkus extension and register the proxy classes as described in <<managing-proxy-classes-extension>>.
337339

338340
[[modularity-benefits]]
339341
=== Modularity Benefits
@@ -633,9 +635,10 @@ Using such a construct means that a `--initialize-at-run-time` option will autom
633635
For more information about the `--initialize-at-run-time` option, see the link:https://www.graalvm.org/{graalvm-docs-version}/reference-manual/native-image/optimizations-and-performance/ClassInitialization/[GraalVM Class Initialization in Native Image] guide.
634636
====
635637

638+
[[managing-proxy-classes-extension]]
636639
=== Managing Proxy Classes
637640

638-
Very similarly, Quarkus allows extensions authors to register a `NativeImageProxyDefinitionBuildItem`. An example of doing so is:
641+
Similarly, Quarkus allows extensions authors to register a `NativeImageProxyDefinitionBuildItem`. An example of doing so is:
639642

640643
[source,java]
641644
----
@@ -650,11 +653,15 @@ public class S3Processor {
650653
}
651654
----
652655

653-
Using such a construct means that a `-H:DynamicProxyConfigurationResources` option will automatically be added to the `native-image` command line.
656+
This will allow Quarkus to generate the necessary configuration for handling the proxy class.
657+
658+
Alternatively, you may create a `proxy-config.json` as described in <<managing-proxy-classes-app>>.
654659

655660
[NOTE]
656661
====
657-
For more information about Proxy Classes, see the link:https://www.graalvm.org/{graalvm-docs-version}/reference-manual/native-image/guides/configure-dynamic-proxies/[GraalVM Configure Dynamic Proxies Manually] guide.
662+
In both cases the configuration will be automatically parsed by the native build, without additional configuration.
663+
664+
For more information about using Proxy Classes in native executables, see https://www.graalvm.org/jdk21/reference-manual/native-image/dynamic-features/DynamicProxy/[Dynamic Proxy in Native Image] and https://www.graalvm.org/{graalvm-docs-version}/reference-manual/native-image/guides/configure-dynamic-proxies/[GraalVM Configure Dynamic Proxies Manually].
658665
====
659666

660667
=== Logging with Native Image

0 commit comments

Comments
 (0)