Skip to content

Commit 170b687

Browse files
author
quarkusbot
committed
Sync web site with Quarkus documentation
1 parent 2cc14ec commit 170b687

File tree

6 files changed

+75
-5
lines changed

6 files changed

+75
-5
lines changed

_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.6
4+
:quarkus-version: 3.17.7
55
:quarkus-platform-groupid: io.quarkus.platform
66
// .
77
:maven-version: 3.9.9

_guides/deploying-to-kubernetes.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ of secret that contains the required credentials. Quarkus can automatically gene
301301
quarkus.kubernetes.generate-image-pull-secret=true
302302
----
303303

304-
More specifically a `Secret`like the one bellow is genrated:
304+
More specifically a `Secret` like the one below is generated:
305305

306306
[source,yaml]
307307
----

_guides/native-reference.adoc

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,14 +2293,29 @@ One can see which Mandrel version was used to generate a binary by inspecting th
22932293

22942294
[source,bash]
22952295
----
2296-
$ strings target/debugging-native-1.0.0-SNAPSHOT-runner | grep GraalVM
2297-
com.oracle.svm.core.VM=GraalVM 22.0.0.2-Final Java 11 Mandrel Distribution
2296+
$ strings target/debugging-native-1.0.0-SNAPSHOT-runner | \
2297+
grep -e 'com.oracle.svm.core.VM=' -e 'com.oracle.svm.core.VM.Java.Version' -F
2298+
com.oracle.svm.core.VM.Java.Version=21.0.5
2299+
com.oracle.svm.core.VM=Mandrel-23.1.5.0-Final
22982300
----
22992301

23002302
=== How do I enable GC logging in native executables?
23012303

23022304
See <<gc-logging,Native Memory Management GC Logging section>> for details.
23032305

2306+
=== Can I get a thread dump of a native executable?
2307+
2308+
Yes, Quarkus sets up a signal handler for the `SIGQUIT` signal (or `SIGBREAK` on windows) that will result in a thread
2309+
dump being printed when receiving the `SIGQUIT/SIGBREAK` signal.
2310+
You may use `kill -SIGQUIT <pid>` to trigger a thread dump.
2311+
2312+
[NOTE]
2313+
====
2314+
Quarkus uses its own signal handler, to use GraalVM's default signal handler instead you will need to:
2315+
1. Add `-H:+DumpThreadStacksOnSignal` to `quarkus.native.additional-build-args` and rebuild the application.
2316+
2. Set the environment variable `DISABLE_SIGNAL_HANDLERS` before running the app.
2317+
====
2318+
23042319
[[heap-dumps]]
23052320
=== Can I get a heap dump of a native executable? e.g. if it runs out of memory
23062321

_guides/scheduler-reference.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Property Expressions.
156156
.Time Zone Configuration Property Example
157157
[source,java]
158158
----
159-
@Scheduled(cron = "0 15 10 * * ?", timeZone = "{myMethod.timeZone}")
159+
@Scheduled(cron = "0 15 10 * * ?", timeZone = "${myMethod.timeZone}")
160160
void myMethod() { }
161161
----
162162

_guides/security-authorize-web-endpoints-reference.adoc

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,49 @@ public class ProjectPermissionChecker {
11221122
TIP: Permission checks run by default on event loops.
11231123
Annotate a permission checker method with the `io.smallrye.common.annotation.Blocking` annotation if you want to run the check on a worker thread.
11241124

1125+
Matching between the `@PermissionsAllowed` values and the `@PermissionChecker` value is based on string equality as shown in the example below:
1126+
1127+
[source,java]
1128+
----
1129+
package org.acme.security;
1130+
1131+
import io.quarkus.security.PermissionChecker;
1132+
import io.quarkus.security.PermissionsAllowed;
1133+
import jakarta.enterprise.context.ApplicationScoped;
1134+
1135+
@ApplicationScoped
1136+
public class FileService {
1137+
1138+
@PermissionsAllowed({ "delete:all", "delete:dir" }) <1>
1139+
void deleteDirectory(Path directoryPath) {
1140+
// delete directory
1141+
}
1142+
1143+
@PermissionsAllowed(value = { "delete:service", "delete:file" }, inclusive = true) <2>
1144+
void deleteServiceFile(Path serviceFilePath) {
1145+
// delete service file
1146+
}
1147+
1148+
@PermissionChecker("delete:all")
1149+
boolean canDeleteAllDirectories(SecurityIdentity identity) {
1150+
String filePermissions = identity.getAttribute("user-group-file-permissions");
1151+
return filePermissions != null && filePermissions.contains("w");
1152+
}
1153+
1154+
@PermissionChecker("delete:service")
1155+
boolean canDeleteService(SecurityIdentity identity) {
1156+
return identity.hasRole("admin");
1157+
}
1158+
1159+
@PermissionChecker("delete:file")
1160+
boolean canDeleteFile(Path serviceFilePath) {
1161+
return serviceFilePath != null && !serviceFilePath.endsWith("critical");
1162+
}
1163+
}
1164+
----
1165+
<1> The permission checker method `canDeleteAllDirectories` grants access to the `deleteDirectory` because the `delete:all` values are equal.
1166+
<2> There must be exactly two permission checker methods, one for the `delete:service` permission and other for the `delete:file` permission.
1167+
11251168
[[permission-meta-annotation]]
11261169
==== Create permission meta-annotations
11271170

_guides/security-ldap.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,18 @@ quarkus.security.ldap.identity-mapping.attribute-mappings."0".filter-base-dn=ou=
177177

178178
The `elytron-security-ldap` extension requires a dir-context and an identity-mapping with at least one attribute-mapping to authenticate the user and its identity.
179179

180+
=== Map LDAP groups to `SecurityIdentity` roles
181+
182+
Previously described application configuration showed how to map `CN` attribute of the LDAP Distinguished Name group to a Quarkus `SecurityIdentity` role.
183+
More specifically, the `standardRole` CN was mapped to a `SecurityIdentity` role and thus allowed access to the `UserResource#me` endpoint.
184+
However, required `SecurityIdentity` roles may differ between applications and you may need to map LDAP groups to local `SecurityIdentity` roles like in the example below:
185+
186+
[source,properties]
187+
----
188+
quarkus.http.auth.roles-mapping."standardRole"=user <1>
189+
----
190+
<1> Map the `standardRole` role to the application-specific `SecurityIdentity` role `user`.
191+
180192
== Testing the Application
181193

182194
The application is now protected and the identities are provided by our LDAP server.

0 commit comments

Comments
 (0)