GithubHelp home page GithubHelp logo

isabella232 / vault-plugin-secrets-datastax-astra Goto Github PK

View Code? Open in Web Editor NEW

This project forked from datastax/vault-plugin-secrets-datastax-astra

0.0 0.0 0.0 251 KB

HashiCorp Vault Plugin for Datstax Astra

License: Apache License 2.0

Shell 4.24% Go 85.03% Makefile 10.73%

vault-plugin-secrets-datastax-astra's Introduction

vault-plugin-secrets-datastax-astra

This HashiCorp Vault plugin provides token lifecycle management for DataStax Astra DB. Due to the nature of the Astra DB object hierarchy, API tokens are not tied to users and do not currently have descriptions. It's easy to lose track of what tokens are being used for what purpose and who is using them. HashiCorp Vault allows you to associate metadata with a token (such as user who created it, what it's being users for) and additionally logs who's access the tokens to ensure token ownership and usage can be well understood. The DataStax Astra DB plugin for HashiCorp Vault functionality includes:

  • Use HashiCorp Vault to log access to Astra DB tokens.

  • Use HashiCorp Vault to create and revoke Astra DB tokens.

  • Use HashiCorp Vault to associated metadata to Astra DB tokens for tracking token ownership/application.

  • Use HashiCorp Vault to rotate tokens (future).

For more, see the expanded docs topic.

Prerequisites

  • You must have a functional HashiCorp Vault instance configured and the "vault" command must be usable.

  • Golang must be installed.

  • You must have an Astra DB account.

  • You must have admin access to an Astra DB organization.

  • A "root token" must be created for each organization that HashiCorp Vault will manage. These will be the tokens that HashiCorp Vault uses to generate additional tokens. These root tokens must be created with the appropriate permission to create new tokens. For details on how to generate tokens, see Manage application tokens in the Astra DB documentation.

Install the vault plugin into an existing vault

Download the plugin binary for your OS from:

https://github.com/datastax/vault-plugin-secrets-datastax-astra/releases/tag/v0.1.0

Ensure the plugin is installed in the vault/plugins/vault-plugin-secrets-datastax-astra folder.

Or, build the plugin from source.

go build -o vault/plugins/vault-plugin-secrets-datastax-astra cmd/vault-plugin-secrets-datastax-astra/main.go

Enable the plugin in your vault instance.

vault secrets enable -path=astra vault-plugin-secrets-datastax-astra

Configure the plugin

Add root tokens for each Astra DB org:

vault write astra/config org_id="<YOUR ORG ID>" astra_token="<YOUR APP TOKEN>" url="https://api.astra.datastax.com" logical_name="<YOUR LOGICAL NAME>"

List the created org/token configs:

vault list astra/configs

Use the installed token to automatically generate Vault roles from Astra DB roles:

 sh vault/plugins/vault-plugin-secrets-datastax-astra/update_roles.sh

List the roles created:

vault list astra/roles

Use Vault to create a new Astra DB token:

vault write astra/org/token org_id=<YOUR ORG ID> role_name="<YOUR ROLE NAME>"

Next steps

For more, see the expanded docs topic.

vault-plugin-secrets-datastax-astra's People

Contributors

johnsmartco avatar rogerb-ds avatar vaishakhbn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.