Not able to create a role (no handler for route)

Dear hashicorp vault community,

I am learning vault and trying to create a role like this:

vault write auth/test-tmp/role/my-role token_policies="test-tmp/folder1/my-secrets"

But I am getting this error instead * no handler for route 'auth/test-tmp/role/my-role'.

The policy assign to the token I am using is like:

path "auth/test-tmp/*" { capabilities = ["read", "list", "create", "update", "delete"] }

My question is why am I getting this error?

Is this an AppRole or some other?

In any case, I assume you enabled the particular auth method:

i.e.

vault auth enable approle

This will create the endpoint of auth/approle if you wanted a custom path, then you needed to do:

vault auth enable -path=test-tmp approle

The endpoint path here will be auth/test-tmp

Does that answer your question?

EDIT: you can do vault auth list to see what auth methods you have enabled and what their paths are. If it wasn’t obvious from my example above, if you don’t specify an custom path, it uses the auth method name as the path.