-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ease of hidding sensitive properties from /status/proper… #12950
Conversation
Thanks for your contribution. I'm wondering why not combine hiddenProperties = Sets.newHashSet(
"druid.s3.accessKey",
"druid.s3.secretKey",
"druid.metadata.storage.connector.password",
"password",
"key",
"token",
"pwd"); I think this won't introduce another property for users to config. |
Thanks a lot for your advice. If I understand correctly, your proposal is to have only Think with this approach indeed we can make it one configurable property, just by default it will be a bit slow to hide these properties since it checks substrings. Would this be something acceptable? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems to me that it would make most sense to change behavior of existing config to your proposed behavior of hiddenPropertiesContain. The existing behavior should still match and exclude exact matches so clusters who leverage the config already won't see a difference on upgrade. This way there is only one configuration to manage. Unless I'm missing some issue that this would introduce?
also, if this config is still not documented as the issue states, we should add the config to documentation for clarity.
Because of a recent Travis change that introduced a "silent" merge conflict, you will need to rebase this PR on the latest master to pick up the newest Travis file. |
Indeed using one field approach is elegant and users don't need to remember many properties. If we directly adjust the behavior for |
…ties endpoint using one property for hiding properties, updated the index.md to document hiddenProperties
…ties endpoint Added java docs
Already put a note at the index.md regarding the change of behavior on this property |
The performance is acceptable since it's only used in a RESTful API which is accessed in low frequency. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few nits and one idea about a new default list to be more aggressive at redacting properties by default
server/src/main/java/org/apache/druid/client/DruidServerConfig.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/druid/server/StatusResource.java
Outdated
Show resolved
Hide resolved
…ties endpoint Add "password", "key", "token", "pwd" as default druid.server.hiddenProperties fixed typo and removed redundant space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
May I ask anything still to be done before merging it? |
No changes expected to be needed. I usually leave a PR open for a bit after approving to make sure the others who have participated in the review have some time to circle back and add thoughts if they have them so we can avoid having to create a follow on PR if more changes are needed. I will plan on merging either this afternoon or tomorrow morning depending on my availability |
I'm actually going to email the dev list to see if we want to backport this into Druid 24 branch because I fear that many live environments are unknowingly exposing secrets in plaintext. Hopefully |
That'd be great! Thanks @capistrant! |
@zemin-piao Thank you for the contribution! This will definitely help shore up the the security of many live clusters |
with the new behaviour, couldn't we just set the default to |
In case of downgrading the version, we also want to make sure the property file still contains |
* #12063 Ease of hidding sensitive properties from /status/properties endpoint * #12063 Ease of hidding sensitive properties from /status/properties endpoint * #12063 Ease of hidding sensitive properties from /status/properties endpoint using one property for hiding properties, updated the index.md to document hiddenProperties * #12063 Ease of hidding sensitive properties from /status/properties endpoint Added java docs * #12063 Ease of hidding sensitive properties from /status/properties endpoint Add "password", "key", "token", "pwd" as default druid.server.hiddenProperties fixed typo and removed redundant space Co-authored-by: zemin <[email protected]>
I have also backported the change to the 24.0.0 branch. |
Awesome! Thanks a lot |
Unfortunately, I found this patch to be invalid after deploying it to a cluster of mine. #13045 is posted to fix in master and will also need to be backported to 24.0.0 |
ooops yeah Thanks a bunch for spotting it and fix it! |
…ties endpoint
Description
Fixes #12063.
This PR has: