Skip to content

Document how vault approle is used #92

@chrishiestand

Description

@chrishiestand

If someone knowledgeable could fill in any gaps, I'd like to create a PR to address my own concerns with the documentation.

Without reading source code, it's difficult to tell how concourse uses the vault approle because the approle is somewhat complex and the concourse documentation is currently lacking some context. In particular we can help steer a vault admin creating an approle for concourse.

I believe these are the approle parameters which may factor in:

  • secret_id_num_uses
  • secret_id_ttl
  • token_num_uses
  • token_ttl
  • token_max_ttl
  • period

source: https://www.vaultproject.io/api/auth/approle/index.html#secret_id_num_uses

From what I gather (please let me know if this is wrong):

When the ATC starts with --vault-auth-backend approle it does not have a, or load a previous, vault token. So for this reason the approle secret id is always required and should never expire. So secret_id_ttl and secret_id_num_uses should be set as null (empty string).

The ATC will then use the approle id and secret id to create a token, and will try to refresh that token after CONCOURSE_VAULT_AUTH_BACKEND_MAX_TTL. But it will never try to get a different token while the ATC process is running. Because the ATC process might run for 1 second or 5 years, you might as well treat this token as a lifetime periodic token. And so you should set period accordingly - something on the order of hours or days might give concourse time to renew its token despite faults/failures. Therefore you can set token_ttl and token_max_ttl as empty strings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions