Package org.apache.druid.server.security
Class AuthConfig
java.lang.Object
org.apache.druid.server.security.AuthConfig
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAuthConfig object is created via Jackson in production. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSet of context keys which are always permissible because something in the Druid code itself sets the key before the security check.static final Stringstatic final Stringstatic final StringHTTP attribute that holds an AuthenticationResult, with info about a successful authentication check.static final StringHTTP attribute set when a static method in AuthorizationUtils performs an authorization check on the request.static final String -
Constructor Summary
ConstructorsConstructorDescriptionAuthConfig(List<String> authenticatorChain, List<String> authorizers, List<String> unsecuredPaths, boolean allowUnauthenticatedHttpOptions, boolean authorizeQueryContextParams, Set<String> unsecuredContextKeys, Set<String> securedContextKeys, boolean enableInputSourceSecurity) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontextKeysToAuthorize(Set<String> userKeys) Filter the user-supplied context keys based on the context key security rules.booleaninthashCode()booleanbooleanstatic AuthConfig.BuildertoString()
-
Field Details
-
DRUID_AUTHENTICATION_RESULT
HTTP attribute that holds an AuthenticationResult, with info about a successful authentication check.- See Also:
-
DRUID_AUTHORIZATION_CHECKED
HTTP attribute set when a static method in AuthorizationUtils performs an authorization check on the request.- See Also:
-
DRUID_ALLOW_UNSECURED_PATH
- See Also:
-
ALLOW_ALL_NAME
- See Also:
-
ANONYMOUS_NAME
- See Also:
-
TRUSTED_DOMAIN_NAME
- See Also:
-
ALLOWED_CONTEXT_KEYS
Set of context keys which are always permissible because something in the Druid code itself sets the key before the security check.
-
-
Constructor Details
-
AuthConfig
public AuthConfig() -
AuthConfig
-
-
Method Details
-
getAuthenticatorChain
-
getAuthorizers
-
getUnsecuredPaths
-
isAllowUnauthenticatedHttpOptions
public boolean isAllowUnauthenticatedHttpOptions() -
authorizeQueryContextParams
public boolean authorizeQueryContextParams() -
isEnableInputSourceSecurity
public boolean isEnableInputSourceSecurity() -
contextKeysToAuthorize
Filter the user-supplied context keys based on the context key security rules. If context key security is disabled, then allow all keys. Else, apply the three key lists defined here.- Allow Druid-defined keys.
- Allow anything not in the secured context key list.
- Allow anything in the config-defined unsecured key list.
- Returns:
- the list of secured keys to check via authentication
-
equals
-
hashCode
public int hashCode() -
toString
-
newBuilder
-