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
The size of scheduler thread pool. This will initialize the number of worker threads in the pool.
62867
62867
62868
+
It's important to bear in mind that Quartz threads are not used to execute scheduled methods, instead the regular Quarkus thread pool is used by default. See also `quarkus.quartz.run-blocking-scheduled-method-on-quartz-thread`.
The size of scheduler thread pool. This will initialize the number of worker threads in the pool.
249
249
250
+
It's important to bear in mind that Quartz threads are not used to execute scheduled methods, instead the regular Quarkus thread pool is used by default. See also `quarkus.quartz.run-blocking-scheduled-method-on-quartz-thread`.
The size of scheduler thread pool. This will initialize the number of worker threads in the pool.
249
249
250
+
It's important to bear in mind that Quartz threads are not used to execute scheduled methods, instead the regular Quarkus thread pool is used by default. See also `quarkus.quartz.run-blocking-scheduled-method-on-quartz-thread`.
Copy file name to clipboardExpand all lines: _versions/main/guides/datasource.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -213,7 +213,7 @@ Read <<in-memory-databases,Testing with in-memory databases>> for suggestions re
213
213
* PostgreSQL - `quarkus-jdbc-postgresql`
214
214
ifndef::no-quarkiverse[]
215
215
* Other JDBC extensions, such as link:https://github.com/quarkiverse/quarkus-jdbc-sqlite[SQLite] and its link:https://docs.quarkiverse.io/quarkus-jdbc-sqlite/dev/index.html[documentation], can be found in the https://github.com/quarkiverse[Quarkiverse].
216
-
ifndef::no-quarkiverse[]
216
+
endif::no-quarkiverse[]
217
217
+
218
218
For example, to add the PostgreSQL driver dependency:
Copy file name to clipboardExpand all lines: _versions/main/guides/security-authorize-web-endpoints-reference.adoc
+93-33Lines changed: 93 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1055,8 +1055,85 @@ Because `MediaLibrary` is the `TvLibrary` class parent, a user with the `admin`
1055
1055
1056
1056
CAUTION: Annotation-based permissions do not work with custom xref:security-customization.adoc#jaxrs-security-context[Jakarta REST SecurityContexts] because there are no permissions in `jakarta.ws.rs.core.SecurityContext`.
1057
1057
1058
+
[[permission-checker]]
1059
+
==== Create permission checkers
1060
+
1061
+
By default, `SecurityIdentity` must be configured with permissions which can be used to check if this identity passes `@PermissionAllowed` authorization restrictions.
1062
+
Alternatively, you can use a `@PermissionChecker` annotation to mark any CDI bean method as a permission checker.
1063
+
The `@PermissionChecker` annotation value should match required permission declared by the `@PermissionsAllowed` annotation value.
1064
+
For example, a permission checker can be created like this:
public String sayHello(@BeanParam SimpleBeanParam beanParam) {
1105
1181
return "Hello from " + beanParam.uriInfo.getPath();
1106
1182
}
1107
1183
1108
1184
}
1109
1185
----
1110
-
<1> The `params` annotation attribute specifies that user principal name should be passed to the `BeanParamPermission` constructor.
1111
-
Other `BeanParamPermission` constructor parameters like `customAuthorizationHeader` and `query` are matched automatically.
1112
-
Quarkus identifies the `BeanParamPermission` constructor parameters among `beanParam` fields and their public accessors.
1186
+
<1> The `params` annotation attribute specifies that user principal name should be passed to the `BeanParamPermissionChecker#canSayHello` method.
1187
+
Other `BeanParamPermissionChecker#canSayHello` method parameters like `customAuthorizationHeader` and `query` are matched automatically.
1188
+
Quarkus identifies the `BeanParamPermissionChecker#canSayHello` method parameters among `beanParam` fields and their public accessors.
1113
1189
To avoid ambiguous resolution, automatic detection only works for the `beanParam` fields.
1114
1190
For that reason, we had to specify path to the user principal name explicitly.
1115
1191
@@ -1155,47 +1231,31 @@ public class SimpleBeanParam {
1155
1231
<3> The `customAuthorizationHeader` field is not public, therefore Quarkus access this field with the `customAuthorizationHeader` accessor.
1156
1232
That is particularly useful with Java records, where generated accessors are not prefixed with `get`.
1157
1233
1158
-
Here is an example of the `BeanParamPermission` permission that checks user principal, custom header and query parameter:
1234
+
Here is an example of a `@PermissionChecker` method that checks the `say-hello` permission based on a user principal, custom header and query parameter:
1159
1235
1160
1236
[source,java]
1161
1237
----
1162
1238
package org.acme.security.permission;
1163
1239
1164
-
import java.security.Permission;
1165
-
1166
-
public class BeanParamPermission extends Permission {
1167
-
1168
-
private final String actions;
1169
-
1170
-
public BeanParamPermission(String permissionName, String customAuthorizationHeader, String name, String query) {
NOTE: You can pass `@BeanParam` directly into a custom permission constructor and access its fields programmatically in the constructor instead.
1258
+
NOTE: You can pass `@BeanParam` directly into a `@PermissionChecker` method and access its fields programmatically.
1199
1259
Ability to reference `@BeanParam` fields with the `@PermissionsAllowed#params` attribute is useful when you have multiple differently structured `@BeanParam` classes.
0 commit comments