Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Demonstrates a simple Quarkus REST API with JWT authentication and role-based access control.
@Path("/todos")
@RolesAllowed({"USER"})
public class TodoResource {
@GET
public List<String> getTodos() {
return Arrays.asList("Task 1", "Task 2");
}
}
// application.properties
quarkus.http.auth.permission.todos.paths=/todos
quarkus.http.auth.permission.todos.policy=authenticated
quarkus.smallrye-jwt.enabled=trueQuarkus Security is a comprehensive security framework within the Quarkus ecosystem, designed to provide authentication, authorization, and identity management for Java applications, particularly for cloud-native and reactive applications.
Origin & Creator
Created by Red Hat as part of the Quarkus project in 2019.
Industrial Note
Quarkus Security is often used in microservices, Kubernetes-native applications, and serverless environments where fast startup, lightweight footprint, and secure authentication are critical.