Skip to content
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

Add password file option to JMX config. #162

Merged
merged 3 commits into from
Feb 16, 2024
Merged

Conversation

jefchien
Copy link

Description: Instead of storing the password in plaintext in the receiver config, provide the option to read it in from a read-restricted file in a Java Properties file format.

Testing: Built and tested.
On start up if the file is missing:

receivers::jmx: `password_file` is inaccessible: stat /home/ec2-user/jmxremote.password: no such file or directory

When file is not read-restricted:

receivers::jmx: `password_file` read access must be restricted to owner-only: /home/ec2-user/jmxremote.password

If both are valid, then on start up the password will be present in the jmx-config-*.properties file, which has 0600 access.

A known issue is that if the file is also being used by the JMX agent and the file has read-write permissions, the JMX agent will hash the password, which the collector cannot use. The collector should use a separate file with only the passwords it needs.

Documentation: Added field to README for receiver.

@sethAmazon
Copy link

This will still add in plain text to the otel jar file?

sethAmazon
sethAmazon previously approved these changes Feb 16, 2024
okankoAMZ
okankoAMZ previously approved these changes Feb 16, 2024
@jefchien jefchien dismissed stale reviews from okankoAMZ and sethAmazon via 529ab07 February 16, 2024 16:38
okankoAMZ
okankoAMZ previously approved these changes Feb 16, 2024
sethAmazon
sethAmazon previously approved these changes Feb 16, 2024
sky333999
sky333999 previously approved these changes Feb 16, 2024
@jefchien jefchien dismissed stale reviews from sky333999, sethAmazon, and okankoAMZ via 3ed02e0 February 16, 2024 16:56
@jefchien jefchien merged commit b64e298 into aws-cwa-dev Feb 16, 2024
64 of 67 checks passed
@jefchien jefchien deleted the jmx-update-config branch February 16, 2024 17:18
KlwntSingh pushed a commit to KlwntSingh/opentelemetry-collector-contrib that referenced this pull request Feb 22, 2024
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.

4 participants