Antón R. Yuste
Antón R. Yuste

Reputation: 1010

Create a new entity, entity alias in Vault and obtain a token for authentication

I would like to create a new entity in Vault and generate a new token to give access to an user to the UI using the API.

So, I am generating the entity using /v1/identity/entity/name/:name, then consulting the mount accessor in /v1/sys/auth and creating a new entity alias with /v1/identity/entity-alias

I am not adding any policy, that's something I will do later, first I just want to give access to the UI.

So now I create the token /v1/auth/token/create, but I don't find a way to associate that token to the previously created entity.

The same example with username/password works as expected.

How do I associate the token to the entity?

Upvotes: 5

Views: 3709

Answers (1)

Antón R. Yuste
Antón R. Yuste

Reputation: 1010

It is currently not possible to associate entities directly with tokens. All auth methods are supported except the token auth. The alternative is to use the userpass auth method or to use the AppRole auth method (but without entity, only policies)

Upvotes: 3

Related Questions