Skip to content

Read Git credentials from Vault #24

@Southclaws

Description

@Southclaws

Currently, there are two ways to securely use Git to pull config repos and target repos:

  1. ssh
  2. basic auth

SSH is really awkward to automate declaratively, so I generally avoid it. Basic auth works well as GitHub/Lab both provide machine tokens for automated access.

The issue is, you need to pass these tokens in as environment variables. It also means propagating them through to the target config which makes multiple tokens awkward.

So, pico should instead just load all credentials from Vault.

And drop SSH support, it's not worth maintaining for the aforementioned reason.


General architecture:

Now:

  • Init
  • Ping vault
  • Clone config repo
  • Get secrets for targets and up targets

Future:

  • Init
  • Ping vault
  • Acquire bootstrapping credentials - user/pass for config repo
  • Clone config repo
  • Get secrets for target repo credentials, clone target repos, up targets

This also means that there needs to be some form of naming convention for the secrets in Vault so they map to repositories. Maybe based on regex?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions