Coder Social home page Coder Social logo

vault-plugin-secrets-dockerhub's Introduction

Vault Secrets Plugin for Docker Hub

CodeQL Semgrep

rest

Docker is used in many CI/CD piplines and accessing your private repositories should be made possible in a secure way. Using username and password for this is bad since these credentials have way to broad permissions. Access tokens on the other hand cannot change the password for an account and they can be restricted to specific namespaces thereby having a tighter scope than your username and password.

Usage

To use the plugin you must rigster it. See the Hashicorp Vault documentation for the steps needed. The Makefile provides steps to test locally.

Configure DockerHub account

First configure the credentials for the DockerHub account you want credentials from:

vault write dockerhub/config/$USERNAME password=$PASSWORD scopes=$SCOPE

where scopes is a comma separated list with the following valid values:admin, write, read, public_read.

ttl is optional. If it is not provided it will be set to the default ttl which is 5 minutes.

You can read the permissions using

vault read dockerhub/config/$USERNAME

The password will not be shown. Also it is not possible to update en existing configuration but a new one can be created. No validity checks are made when the config is written aside from validating the scopes.

Creating tokens

Tokens issued by Vault will be revoked automatically after the ttl has expired. To issue a token run:

vault write dockerhub/token/$SCOPE label=$TOKEN_LABEL

By having scope as part of the path it is possible to restrict which scopes vault users are allowed to create credentials for.

vault-plugin-secrets-dockerhub's People

Contributors

dependabot[bot] avatar hoeg avatar semgrep-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vault-plugin-secrets-dockerhub's Issues

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.