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

documentation for signature verification #143

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions pages/guide/v5/04-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,3 +373,25 @@ HJSON configuration files can be validated against schemas using the command-lin
`java -cp elide-*-example.jar com.yahoo.elide.modelconfig.validator.DynamicConfigValidator --configDir <Path for Config Directory>`

1. The config directory needs to adhere to this [file layout](#file-layout).

## Signature Verification

Elide supports RSA signature verification of Hjson configuration files
ayeswarya marked this conversation as resolved.
Show resolved Hide resolved

1. Generate a TAR file of the models directory. Refer [file layout](#file-layout) for model directory structure.
ayeswarya marked this conversation as resolved.
Show resolved Hide resolved

`bash tar -czvf models.tar.gz models/`

1. Generate an RSA Public and Private Key Pair.
Copy link
Member

Choose a reason for hiding this comment

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

We should provide commands here as an example of how to do each step.


1. Create an RSA signature using the content of the TAR file and the RSA Private key.

1. Add the public key to the Java Keystore.

1. Use the DynamicConfigVerifier to validate the RSA signature using the Public Key.
ayeswarya marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

We are missing a section (and related code) for how to configure Elide to check this at service start.


```
a) java -cp elide-*-example.jar com.yahoo.elide.contrib.dynamicconfighelpers.verify.DynamicConfigVerifier --tarFile <Path of model config tar file> --signatureFile <Path of Signature file> --publicKeyName <Name of the public key in keystore>

b) java -cp elide-*-example.jar com.yahoo.elide.contrib.dynamicconfighelpers.verify.DynamicConfigVerifier --help
```