CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-io-quarkus--quarkus-bom

Cloud Native, Container First Java framework for building efficient Java applications with fast startup times and low memory usage

Pending
Overview
Eval results
Files

security.mddocs/

Security and Authentication

Quarkus provides comprehensive security framework with support for OIDC, JWT, RBAC, and integration with various authentication providers and security standards.

Core Security Annotations

Authorization Annotations

@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface RolesAllowed {
    String[] value();
}

@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface PermitAll {
}

@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface DenyAll {
}

Standard security annotations for method-level authorization.

QuarkusSecurityIdentity

public interface QuarkusSecurityIdentity extends SecurityIdentity {
    Principal getPrincipal();
    Set<String> getRoles();
    <T> Attribute<T> getAttribute(String name);
    boolean hasRole(String role);
    boolean isAnonymous();
}

Quarkus-specific security identity interface providing access to authentication and authorization information.

Usage Example:

@Path("/secure")
public class SecureResource {
    
    @Inject
    SecurityIdentity identity;
    
    @GET
    @RolesAllowed("user")
    public String userEndpoint() {
        return "Hello " + identity.getPrincipal().getName();
    }
    
    @GET
    @Path("/admin")
    @RolesAllowed("admin")
    public String adminEndpoint() {
        return "Admin access granted";
    }
}

Install with Tessl CLI

npx tessl i tessl/maven-io-quarkus--quarkus-bom

docs

cdi-dependency-injection.md

configuration.md

core-runtime.md

data-persistence.md

index.md

reactive-programming.md

rest-web-services.md

scheduling.md

security.md

testing.md

tile.json