You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _guides/compose-dev-services.adoc
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -645,6 +645,8 @@ Compose Dev Services won't try to discover any services and will be disabled.
645
645
=== Compose Dev Services used for tests
646
646
647
647
For Quarkus tests, a generated project name in the format `quarkus-devservices-<application-name>-<random-suffix>` is used by default to ensure isolation between test runs and running dev mode services.
648
+
If the top-level name attribute is specified in the Compose file, the project name in the format `<compose-name>-<random-suffix>` is used.
649
+
648
650
This way, Quarkus tests start a separate copy of the services defined in the compose files.
649
651
For example, when running continuous testing in development mode, tests will have their own isolated set of services.
Copy file name to clipboardExpand all lines: _guides/datasource.adoc
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -678,9 +678,15 @@ You can override this by setting the `transactions` configuration property:
678
678
* `quarkus.datasource.jdbc.transactions` for default unnamed datasource
679
679
* `quarkus.datasource._<datasource-name>_.jdbc.transactions` for named datasource
680
680
681
-
When a datasource is enabled for XA (by setting `quarkus.datasource[.optional name].jdbc.transactions` to `xa`) and the transaction recovery system is enabled (by setting the property `quarkus.transaction-manager.enable-recovery` to `true`), then the datasource is automatically registered for recovery.
682
-
This is a safe default, but you can override this behaviour on a per-datasource basis by setting `quarkus.datasource.jdbc.enable-recovery` or `quarkus.datasource."datasource-name".jdbc.enable-recovery` to `false`.
683
-
Use only for advanced use cases and if you know recovery will not be necessary; otherwise it can result in data loss, data unavailability, or both, because resources can become locked indefinitely.
681
+
When a datasource is configured for XA transactions by setting `quarkus.datasource[.optional name].jdbc.transactions=xa` and the transaction recovery system is enabled by using `quarkus.transaction-manager.enable-recovery=true`, the datasource is automatically registered for recovery.
682
+
This is the preferred and safe default.
683
+
You can override this behavior for individual datasources by setting `quarkus.datasource.jdbc.enable-recovery=false` or `quarkus.datasource."datasource-name".jdbc.enable-recovery=false`.
684
+
685
+
[IMPORTANT]
686
+
====
687
+
Change this setting only in advanced use cases and only if you are certain recovery is not required.
688
+
Incorrect configuration can lead to data loss, data unavailability, or both, due to resources remaining locked indefinitely.
689
+
====
684
690
685
691
For more information, see the <<configuration-reference,Configuration reference>> section below.
686
692
To facilitate the storage of transaction logs in a database by using JDBC, see the xref:transaction.adoc#jdbcstore[Configuring transaction logs to be stored in a datasource] section of the xref:transaction.adoc[Using transactions in Quarkus] guide.
Copy file name to clipboardExpand all lines: _guides/hibernate-orm.adoc
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -486,6 +486,13 @@ EntityManager entityManager;
486
486
----
487
487
<1> Here again, we use the same `@io.quarkus.hibernate.orm.PersistenceUnit` annotation.
488
488
489
+
[NOTE]
490
+
====
491
+
The injected `EntityManager` or `Session` instance is a proxy that requires an active transaction for interaction.
492
+
493
+
By default it is also possible to use it for read-only operations without a transaction when in a request scope, but this can be disabled by setting `quarkus.hibernate-orm.request-scoped.enabled` to `false`.
494
+
====
495
+
489
496
You can inject the `EntityManagerFactory` of a named persistence unit using the exact same mechanism:
Copy file name to clipboardExpand all lines: _guides/security-authorize-web-endpoints-reference.adoc
+19-7Lines changed: 19 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,6 @@ include::_attributes.adoc[]
13
13
Quarkus incorporates a pluggable web security layer.
14
14
When security is active, the system performs a permission check on all HTTP requests to determine if they should proceed.
15
15
16
-
Using `@PermitAll` will not open a path if the path is restricted by the `quarkus.http.auth.` configuration.
17
-
To ensure specific paths are accessible, appropriate configurations must be made within the Quarkus security settings.
18
-
19
16
[NOTE]
20
17
====
21
18
If you use Jakarta RESTful Web Services, consider using `quarkus.security.jaxrs.deny-unannotated-endpoints` or `quarkus.security.jaxrs.default-roles-allowed` to set default security requirements instead of HTTP path-level matching because annotations can override these properties on an individual endpoint.
Permissions are defined in the Quarkus configuration by permission sets, each specifying a policy for access control.
32
29
30
+
[NOTE]
31
+
====
32
+
When a security policy's `paths` property contains the most specific path that matches the current request path, it takes precedence over other security policies with matching paths and is said to win.
Previous examples demonstrated matching all sub-paths when a path concludes with the `$$*$$`
264
266
wildcard.
265
267
266
-
This wildcard also applies in the middle of a path, representing a single path segment.
268
+
This wildcard can also be applied in the middle of a path, representing a single path segment.
267
269
It cannot be mixed with other path segment characters; thus, path separators always enclose the `$$*$$` wildcard, as seen in the `/public/$$*$$/about-us` path.
268
270
269
271
When several path patterns correspond to the same request path, the system selects the longest sub-path leading to the `$$*$$` wildcard.
@@ -425,7 +427,7 @@ For more information, see link:https://quarkus.io/blog/path-resolution-in-quarku
425
427
[[map-security-identity-roles]]
426
428
=== Map `SecurityIdentity` roles
427
429
428
-
Winning role-based policy can map the `SecurityIdentity` roles to the deployment-specific roles.
430
+
The winning role-based policy that was chosen to authorize the current request can map `SecurityIdentity` roles to deployment-specific roles.
429
431
These roles are then applicable for endpoint authorization by using the `@RolesAllowed` annotation.
430
432
431
433
[source,properties]
@@ -466,7 +468,7 @@ public class HttpSecurityConfiguration {
466
468
=== Shared permission checks
467
469
468
470
One important rule for unshared permission checks is that only one path match is applied, the most specific one.
469
-
Naturally you can specify as many permissions with the same winning path as you want and they will all be applied.
471
+
When a path matches as the most specific, you can specify multiple permissions for that path and they are all applied.
470
472
However, there can be permission checks you want to apply to many paths without repeating them over and over again.
471
473
That's where shared permission checks come in, they are always applied when the permission path is matched.
472
474
@@ -603,6 +605,13 @@ The same authorization can be required with the `@PermissionsAllowed(value = { "
603
605
{project-name} includes built-in security to allow for link:https://en.wikipedia.org/wiki/Role-based_access_control[Role-Based Access Control (RBAC)]
604
606
based on the common security annotations `@RolesAllowed`, `@DenyAll`, `@PermitAll` on REST endpoints and CDI beans.
605
607
608
+
[NOTE]
609
+
====
610
+
Authorization checks for `quarkus.http.auth.` configurations are performed before security checks for standard security annotations.
611
+
Therefore, `@PermitAll` only permits access to paths that are not already restricted by HTTP permissions.
612
+
`@PermitAll` cannot override HTTP-level security configurations, only relax restrictions imposed by other standard security annotations such as `@RolesAllowed`.
613
+
====
614
+
606
615
.{project-name} annotation types summary
607
616
[options="header"]
608
617
|===
@@ -683,7 +692,10 @@ This returns `non-null` for a secured endpoint.
683
692
<6> The `/subject/denied` endpoint declares the `@DenyAll` annotation, disallowing all direct access to it as a REST method, regardless of the user calling it.
684
693
The method is still invokable internally by other methods in this class.
685
694
686
-
CAUTION: If you plan to use standard security annotations on the IO thread, review the information in xref:security-proactive-authentication.adoc[Proactive Authentication].
695
+
[CAUTION]
696
+
====
697
+
If you plan to use standard security annotations on the IO thread, review the information in xref:security-proactive-authentication.adoc[Proactive Authentication].
698
+
====
687
699
688
700
The `@RolesAllowed` annotation value supports xref:config-reference.adoc#property-expressions[property expressions] including default values and nested property expressions.
689
701
Configuration properties used with the annotation are resolved at runtime.
0 commit comments