Hi Michael,
> Generate a secret-id from the approle (not sure how)
You'll also need a mandatory role ID to be supplied to the login
endpoint. Secret ID is required only if the bound parameter set on the
role is `bound_secret_id` (which is set by default). After creating an
AppRole, endpoints `auth/approle/role/[role_name]/role-id` and
`auth/approle/role/[role_name]/secret-id` can be used to fetch a role
ID and to generate a secret ID. Note that the role ID is a constant
for a role (it is fetched), while the secret IDs are generated (which
is why everyone *need* not share a secret ID). The generated secret
IDs can have use-counts set, based on the role settings, thereby
controlling how many times an app can use a specific secret ID to
fetch Vault tokens.
> Am I missing something with the workflow description or the benefits of AppRole given my use case?
The endpoints to fetch role IDs and generate secret IDs are
authenticated paths, meaning that they require a valid Vault token to
be presented. A common question which the community asks is: "How can
we use role IDs and secret IDs when they themselves need a token in
the first place?". To explain this situation, I'll resort to an
exemplary use case. Assume that the goal is to have a setup like this:
"Vault admin should set up AppRoles, a dedicated service should fetch
role IDs from the backend and another dedicated service should fetch
new secret IDs from the backend. The credentials should be
bootstrapped into Apps, VMs, Services or whatever. All these should
happen with acceptable levels of security, in the sense that the
intermediate hops (dedicated services, which may be CM tools, or a
series of untrusted services) should be NOT be able to fetch Vault
tokens themselves, and in case they did, it should be successfully
detectable".
The Cubbyhole Authentication Principles (termed Response-Wrapping
feature in Vault)
[
https://www.hashicorp.com/blog/vault-cubbyhole-principles.html], in
combination with AppRole authentication backend makes a genuine
attempt at providing a solution to this problem. In a simplistic case,
only one single entity may set up AppRoles, fetch the role IDs and
fetches new secret IDs. In this case, accountability will be implicit
and the same service can bootstrap the credentials into the Apps and
Services.
In a slightly stringent setup, dedicated tokens can be issued to all
the intermediate hops by the Vault admin. These tokens can just do
what they are destined for, like, just fetching the role ID, or just
fetching the new secret IDs. Ideally, these intermediate hops will
only have partial access to the credentials and won't be able to fetch
actual Vault tokens since the credentials are spread across by
different services. AppRole fits nicely into this use case since the
role ID and the secret ID paths are ACL-able and specific tokens can
be issued for these.
For even more complex setups where properties like confidentiality,
integrity and non-repudiation are desired, an impressive and a proud
twist, response-wrapping comes to the rescue! By simply specifying a
flag (-wrap-ttl) while fetching the role IDs and/or secret IDs, an
actual response is NOT returned. Instead, actual response will be
stored in a newly generated token's cubbyhole, and this new token is
returned. The use count on this new token will be 1. The services
which are supposed to simply bootstrap the credential into services,
if unwrap the wrapped token and peeks into the secret, then the actual
service won't be able to do it (which is clearly detectable). Only the
actual service, ideally should unwrap all the shards of the
credentials and use them to fetch a Vault tokens. This is simply
fabulous for various setups involving too many untrusted services in
the pipeline. On top of this, wrapped tokens expire after its TTL
expires, providing more control on the timing of the credential usage.
All unwrap requests can be monitored using Vault's audit logs.
These are the few benefits of AppRole. There are more, in the sense
that, not just the path that creates/updates the role, but each field
modification of an AppRole can also be ACLed. Its designed to be
extremely flexible for control delegation.
I hope people find this information useful.
Regards,
Vishal
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
>
https://www.hashicorp.com/community-guidelines.html. Behavior in violation
> of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues:
https://github.com/hashicorp/vault/issues
> IRC: #vault-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Vault" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
vault-tool+...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/vault-tool/6ad5623c-7b58-4b5f-8722-40db1c0d76a2%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.
--
vn