Class MtlsAuthenticationMechanism
java.lang.Object
io.quarkus.vertx.http.runtime.security.MtlsAuthenticationMechanism
- All Implemented Interfaces:
HttpAuthenticationMechanism
public final class MtlsAuthenticationMechanism
extends Object
implements HttpAuthenticationMechanism
The authentication handler responsible for mTLS client authentication.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism
HttpAuthenticationMechanism.ChallengeSender -
Field Summary
FieldsFields inherited from interface io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism
DEFAULT_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionMtlsAuthenticationMechanism(boolean inclusiveAuthentication) MtlsAuthenticationMechanism(MTLS.Builder.MTLSConfig mtlsConfig) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<io.quarkus.security.identity.SecurityIdentity> authenticate(io.vertx.ext.web.RoutingContext context, io.quarkus.security.identity.IdentityProviderManager identityProviderManager) io.smallrye.mutiny.Uni<ChallengeData> getChallenge(io.vertx.ext.web.RoutingContext context) io.smallrye.mutiny.Uni<HttpCredentialTransport> getCredentialTransport(io.vertx.ext.web.RoutingContext context) The credential transport, used for finding the best candidate for authenticating and challenging when more than one mechanism is installed.If this mechanism delegates authentication to theIdentityProviderManagerusing theIdentityProviderManager.authenticate(AuthenticationRequest)call, then the mechanism must provide supportedAuthenticationRequestrequest types.(package private) io.quarkus.tls.TlsConfigurationintReturns a priority which determines in which order HttpAuthenticationMechanisms handle the authentication and challenge requests when it is not possible to select the best candidate authentication mechanism based on the request credentials or path specific configuration.(package private) io.vertx.core.http.ClientAuth(package private) boolean(package private) voidsetCertificateToRolesMapper(Function<X509Certificate, Set<String>> certificateToRoles) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism
sendChallenge
-
Field Details
-
INCLUSIVE_AUTHENTICATION_PRIORITY
public static final int INCLUSIVE_AUTHENTICATION_PRIORITY- See Also:
-
-
Constructor Details
-
MtlsAuthenticationMechanism
@Inject MtlsAuthenticationMechanism(boolean inclusiveAuthentication) -
MtlsAuthenticationMechanism
-
-
Method Details
-
authenticate
public io.smallrye.mutiny.Uni<io.quarkus.security.identity.SecurityIdentity> authenticate(io.vertx.ext.web.RoutingContext context, io.quarkus.security.identity.IdentityProviderManager identityProviderManager) - Specified by:
authenticatein interfaceHttpAuthenticationMechanism
-
getChallenge
- Specified by:
getChallengein interfaceHttpAuthenticationMechanism
-
getCredentialTypes
public Set<Class<? extends io.quarkus.security.identity.request.AuthenticationRequest>> getCredentialTypes()Description copied from interface:HttpAuthenticationMechanismIf this mechanism delegates authentication to theIdentityProviderManagerusing theIdentityProviderManager.authenticate(AuthenticationRequest)call, then the mechanism must provide supportedAuthenticationRequestrequest types. It allows Quarkus to validate that one or moreIdentityProviderproviders with matching supportedIdentityProvider.getRequestType()request types exist and fail otherwise.- Specified by:
getCredentialTypesin interfaceHttpAuthenticationMechanism- Returns:
- required credential types
-
getCredentialTransport
public io.smallrye.mutiny.Uni<HttpCredentialTransport> getCredentialTransport(io.vertx.ext.web.RoutingContext context) Description copied from interface:HttpAuthenticationMechanismThe credential transport, used for finding the best candidate for authenticating and challenging when more than one mechanism is installed.This method must be implemented if either
HttpAuthenticationMechanism.value()or an HTTP security policy's `auth-mechanism` property has to be set to find a matchingHttpAuthenticationMechanismthat must secure a specific REST resource method or request path.May be
Uniwith null item if this mechanism cannot interfere with other mechanisms.- Specified by:
getCredentialTransportin interfaceHttpAuthenticationMechanism
-
getPriority
public int getPriority()Description copied from interface:HttpAuthenticationMechanismReturns a priority which determines in which order HttpAuthenticationMechanisms handle the authentication and challenge requests when it is not possible to select the best candidate authentication mechanism based on the request credentials or path specific configuration. Multiple mechanisms are sorted in descending order, so the highest priority gets the first chance to send a challenge. The default priority is equal to 1000.- Specified by:
getPriorityin interfaceHttpAuthenticationMechanism- Returns:
- priority
-
getTlsClientAuth
io.vertx.core.http.ClientAuth getTlsClientAuth() -
setCertificateToRolesMapper
-
isCertificateToRolesMapperSet
boolean isCertificateToRolesMapperSet() -
getHttpServerTlsConfigName
-
getInitialTlsConfiguration
io.quarkus.tls.TlsConfiguration getInitialTlsConfiguration()
-