Skip to content

SOLR-15525: Read ZK credentials from a file specified using a system property instead of exposing plain-text credentials#222

Merged
thelabdude merged 4 commits intoapache:mainfrom
thelabdude:SOLR-15525-take2
Jul 16, 2021
Merged

SOLR-15525: Read ZK credentials from a file specified using a system property instead of exposing plain-text credentials#222
thelabdude merged 4 commits intoapache:mainfrom
thelabdude:SOLR-15525-take2

Conversation

@thelabdude
Copy link
Contributor

@thelabdude thelabdude commented Jul 15, 2021

https://issues.apache.org/jira/browse/SOLR-15525

Description

Added new Java system property zkDigestCredentialsFile to allow loading of zk creds from a file instead of from system properties.

Tests

Added to existing unit test VMParamsZkACLAndCredentialsProvidersTest to use the new zkDigestCredentialsFile feature.

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide

…property instead of exposing plain-text credentials
Copy link
Contributor

@HoustonPutman HoustonPutman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean and Simple 👍

…ntialsProvidersTest.java

Co-authored-by: Mike Drob <mdrob@apache.org>
@madrob
Copy link
Contributor

madrob commented Jul 15, 2021

Yea but I didn’t test it 😅

@thelabdude
Copy link
Contributor Author

@madrob ~ forbidden check didn't like your suggested change:

Forbidden method invocation: java.util.Properties#store(java.io.OutputStream,java.lang.String) [Properties files should be read/written with Reader/Writer, using UTF-8 charset. This allows reading older files with unicode escapes, too.]
  in org.apache.solr.cloud.VMParamsZkACLAndCredentialsProvidersTest (VMParamsZkACLAndCredentialsProvidersTest.java:302)
> Task :solr:core:forbiddenApisTest

It looks like it wants a FileWriter like I had originally.

@thelabdude thelabdude merged commit 9501d3f into apache:main Jul 16, 2021
epugh pushed a commit to epugh/solr that referenced this pull request Oct 22, 2021
…property instead of exposing plain-text credentials (apache#222)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants