secrets-cli

Command-line shell for managing secrets for authenticated OneOps users.

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

com.oneops
ArtifactId

ArtifactId

secrets-cli
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

secrets-cli
Command-line shell for managing secrets for authenticated OneOps users.
Project URL

Project URL

https://github.com/oneops/secrets-cli
Project Organization

Project Organization

Walmart, Inc.
Source Code Management

Source Code Management

https://github.com/oneops/secrets-cli

Download secrets-cli

How to add to project

<!-- https://jarcasting.com/artifacts/com.oneops/secrets-cli/ -->
<dependency>
    <groupId>com.oneops</groupId>
    <artifactId>secrets-cli</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.oneops/secrets-cli/
implementation 'com.oneops:secrets-cli:1.1.0'
// https://jarcasting.com/artifacts/com.oneops/secrets-cli/
implementation ("com.oneops:secrets-cli:1.1.0")
'com.oneops:secrets-cli:jar:1.1.0'
<dependency org="com.oneops" name="secrets-cli" rev="1.1.0">
  <artifact name="secrets-cli" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.oneops', module='secrets-cli', version='1.1.0')
)
libraryDependencies += "com.oneops" % "secrets-cli" % "1.1.0"
[com.oneops/secrets-cli "1.1.0"]

Dependencies

compile (8)

Group / Artifact Type Version
com.google.guava : guava jar 25.1-jre
io.airlift : airline jar 0.8
com.squareup.retrofit2 : retrofit jar 2.4.0
com.squareup.retrofit2 : converter-moshi jar 2.4.0
com.squareup.moshi : moshi jar 1.6.0
com.squareup.okhttp3 : logging-interceptor jar 3.10.0
com.typesafe : config jar 1.3.3
org.slf4j : slf4j-simple jar 1.7.25

provided (1)

Group / Artifact Type Version
com.google.code.findbugs : jsr305 jar 3.0.2

test (1)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-api jar 5.2.0

Project Modules

There are no modules declared in this project.

๐Ÿš OneOps Secrets CLI

Maven Central changelog apidoc

A command line tool for managing OneOps application secrets.OneOps Secrets CLI interacts with the OneOps Secrets Proxy API.

Usage

Detailed user documentation for installation and usage is available on the OneOps website as well as via the help function:

$ secrets
usage: secrets <command> [<args>]

The most commonly used secrets commands are:
    add        Add secret for an application.
    clients    Show all clients for the application.
    delete     Delete a secret.
    details    Get a client/secret details for an application.
    get        Retrieve secret from vault.
    help       Display help information
    info       Show OneOps Secrets CLI version info.
    list       List all secrets for the application.
    log        Tail (no-follow) secrets cli log file.
    revert     Revert secret to the given version index.
    update     Update an existing secret.
    versions   Retrieve versions of a secret, sorted from newest to oldest update time.

See 'secrets help <command>' for more information on a specific command.

Download

Download the latest JAR or grab via Maven:

<dependency>
    <groupId>com.oneops</groupId>
    <artifactId>secrets-cli</artifactId>
    <version>1.1.0</version>
</dependency>

Examples

  • Add a secret for an application.
  $ secrets add -a oneops_test-assembly_dev logstash-forwarder.crt -d "Logstash cert" -n "Logstash-Cert"
  
    โœ“ Secret 'Logstash-Cert' added successfully for application /oneops/test-assembly/dev.
    
    Note the followings,
      โ— Secret 'Logstash-Cert' will be synced to '/oneops/test-assembly/dev' env computes in few seconds.
      โ— Applications can access secret content by reading '/secrets/Logstash-Cert' file.
      โ— You may need to restart the application inorder for this secret change to take effect.
      โ— For security reasons, secrets are never persisted on the disk and can access from '/secrets' virtual memory file system.
  • Show all secrets for an application.
  $ secrets list  -a oneops_test-assembly_dev
  Password for testuser :
  โœ“ 3 secrets are stored for application env: /oneops/test-assembly/dev
  
  +------------------------+---------------------+----------+----------+--------+---------+
  |       Secret Name      |     Description     |  UserID  | Checksum | Expiry | Version |
  +------------------------+---------------------+----------+----------+--------+---------+
  | Logstash-Cert          | Logstash cert       | testuser | 5CCEB0   | Never  | 42295   |
  | app-private.key        | app ssl key         | testuser | B69967   | Never  | 42227   |
  | db-secret              | databse secret      | testuser | BE49B2   | Never  | 42239   |
  +------------------------+---------------------+----------+----------+--------+---------+

Build

  • Source

    Make sure to provide proper secret-proxy truststore and application.conf before doing the build. Use InstallCerts tool to auto-generate trust-store from your secret proxy HTTPS endpoint.

     $ git clone https://github.com/oneops/secrets-cli
     $ cd secrets-cli
     $ ./mvnw clean package
    

After a build the binary executables is located in the target/ directory and name secrets-cli-*-executable.jar.

com.oneops

OneOps

Application Lifecycle Management of Cloud Based Workloads

Versions

Version
1.1.0
1.0.5
1.0.4
1.0.3