blob: 5e723bf33b9bf78d771dec341bac634aa0d008af [file] [log] [blame]
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4078],{15680:(e,t,n)=>{n.d(t,{xA:()=>p,yg:()=>c});var a=n(96540);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),u=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},y=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=u(n),y=r,c=d["".concat(s,".").concat(y)]||d[y]||g[y]||i;return n?a.createElement(c,o(o({ref:t},p),{},{components:n})):a.createElement(c,o({ref:t},p))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=y;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:r,o[1]=l;for(var u=2;u<i;u++)o[u]=n[u];return a.createElement.apply(null,o)}return a.createElement.apply(null,n)}y.displayName="MDXCreateElement"},53369:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>c,frontMatter:()=>l,metadata:()=>u,toc:()=>d});var a=n(58168),r=n(98587),i=(n(96540),n(15680)),o=["components"],l={id:"druid-basic-security",title:"Basic Security"},s=void 0,u={unversionedId:"development/extensions-core/druid-basic-security",id:"development/extensions-core/druid-basic-security",title:"Basic Security",description:"\x3c!--",source:"@site/docs/29.0.0/development/extensions-core/druid-basic-security.md",sourceDirName:"development/extensions-core",slug:"/development/extensions-core/druid-basic-security",permalink:"/docs/29.0.0/development/extensions-core/druid-basic-security",draft:!1,tags:[],version:"current",frontMatter:{id:"druid-basic-security",title:"Basic Security"}},p={},d=[{value:"Configuration",id:"configuration",level:2},{value:"General properties",id:"general-properties",level:3},{value:"Authenticator",id:"authenticator",level:3},{value:"Properties for Druid metadata store user authentication",id:"properties-for-druid-metadata-store-user-authentication",level:4},{value:"Credential iterations and API performance",id:"credential-iterations-and-api-performance",level:5},{value:"Properties for LDAP user authentication",id:"properties-for-ldap-user-authentication",level:4},{value:"Escalator",id:"escalator",level:3},{value:"Properties",id:"properties",level:4},{value:"Authorizer",id:"authorizer",level:3},{value:"Properties for Druid metadata store user authorization",id:"properties-for-druid-metadata-store-user-authorization",level:4},{value:"Properties for LDAP user authorization",id:"properties-for-ldap-user-authorization",level:4},{value:"Properties for LDAPS",id:"properties-for-ldaps",level:4},{value:"Usage",id:"usage",level:2},{value:"Coordinator Security API",id:"coordinator-security-api",level:3},{value:"Authentication API",id:"authentication-api",level:4},{value:"User/Credential Management",id:"usercredential-management",level:5},{value:"Cache Load Status",id:"cache-load-status",level:5},{value:"Authorization API",id:"authorization-api",level:4},{value:"User Creation/Deletion",id:"user-creationdeletion",level:5},{value:"Group mapping Creation/Deletion",id:"group-mapping-creationdeletion",level:5},{value:"Role Creation/Deletion",id:"role-creationdeletion",level:4},{value:"Role Assignment",id:"role-assignment",level:4},{value:"Permissions",id:"permissions",level:4},{value:"Cache Load Status",id:"cache-load-status-1",level:5}],g={toc:d},y="wrapper";function c(e){var t=e.components,n=(0,r.A)(e,o);return(0,i.yg)(y,(0,a.A)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,i.yg)("p",null,"The Basic Security extension for Apache Druid adds:"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"an Authenticator which supports ",(0,i.yg)("a",{parentName:"li",href:"https://en.wikipedia.org/wiki/Basic_access_authentication"},"HTTP Basic authentication")," using the Druid metadata store or LDAP as its credentials store."),(0,i.yg)("li",{parentName:"ul"},"an Escalator which determines the authentication scheme for internal Druid processes."),(0,i.yg)("li",{parentName:"ul"},"an Authorizer which implements basic role-based access control for Druid metadata store or LDAP users and groups.")),(0,i.yg)("p",null,"To load the extension, ",(0,i.yg)("a",{parentName:"p",href:"/docs/29.0.0/configuration/extensions#loading-extensions"},"include")," ",(0,i.yg)("inlineCode",{parentName:"p"},"druid-basic-security")," in the ",(0,i.yg)("inlineCode",{parentName:"p"},"druid.extensions.loadList")," in your ",(0,i.yg)("inlineCode",{parentName:"p"},"common.runtime.properties"),". For example:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre"},'druid.extensions.loadList=["postgresql-metadata-storage", "druid-hdfs-storage", "druid-basic-security"]\n')),(0,i.yg)("p",null,"To enable basic auth, configure the basic Authenticator, Escalator, and Authorizer in ",(0,i.yg)("inlineCode",{parentName:"p"},"common.runtime.properties"),".\nSee ",(0,i.yg)("a",{parentName:"p",href:"/docs/29.0.0/operations/security-overview#enable-an-authenticator"},"Security overview")," for an example configuration for HTTP basic authentication."),(0,i.yg)("p",null,"Visit ",(0,i.yg)("a",{parentName:"p",href:"/docs/29.0.0/operations/auth"},"Authentication and Authorization")," for more information on the implemented extension interfaces and for an example configuration."),(0,i.yg)("h2",{id:"configuration"},"Configuration"),(0,i.yg)("p",null,"The examples in the section use the following names for the Authenticators and Authorizers:"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"MyBasicMetadataAuthenticator")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"MyBasicLDAPAuthenticator")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"MyBasicMetadataAuthorizer")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"MyBasicLDAPAuthorizer"))),(0,i.yg)("p",null,"These properties are not tied to specific Authenticator or Authorizer instances."),(0,i.yg)("p",null,"To set the value for the configuration properties, add them to the common runtime properties file."),(0,i.yg)("h3",{id:"general-properties"},"General properties"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.basic.common.pollingPeriod"))),(0,i.yg)("p",null,"Defines in milliseconds how often processes should poll the Coordinator for the current Druid metadata store authenticator/authorizer state.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": 60000"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.basic.common.maxRandomDelay"))),(0,i.yg)("p",null,"Defines in milliseconds the amount of random delay to add to the pollingPeriod, to spread polling requests across time.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": 6000"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.basic.common.maxSyncRetries"))),(0,i.yg)("p",null,"Determines how many times a service will retry if the authentication/authorization Druid metadata store state sync with the Coordinator fails.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": 10"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.basic.common.cacheDirectory"))),(0,i.yg)("p",null,"If defined, snapshots of the basic Authenticator and Authorizer Druid metadata store caches will be stored on disk in this directory. If this property is defined, when a service is starting, it will attempt to initialize its caches from these on-disk snapshots, if the service is unable to initialize its state by communicating with the Coordinator.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": null"),(0,i.yg)("h3",{id:"authenticator"},"Authenticator"),(0,i.yg)("p",null,"To use the Basic authenticator, add an authenticator with type ",(0,i.yg)("inlineCode",{parentName:"p"},"basic")," to the authenticatorChain.\nThe default credentials validator (",(0,i.yg)("inlineCode",{parentName:"p"},"credentialsValidator"),") is ",(0,i.yg)("inlineCode",{parentName:"p"},"metadata"),". To use the LDAP validator, define a credentials validator with a type of 'ldap'."),(0,i.yg)("p",null,"Use the following syntax to configure a named authenticator:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre"},"druid.auth.authenticator.<authenticatorName>.<authenticatorProperty>\n")),(0,i.yg)("p",null,"Example configuration of an authenticator that uses the Druid metadata store to look up and validate credentials:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre"},"# Druid basic security\ndruid.auth.authenticatorChain=[\"MyBasicMetadataAuthenticator\"]\ndruid.auth.authenticator.MyBasicMetadataAuthenticator.type=basic\n\n# Default password for 'admin' user, should be changed for production.\ndruid.auth.authenticator.MyBasicMetadataAuthenticator.initialAdminPassword=password1\n\n# Default password for internal 'druid_system' user, should be changed for production.\ndruid.auth.authenticator.MyBasicMetadataAuthenticator.initialInternalClientPassword=password2\n\n# Uses the metadata store for storing users, you can use authentication API to create new users and grant permissions\ndruid.auth.authenticator.MyBasicMetadataAuthenticator.credentialsValidator.type=metadata\n\n# If true and the request credential doesn't exists in this credentials store, the request will proceed to next Authenticator in the chain.\ndruid.auth.authenticator.MyBasicMetadataAuthenticator.skipOnFailure=false\ndruid.auth.authenticator.MyBasicMetadataAuthenticator.authorizerName=MyBasicMetadataAuthorizer\n")),(0,i.yg)("p",null,"The remaining examples of authenticator configuration use either ",(0,i.yg)("inlineCode",{parentName:"p"},"MyBasicMetadataAuthenticator")," or ",(0,i.yg)("inlineCode",{parentName:"p"},"MyBasicLDAPAuthenticator")," as the authenticator name."),(0,i.yg)("h4",{id:"properties-for-druid-metadata-store-user-authentication"},"Properties for Druid metadata store user authentication"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicMetadataAuthenticator.initialAdminPassword"))),(0,i.yg)("p",null,"Initial ",(0,i.yg)("a",{parentName:"p",href:"/docs/29.0.0/operations/password-provider"},"Password Provider")," for the automatically created default admin user. If no password is specified, the default admin user will not be created. If the default admin user already exists, setting this property will not affect its password.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": null"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicMetadataAuthenticator.initialInternalClientPassword"))),(0,i.yg)("p",null,"Initial ",(0,i.yg)("a",{parentName:"p",href:"/docs/29.0.0/operations/password-provider"},"Password Provider")," for the default internal system user, used for internal process communication. If no password is specified, the default internal system user will not be created. If the default internal system user already exists, setting this property will not affect its password.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": null"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicMetadataAuthenticator.enableCacheNotifications"))),(0,i.yg)("p",null,"If true, the Coordinator will notify Druid processes whenever a configuration change to this Authenticator occurs, allowing them to immediately update their state without waiting for polling.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": True"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicMetadataAuthenticator.cacheNotificationTimeout"))),(0,i.yg)("p",null,"The timeout in milliseconds for the cache notifications.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": 5000"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicMetadataAuthenticator.credentialIterations"))),(0,i.yg)("p",null,"Number of iterations to use for password hashing. See ",(0,i.yg)("a",{parentName:"p",href:"#credential-iterations-and-api-performance"},"Credential iterations and API performance"),(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": 10000"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicMetadataAuthenticator.credentialsValidator.type"))),(0,i.yg)("p",null,"The type of credentials store (metadata) to validate requests credentials.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": metadata"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicMetadataAuthenticator.skipOnFailure"))),(0,i.yg)("p",null,"If true and the request credential doesn't exists or isn't fully configured in the credentials store, the request will proceed to next Authenticator in the chain.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": false"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicMetadataAuthenticator.authorizerName"))),(0,i.yg)("p",null,"Authorizer that requests should be directed to.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": Yes",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": N/A"),(0,i.yg)("h5",{id:"credential-iterations-and-api-performance"},"Credential iterations and API performance"),(0,i.yg)("p",null,"As noted above, ",(0,i.yg)("inlineCode",{parentName:"p"},"credentialIterations")," determines the number of iterations used to hash a password. A higher number increases security, but costs more in terms of CPU utilization. "),(0,i.yg)("p",null,"This cost affects API performance, including query times. The default setting of 10000 is intentionally high to prevent attackers from using brute force to guess passwords."),(0,i.yg)("p",null,"You can decrease the number of iterations to speed up API response times, but it may expose your system to dictionary attacks. Therefore, only reduce the number of iterations if your environment fits one of the following conditions:"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"All")," passwords are long and random which make them as safe as a randomly-generated token."),(0,i.yg)("li",{parentName:"ul"},"You have secured network access to Druid so that no attacker can execute a dictionary attack against it.")),(0,i.yg)("p",null,"If Druid uses the default credentials validator (i.e., ",(0,i.yg)("inlineCode",{parentName:"p"},"credentialsValidator.type=metadata"),"), changing the ",(0,i.yg)("inlineCode",{parentName:"p"},"credentialIterations")," value affects the number of hashing iterations only for users created after the change or for users who subsequently update their passwords via the ",(0,i.yg)("inlineCode",{parentName:"p"},"/druid-ext/basic-security/authentication/db/basic/users/{userName}/credentials")," endpoint. If Druid uses the ",(0,i.yg)("inlineCode",{parentName:"p"},"ldap")," validator, the change applies to any user at next log in (as well as to new users or users who update their passwords)."),(0,i.yg)("h4",{id:"properties-for-ldap-user-authentication"},"Properties for LDAP user authentication"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicLDAPAuthenticator.initialAdminPassword"))),(0,i.yg)("p",null,"Initial ",(0,i.yg)("a",{parentName:"p",href:"/docs/29.0.0/operations/password-provider"},"Password Provider")," for the automatically created default admin user. If no password is specified, the default admin user will not be created. If the default admin user already exists, setting this property will not affect its password.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": null"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicLDAPAuthenticator.initialInternalClientPassword"))),(0,i.yg)("p",null,"Initial ",(0,i.yg)("a",{parentName:"p",href:"/docs/29.0.0/operations/password-provider"},"Password Provider")," for the default internal system user, used for internal process communication. If no password is specified, the default internal system user will not be created. If the default internal system user already exists, setting this property will not affect its password.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": null"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicLDAPAuthenticator.enableCacheNotifications"))),(0,i.yg)("p",null,"If true, the Coordinator will notify Druid processes whenever a configuration change to this Authenticator occurs, allowing them to immediately update their state without waiting for polling.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": true"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicLDAPAuthenticator.cacheNotificationTimeout"))),(0,i.yg)("p",null,"The timeout in milliseconds for the cache notifications.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": 5000"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicLDAPAuthenticator.credentialIterations"))),(0,i.yg)("p",null,"Number of iterations to use for password hashing.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": 10000"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicLDAPAuthenticator.credentialsValidator.type"))),(0,i.yg)("p",null,"The type of credentials store (ldap) to validate requests credentials.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": metadata"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicLDAPAuthenticator.credentialsValidator.url"))),(0,i.yg)("p",null,"URL of the LDAP server.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": Yes",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": null"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicLDAPAuthenticator.credentialsValidator.bindUser"))),(0,i.yg)("p",null,"LDAP bind user username.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": Yes",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": null"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicLDAPAuthenticator.credentialsValidator.bindPassword"))),(0,i.yg)("p",null,(0,i.yg)("a",{parentName:"p",href:"/docs/29.0.0/operations/password-provider"},"Password Provider")," LDAP bind user password.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": Yes",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": null"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicLDAPAuthenticator.credentialsValidator.baseDn"))),(0,i.yg)("p",null,"The point from where the LDAP server will search for users.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": Yes",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": null"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicLDAPAuthenticator.credentialsValidator.userSearch"))),(0,i.yg)("p",null,"The filter/expression to use for the search. For example, (&(sAMAccountName=%s)(objectClass=user))",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": Yes",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": null"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicLDAPAuthenticator.credentialsValidator.userAttribute"))),(0,i.yg)("p",null,"The attribute id identifying the attribute that will be returned as part of the search. For example, sAMAccountName.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": Yes",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": null"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicLDAPAuthenticator.credentialsValidator.credentialVerifyDuration"))),(0,i.yg)("p",null,"The duration in seconds for how long valid credentials are verifiable within the cache when not requested.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": 600"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicLDAPAuthenticator.credentialsValidator.credentialMaxDuration"))),(0,i.yg)("p",null,"The max duration in seconds for valid credentials that can reside in cache regardless of how often they are requested.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": 3600"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicLDAPAuthenticator.credentialsValidator.credentialCacheSize"))),(0,i.yg)("p",null,"The valid credentials cache size. The cache uses a LRU policy.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": 100"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicLDAPAuthenticator.skipOnFailure"))),(0,i.yg)("p",null,"If true and the request credential doesn't exists or isn't fully configured in the credentials store, the request will proceed to next Authenticator in the chain.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": false"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authenticator.MyBasicLDAPAuthenticator.authorizerName"))),(0,i.yg)("p",null,"Authorizer that requests should be directed to.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": Yes",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": N/A"),(0,i.yg)("h3",{id:"escalator"},"Escalator"),(0,i.yg)("p",null,"The Escalator determines the authentication scheme to use for internal Druid cluster communications, for example, when a Broker service communicates with a Historical service during query processing."),(0,i.yg)("p",null,"Example configuration:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre"},"# Escalator\ndruid.escalator.type=basic\ndruid.escalator.internalClientUsername=druid_system\ndruid.escalator.internalClientPassword=password2\ndruid.escalator.authorizerName=MyBasicMetadataAuthorizer\n")),(0,i.yg)("h4",{id:"properties"},"Properties"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.escalator.internalClientUsername"))),(0,i.yg)("p",null,"The escalator will use this username for requests made as the internal system user.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": Yes",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": N/A"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.escalator.internalClientPassword"))),(0,i.yg)("p",null,"The escalator will use this ",(0,i.yg)("a",{parentName:"p",href:"/docs/29.0.0/operations/password-provider"},"Password Provider")," for requests made as the internal system user.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": Yes",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": N/A"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.escalator.authorizerName"))),(0,i.yg)("p",null,"Authorizer that requests should be directed to.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": Yes",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": N/A"),(0,i.yg)("h3",{id:"authorizer"},"Authorizer"),(0,i.yg)("p",null,"To use the Basic authorizer, add an authorizer with type ",(0,i.yg)("inlineCode",{parentName:"p"},"basic")," to the authorizers list."),(0,i.yg)("p",null,"Use the following syntax to configure a named authorizer:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre"},"druid.auth.authorizer.<authorizerName>.<authorizerProperty>\n")),(0,i.yg)("p",null,"Example configuration:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre"},'# Authorizer\ndruid.auth.authorizers=["MyBasicMetadataAuthorizer"]\ndruid.auth.authorizer.MyBasicMetadataAuthorizer.type=basic\n')),(0,i.yg)("p",null,"The examples in the rest of this article use ",(0,i.yg)("inlineCode",{parentName:"p"},"MyBasicMetadataAuthorizer")," or ",(0,i.yg)("inlineCode",{parentName:"p"},"MyBasicLDAPAuthorizer")," as the authorizer name."),(0,i.yg)("h4",{id:"properties-for-druid-metadata-store-user-authorization"},"Properties for Druid metadata store user authorization"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authorizer.MyBasicMetadataAuthorizer.enableCacheNotifications"))),(0,i.yg)("p",null,"If true, the Coordinator will notify Druid processes whenever a configuration change to this Authorizer occurs, allowing them to immediately update their state without waiting for polling.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": true"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authorizer.MyBasicMetadataAuthorizer.cacheNotificationTimeout"))),(0,i.yg)("p",null,"The timeout in milliseconds for the cache notifications.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": 5000"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authorizer.MyBasicMetadataAuthorizer.initialAdminUser"))),(0,i.yg)("p",null,"The initial admin user with role defined in initialAdminRole property if specified, otherwise the default admin role will be assigned.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": admin"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authorizer.MyBasicMetadataAuthorizer.initialAdminRole"))),(0,i.yg)("p",null,"The initial admin role to create if it doesn't already exists.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": admin"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authorizer.MyBasicMetadataAuthorizer.roleProvider.type"))),(0,i.yg)("p",null,"The type of role provider to authorize requests credentials.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": metadata"),(0,i.yg)("h4",{id:"properties-for-ldap-user-authorization"},"Properties for LDAP user authorization"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authorizer.MyBasicLDAPAuthorizer.enableCacheNotifications"))),(0,i.yg)("p",null,"If true, the Coordinator will notify Druid processes whenever a configuration change to this Authorizer occurs, allowing them to immediately update their state without waiting for polling.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": true"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authorizer.MyBasicLDAPAuthorizer.cacheNotificationTimeout"))),(0,i.yg)("p",null,"The timeout in milliseconds for the cache notifications.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": 5000"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authorizer.MyBasicLDAPAuthorizer.initialAdminUser"))),(0,i.yg)("p",null,"The initial admin user with role defined in initialAdminRole property if specified, otherwise the default admin role will be assigned.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": admin"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authorizer.MyBasicLDAPAuthorizer.initialAdminRole"))),(0,i.yg)("p",null,"The initial admin role to create if it doesn't already exists.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": admin"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authorizer.MyBasicLDAPAuthorizer.initialAdminGroupMapping"))),(0,i.yg)("p",null,"The initial admin group mapping with role defined in initialAdminRole property if specified, otherwise the default admin role will be assigned. The name of this initial admin group mapping will be set to adminGroupMapping",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": null"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authorizer.MyBasicLDAPAuthorizer.roleProvider.type"))),(0,i.yg)("p",null,"The type of role provider (ldap) to authorize requests credentials.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": metadata"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.authorizer.MyBasicLDAPAuthorizer.roleProvider.groupFilters"))),(0,i.yg)("p",null,"Array of LDAP group filters used to filter out the allowed set of groups returned from LDAP search. Filters can be begin with ",(0,i.yg)("em",{parentName:"p"},", or end with ,")," to provide configurational flexibility to limit or filter allowed set of groups available to LDAP Authorizer.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": null"),(0,i.yg)("h4",{id:"properties-for-ldaps"},"Properties for LDAPS"),(0,i.yg)("p",null,"Use the following properties to configure Druid authentication with LDAP over TLS (LDAPS). See ",(0,i.yg)("a",{parentName:"p",href:"/docs/29.0.0/operations/auth-ldap"},"Configure LDAP authentication")," for more information."),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.basic.ssl.protocol"))),(0,i.yg)("p",null,"SSL protocol to use. The TLS version is 1.2.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": Yes",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": tls"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.basic.ssl.trustStorePath"))),(0,i.yg)("p",null,"Path to the trust store file.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": Yes",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": N/A"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.basic.ssl.trustStorePassword"))),(0,i.yg)("p",null,"Password to access the trust store file.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": Yes",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": N/A"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.basic.ssl.trustStoreType"))),(0,i.yg)("p",null,"Format of the trust store file. For Java the format is jks.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": jks"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.basic.ssl.trustStoreAlgorithm"))),(0,i.yg)("p",null,"Algorithm used by the trust manager to validate certificate chains.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": N/A"),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},(0,i.yg)("inlineCode",{parentName:"strong"},"druid.auth.basic.ssl.trustStorePassword"))),(0,i.yg)("p",null,"Password details that enable access to the truststore.",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Required"),": No",(0,i.yg)("br",null),"\n","\xa0"," ","\xa0"," ","\xa0"," ","\xa0"," ","\xa0",(0,i.yg)("strong",{parentName:"p"},"Default"),": N/A"),(0,i.yg)("p",null,"Example LDAPS configuration:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-json"},"druid.auth.basic.ssl.protocol=tls\ndruid.auth.basic.ssl.trustStorePath=/usr/local/druid-path/certs/truststore.jks\ndruid.auth.basic.ssl.trustStorePassword=xxxxx\ndruid.auth.basic.ssl.trustStoreType=jks\ndruid.auth.basic.ssl.trustStoreAlgorithm=PKIX\n")),(0,i.yg)("p",null,"You can configure ",(0,i.yg)("inlineCode",{parentName:"p"},"druid.auth.basic.ssl.trustStorePassword")," to be a plain text password or you can set the password as an environment variable. See ",(0,i.yg)("a",{parentName:"p",href:"/docs/29.0.0/operations/password-provider"},"Password providers")," for more information."),(0,i.yg)("h2",{id:"usage"},"Usage"),(0,i.yg)("h3",{id:"coordinator-security-api"},"Coordinator Security API"),(0,i.yg)("p",null,'To use these APIs, a user needs read/write permissions for the CONFIG resource type with name "security".'),(0,i.yg)("h4",{id:"authentication-api"},"Authentication API"),(0,i.yg)("p",null,"Root path: ",(0,i.yg)("inlineCode",{parentName:"p"},"/druid-ext/basic-security/authentication")),(0,i.yg)("p",null,"Each API endpoint includes {authenticatorName}, specifying which Authenticator instance is being configured."),(0,i.yg)("h5",{id:"usercredential-management"},"User/Credential Management"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"GET(/druid-ext/basic-security/authentication/db/{authenticatorName}/users)"),(0,i.yg)("br",null),"\nReturn a list of all user names."),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"GET(/druid-ext/basic-security/authentication/db/{authenticatorName}/users/{userName})"),(0,i.yg)("br",null),"\nReturn the name and credentials information of the user with name {userName}"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"POST(/druid-ext/basic-security/authentication/db/{authenticatorName}/users/{userName})"),(0,i.yg)("br",null),"\nCreate a new user with name {userName}"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"DELETE(/druid-ext/basic-security/authentication/db/{authenticatorName}/users/{userName})"),(0,i.yg)("br",null),"\nDelete the user with name {userName}"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"POST(/druid-ext/basic-security/authentication/db/{authenticatorName}/users/{userName}/credentials)"),(0,i.yg)("br",null),"\nAssign a password used for HTTP basic authentication for {userName}\nContent: JSON password request object"),(0,i.yg)("p",null,"Example request body:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre"},'{\n "password": "helloworld"\n}\n')),(0,i.yg)("h5",{id:"cache-load-status"},"Cache Load Status"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"GET(/druid-ext/basic-security/authentication/loadStatus)"),(0,i.yg)("br",null),"\nReturn the current load status of the local caches of the authentication Druid metadata store."),(0,i.yg)("h4",{id:"authorization-api"},"Authorization API"),(0,i.yg)("p",null,"Root path: ",(0,i.yg)("inlineCode",{parentName:"p"},"/druid-ext/basic-security/authorization"),(0,i.yg)("br",null)),(0,i.yg)("p",null,"Each API endpoint includes {authorizerName}, specifying which Authorizer instance is being configured."),(0,i.yg)("h5",{id:"user-creationdeletion"},"User Creation/Deletion"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"GET(/druid-ext/basic-security/authorization/db/{authorizerName}/users)"),(0,i.yg)("br",null),"\nReturn a list of all user names."),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"GET(/druid-ext/basic-security/authorization/db/{authorizerName}/users/{userName})"),(0,i.yg)("br",null),"\nReturn the name and role information of the user with name {userName}"),(0,i.yg)("p",null,"Example output:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-json"},'{\n "name": "druid2",\n "roles": [\n "druidRole"\n ]\n}\n')),(0,i.yg)("p",null,"This API supports the following flags:"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"?full"),": The response will also include the full information for each role currently assigned to the user.")),(0,i.yg)("p",null,"Example output:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-json"},'{\n "name": "druid2",\n "roles": [\n {\n "name": "druidRole",\n "permissions": [\n {\n "resourceAction": {\n "resource": {\n "name": "A",\n "type": "DATASOURCE"\n },\n "action": "READ"\n },\n "resourceNamePattern": "A"\n },\n {\n "resourceAction": {\n "resource": {\n "name": "C",\n "type": "CONFIG"\n },\n "action": "WRITE"\n },\n "resourceNamePattern": "C"\n }\n ]\n }\n ]\n}\n')),(0,i.yg)("p",null,"The output format of this API when ",(0,i.yg)("inlineCode",{parentName:"p"},"?full")," is specified is deprecated and in later versions will be switched to the output format used when both ",(0,i.yg)("inlineCode",{parentName:"p"},"?full")," and ",(0,i.yg)("inlineCode",{parentName:"p"},"?simplifyPermissions")," flag is set."),(0,i.yg)("p",null,"The ",(0,i.yg)("inlineCode",{parentName:"p"},"resourceNamePattern")," is a compiled version of the resource name regex. It is redundant and complicates the use of this API for clients such as frontends that edit the authorization configuration, as the permission format in this output does not match the format used for adding permissions to a role."),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"?full?simplifyPermissions"),": When both ",(0,i.yg)("inlineCode",{parentName:"li"},"?full")," and ",(0,i.yg)("inlineCode",{parentName:"li"},"?simplifyPermissions")," are set, the permissions in the output will contain only a list of ",(0,i.yg)("inlineCode",{parentName:"li"},"resourceAction")," objects, without the extraneous ",(0,i.yg)("inlineCode",{parentName:"li"},"resourceNamePattern")," field.")),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-json"},'{\n "name": "druid2",\n "roles": [\n {\n "name": "druidRole",\n "users": null,\n "permissions": [\n {\n "resource": {\n "name": "A",\n "type": "DATASOURCE"\n },\n "action": "READ"\n },\n {\n "resource": {\n "name": "C",\n "type": "CONFIG"\n },\n "action": "WRITE"\n }\n ]\n }\n ]\n}\n')),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"POST(/druid-ext/basic-security/authorization/db/{authorizerName}/users/{userName})"),(0,i.yg)("br",null),"\nCreate a new user with name {userName}"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"DELETE(/druid-ext/basic-security/authorization/db/{authorizerName}/users/{userName})"),(0,i.yg)("br",null),"\nDelete the user with name {userName}"),(0,i.yg)("h5",{id:"group-mapping-creationdeletion"},"Group mapping Creation/Deletion"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"GET(/druid-ext/basic-security/authorization/db/{authorizerName}/groupMappings)"),(0,i.yg)("br",null),"\nReturn a list of all group mappings."),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"GET(/druid-ext/basic-security/authorization/db/{authorizerName}/groupMappings/{groupMappingName})"),(0,i.yg)("br",null),"\nReturn the group mapping and role information of the group mapping with name {groupMappingName}"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"POST(/druid-ext/basic-security/authorization/db/{authorizerName}/groupMappings/{groupMappingName})"),(0,i.yg)("br",null),"\nCreate a new group mapping with name {groupMappingName}\nContent: JSON group mapping object\nExample request body:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre"},'{\n "name": "user",\n "groupPattern": "CN=aaa,OU=aaa,OU=Groupings,DC=corp,DC=company,DC=com",\n "roles": [\n "user"\n ]\n}\n')),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"DELETE(/druid-ext/basic-security/authorization/db/{authorizerName}/groupMappings/{groupMappingName})"),(0,i.yg)("br",null),"\nDelete the group mapping with name {groupMappingName}"),(0,i.yg)("h4",{id:"role-creationdeletion"},"Role Creation/Deletion"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"GET(/druid-ext/basic-security/authorization/db/{authorizerName}/roles)"),(0,i.yg)("br",null),"\nReturn a list of all role names."),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"GET(/druid-ext/basic-security/authorization/db/{authorizerName}/roles/{roleName})"),(0,i.yg)("br",null),"\nReturn name and permissions for the role named {roleName}."),(0,i.yg)("p",null,"Example output:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-json"},'{\n "name": "druidRole2",\n "permissions": [\n {\n "resourceAction": {\n "resource": {\n "name": "E",\n "type": "DATASOURCE"\n },\n "action": "WRITE"\n },\n "resourceNamePattern": "E"\n }\n ]\n}\n')),(0,i.yg)("p",null,"The default output format of this API is deprecated and in later versions will be switched to the output format used when the ",(0,i.yg)("inlineCode",{parentName:"p"},"?simplifyPermissions")," flag is set. The ",(0,i.yg)("inlineCode",{parentName:"p"},"resourceNamePattern")," is a compiled version of the resource name regex. It is redundant and complicates the use of this API for clients such as frontends that edit the authorization configuration, as the permission format in this output does not match the format used for adding permissions to a role."),(0,i.yg)("p",null,"This API supports the following flags:"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"?full"),": The output will contain an extra ",(0,i.yg)("inlineCode",{parentName:"li"},"users")," list, containing the users that currently have this role.")),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-json"},'{"users":["druid"]}\n')),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"?simplifyPermissions"),": The permissions in the output will contain only a list of ",(0,i.yg)("inlineCode",{parentName:"li"},"resourceAction")," objects, without the extraneous ",(0,i.yg)("inlineCode",{parentName:"li"},"resourceNamePattern")," field. The ",(0,i.yg)("inlineCode",{parentName:"li"},"users")," field will be null when ",(0,i.yg)("inlineCode",{parentName:"li"},"?full")," is not specified.")),(0,i.yg)("p",null,"Example output:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-json"},'{\n "name": "druidRole2",\n "users": null,\n "permissions": [\n {\n "resource": {\n "name": "E",\n "type": "DATASOURCE"\n },\n "action": "WRITE"\n }\n ]\n}\n')),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"POST(/druid-ext/basic-security/authorization/db/{authorizerName}/roles/{roleName})"),(0,i.yg)("br",null),"\nCreate a new role with name {roleName}.\nContent: username string"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"DELETE(/druid-ext/basic-security/authorization/db/{authorizerName}/roles/{roleName})"),(0,i.yg)("br",null),"\nDelete the role with name {roleName}."),(0,i.yg)("h4",{id:"role-assignment"},"Role Assignment"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"POST(/druid-ext/basic-security/authorization/db/{authorizerName}/users/{userName}/roles/{roleName})"),(0,i.yg)("br",null),"\nAssign role {roleName} to user {userName}."),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"DELETE(/druid-ext/basic-security/authorization/db/{authorizerName}/users/{userName}/roles/{roleName})"),(0,i.yg)("br",null),"\nUnassign role {roleName} from user {userName}"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"POST(/druid-ext/basic-security/authorization/db/{authorizerName}/groupMappings/{groupMappingName}/roles/{roleName})"),(0,i.yg)("br",null),"\nAssign role {roleName} to group mapping {groupMappingName}."),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"DELETE(/druid-ext/basic-security/authorization/db/{authorizerName}/groupMappings/{groupMappingName}/roles/{roleName})"),(0,i.yg)("br",null),"\nUnassign role {roleName} from group mapping {groupMappingName}"),(0,i.yg)("h4",{id:"permissions"},"Permissions"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"POST(/druid-ext/basic-security/authorization/db/{authorizerName}/roles/{roleName}/permissions)"),(0,i.yg)("br",null),"\nSet the permissions of {roleName}. This replaces the previous set of permissions on the role."),(0,i.yg)("p",null,"Content: List of JSON Resource-Action objects, e.g.:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre"},'[\n{\n "resource": {\n "name": "wiki.*",\n "type": "DATASOURCE"\n },\n "action": "READ"\n},\n{\n "resource": {\n "name": "wikiticker",\n "type": "DATASOURCE"\n },\n "action": "WRITE"\n}\n]\n')),(0,i.yg)("p",null,'The "name" field for resources in the permission definitions are regexes used to match resource names during authorization checks.'),(0,i.yg)("p",null,"Please see ",(0,i.yg)("a",{parentName:"p",href:"/docs/29.0.0/operations/security-user-auth#defining-permissions"},"Defining permissions")," for more details."),(0,i.yg)("h5",{id:"cache-load-status-1"},"Cache Load Status"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"GET(/druid-ext/basic-security/authorization/loadStatus)"),(0,i.yg)("br",null),"\nReturn the current load status of the local caches of the authorization Druid metadata store."))}c.isMDXComponent=!0}}]);