I want to hide password in common.runtime.properties. Do I need to use Druid's Password Provider?

Hello.

I want to hide password in common.runtime.properties.

According to Druid docs (https://druid.apache.org/docs/0.17.0/operations/password-provider.html#docsNav),

Environment variable password provider provides password by looking at specified environment variable. Use this in order to avoid specifying password in runtime.properties file. e.g

{ “type”: “environment”, “variable”: “METADATA_STORAGE_PASSWORD” }

But I feel that explanation is lacking.

Do I need to use Druid’s Password Provider? How can i use Password Provider to hide password in common.runtime.properties?

Thanks.

Hey JiHyeong,

PasswordProviders are exactly what you want to use here. To use the EnvironmentVariablePasswordProvider, you’ll need to set an environment variable in the context of your Druid start scripts (e.g. export a variable named “METADATA_STORAGE_PASSWORD” for the example above). If you want to implement your own PasswordProvider (perhaps because you have a different method of managing passwords), there’s a bare-bones guide to get you started. If you need help, this mailing list and the Druid slack channel are good places to start.