Skip to content

Commit

Permalink
Added proxy obfuscation to pluginctl.sh, refined README
Browse files Browse the repository at this point in the history
  • Loading branch information
sschwartzman committed Oct 22, 2020
1 parent 3b3635e commit d666794
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,20 @@ For additional security, this integration supports the using obfuscated values f

1. Prerequesite: [New Relic CLI is installed](https://github.com/newrelic/newrelic-cli#installation) on any supported platform.
* **NOTE**: It does NOT need to be installed on the same host as the Unix Monitor. It is only used to generate the obfuscated keys, this integration handles deobfuscation independently.

2. Generate your obfuscated credentials using the following CLI command:
```
newrelic agent config obfuscate --key OBSCURING_KEY --value "CLEAR_TEXT_PROXY_PASSWORD"
newrelic agent config obfuscate --key "OBSCURING_KEY" --value "CLEAR_TEXT_PROXY_PASSWORD"
```
In this command, `OBSCURING_KEY` can be any value you want. You can even point it at an existing environment variable. Examples:
```
The obscuring key may also be configured by setting the `NEW_RELIC_CONFIG_OBSCURING_KEY` environment variable.
newrelic agent config obfuscate --key "IUsedS0methingRand0m!" --value "proxyPassword2020!"
newrelic agent config obfuscate --key ${NEW_RELIC_CONFIG_OBSCURING_KEY} --value ${OUR_PROXY_PASSWORD}
```

3. In the `proxy` object in `plugin.json`, populate the `proxy_username_obfuscated` and `proxy_password_obfuscated` attributes with the values returned by the CLI.

3. In the `proxy` object, populate the `proxy_username_obfuscated` and `proxy_password_obfuscated` attributes with the values returned by the CLI.
4. In `pluginctl.sh`, uncomment the `NEW_RELIC_CONFIG_OBSCURING_KEY` variable, and set it to the same value or envrionment variable as you used in step 2 for `OBSCURING_KEY`.

### Dashboard deployment

Expand Down
5 changes: 5 additions & 0 deletions pluginctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ DELETE_LOGS_ON_STARTUP=true
# OSX / MACOS:
# PLUGIN_JAVA=/Library/Java/JavaVirtualMachines/<version>/Contents/Commands/java

#
# Set to the value of your obfuscation key
# Either directly as the key, or indirectly as another environment variable
# NEW_RELIC_CONFIG_OBSCURING_KEY=your_key_or_envvar_here

### Do not change these unless instructed! ###

PLUGIN_NAME="New Relic Unix Monitor"
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.newrelic.experts</groupId>
<artifactId>newrelic-unix-monitor</artifactId>
<version>0.2.0</version>
<version>0.2.1</version>
<name>newrelic-unix-monitor</name>
<build>
<plugins>
Expand Down

0 comments on commit d666794

Please sign in to comment.