vault-token: yes.
role-id: depends on your security requirements, and whether and how you are using a secret ID. If you are using a secret ID, at least for us, the answer was no (we store it in our docker meta-data)
vault-token + role-id: should not give you 'full' access to vault. Policies and roles are your friend :)
as a thought experiment, and to help me wrap my head around this, I compared a single token approach vs app-role. Now anytime my thoughts are involved, all the caveats apply :)
Simple flow:
- get a token (e.g. aws-ec2 host-specific token)
- use that token to get new tokens tied to a specific policy and inject that into your app
Pros: easy to understand
Cons: The host token can do all sorts of things *at run time*. Yes, you can limit its actions, via a policy, to specific `/auth/token/create/[role_name]`, but it still leaves open a lot of choices that a script (or errant user) can run at run-time.
App-role:
- get a token (e.g. aws-ec2 host-specific token)
- either:
- use that token, in conjunction with a role-id, to be able to get a secret
- have a separate process get a secret
- forgo requiring a secret (it is required by default but you can disable this)
- use token, role and secret to get a new token
Pros: Flexibility! You can configure all sorts of parameters (use limits, ttls, etc) and polices at *configuration* time rather than at run time. The host token can be setup to only do one or two very specific actions with very short TTLs and nothing else. There is also more flexibility to separate out who and what can handle role_ids, host token, and secrets.
Cons: Flexibility! :)
Hope that helps,
Adam