Class HttpSecurityImpl
java.lang.Object
io.quarkus.vertx.http.runtime.security.HttpSecurityImpl
- All Implemented Interfaces:
HttpSecurity
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.quarkus.vertx.http.security.HttpSecurity
HttpSecurity.Authorization, HttpSecurity.HttpPermission -
Constructor Summary
ConstructorsConstructorDescriptionHttpSecurityImpl(io.vertx.core.http.ClientAuth clientAuth, VertxHttpConfig vertxHttpConfig, Optional<String> httpServerTlsConfigName) -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddHttpPermissions(List<HttpSecurityConfiguration.HttpPermissionCarrier> httpPermissions) basic()Registers the Basic authentication mechanism in addition to all other global authentication mechanisms.Registers the Basic authentication mechanism in addition to all other global authentication mechanisms.This method is a shortcut forpath(path).methods("DELETE").This method is a shortcut forpath(path).methods("GET").(package private) io.vertx.core.http.ClientAuth(package private) List<HttpSecurityConfiguration.HttpPermissionCarrier> (package private) List<HttpAuthenticationMechanism> (package private) RolesMappingmechanism(HttpAuthenticationMechanism mechanism) Registers givenHttpAuthenticationMechanismin addition to all other global authentication mechanisms.mTLS()Registers the mutual TLS client authentication mechanism in addition to all other global authentication mechanisms.mTLS(MtlsAuthenticationMechanism mTLSAuthenticationMechanism) Registers the mutual TLS client authentication mechanism in addition to all other global authentication mechanisms.mTLS(io.vertx.core.http.ClientAuth tlsClientAuth) Registers the mutual TLS client authentication mechanism in addition to all other global authentication mechanisms.Registers the mutual TLS client authentication mechanism in addition to all other global authentication mechanisms.CreatesHttpSecurity.HttpPermissionin addition to the permissions configured in the 'application.properties' file.This method is a shortcut forpath(path).methods("POST").This method is a shortcut forpath(path).methods("PUT").rolesMapping(String sourceRole, String targetRole) rolesMapping(String sourceRole, List<String> targetRoles) rolesMapping(Map<String, List<String>> roleToRoles) Map the `SecurityIdentity` roles to deployment specific roles and add the matching roles to `SecurityIdentity`.
-
Constructor Details
-
HttpSecurityImpl
HttpSecurityImpl(io.vertx.core.http.ClientAuth clientAuth, VertxHttpConfig vertxHttpConfig, Optional<String> httpServerTlsConfigName)
-
-
Method Details
-
mechanism
Description copied from interface:HttpSecurityRegisters givenHttpAuthenticationMechanismin addition to all other global authentication mechanisms.- Specified by:
mechanismin interfaceHttpSecurity- Parameters:
mechanism-HttpAuthenticationMechanism- Returns:
- HttpSecurity
-
basic
Description copied from interface:HttpSecurityRegisters the Basic authentication mechanism in addition to all other global authentication mechanisms. This method is a shortcut formechanism(Basic.create()).- Specified by:
basicin interfaceHttpSecurity- Returns:
- HttpSecurity
-
basic
Description copied from interface:HttpSecurityRegisters the Basic authentication mechanism in addition to all other global authentication mechanisms. This method is a shortcut formechanism(Basic.realm(authenticationRealm)).- Specified by:
basicin interfaceHttpSecurity- Parameters:
authenticationRealm- see the 'quarkus.http.auth.realm' configuration property- Returns:
- HttpSecurity
-
mTLS
Description copied from interface:HttpSecurityRegisters the mutual TLS client authentication mechanism in addition to all other global authentication mechanisms. This method is a shortcut formTLS(ClientAuth.REQUIRED), therefore the client authentication is required.- Specified by:
mTLSin interfaceHttpSecurity- Returns:
- HttpSecurity
- See Also:
-
mTLS
public HttpSecurity mTLS(String tlsConfigurationName, io.quarkus.tls.TlsConfiguration tlsConfiguration) Description copied from interface:HttpSecurityRegisters the mutual TLS client authentication mechanism in addition to all other global authentication mechanisms. The TLS configuration is registered against the registry and is used by the HTTP server for the TLS communication. This method is a shortcut for thehttpSecurity.mTLS(MTLS.required(tlsConfigurationName, tlsConfiguration)), therefore the client authentication is required.- Specified by:
mTLSin interfaceHttpSecurity- Parameters:
tlsConfigurationName- the name of the configuration, cannot benull, cannot be<default>tlsConfiguration- the configuration cannot benull- Returns:
- HttpSecurity
- See Also:
-
mTLS
Description copied from interface:HttpSecurityRegisters the mutual TLS client authentication mechanism in addition to all other global authentication mechanisms.- Specified by:
mTLSin interfaceHttpSecurity- Parameters:
mTLSAuthenticationMechanism-MtlsAuthenticationMechanismbuild with theMTLSAPI- Returns:
- HttpSecurity
-
mTLS
Description copied from interface:HttpSecurityRegisters the mutual TLS client authentication mechanism in addition to all other global authentication mechanisms. If you need to define the client certificate attribute value to role mappings, please use theMTLSbuilder.- Specified by:
mTLSin interfaceHttpSecurity- Parameters:
tlsClientAuth- eitherClientAuth.REQUESTorClientAuth.REQUIRED; for more information, see theVertxHttpBuildTimeConfig.tlsClientAuth()configuration property- Returns:
- HttpSecurity
-
path
Description copied from interface:HttpSecurityCreatesHttpSecurity.HttpPermissionin addition to the permissions configured in the 'application.properties' file.- Specified by:
pathin interfaceHttpSecurity- Parameters:
patterns- path patterns; this is programmatic analogy to the 'quarkus.http.auth.permission."permissions".paths' configuration property, same rules apply- Returns:
- new
HttpSecurity.HttpPermission
-
get
Description copied from interface:HttpSecurityThis method is a shortcut forpath(path).methods("GET").- Specified by:
getin interfaceHttpSecurity- See Also:
-
put
Description copied from interface:HttpSecurityThis method is a shortcut forpath(path).methods("PUT").- Specified by:
putin interfaceHttpSecurity- See Also:
-
post
Description copied from interface:HttpSecurityThis method is a shortcut forpath(path).methods("POST").- Specified by:
postin interfaceHttpSecurity- See Also:
-
delete
Description copied from interface:HttpSecurityThis method is a shortcut forpath(path).methods("DELETE").- Specified by:
deletein interfaceHttpSecurity- See Also:
-
rolesMapping
Description copied from interface:HttpSecurityMap the `SecurityIdentity` roles to deployment specific roles and add the matching roles to `SecurityIdentity`. Programmatic analogy to the 'quarkus.http.auth.roles-mapping."role-name"' configuration property. If the configuration property is already set, invocation of this method fails as both methods are mutually exclusive.- Specified by:
rolesMappingin interfaceHttpSecurity
-
rolesMapping
- Specified by:
rolesMappingin interfaceHttpSecurity- See Also:
-
rolesMapping
- Specified by:
rolesMappingin interfaceHttpSecurity- See Also:
-
addHttpPermissions
-
getHttpPermissions
List<HttpSecurityConfiguration.HttpPermissionCarrier> getHttpPermissions() -
getRolesMapping
RolesMapping getRolesMapping() -
getMechanisms
List<HttpAuthenticationMechanism> getMechanisms() -
getClientAuth
io.vertx.core.http.ClientAuth getClientAuth() -
getHttpServerTlsConfigName
-