Hi everyone,
I'm trying to realize the following permission structure for a "token exchange service" (hand out backup tokens to trusted hosts):
My question now is: Can I create a restricted api token which can only create and modify tokens of the owning user and which permissions do the user and api token need?
The documentation of the /access/users/{userid}/token/{token-name} (the API viewer seems currently broken) endpoint say, the required permissions are:
When I give the token the following permission
It seems like a token can't match the
The only way I was able to create new tokens via an API token, was to give
Is there a way to avoid the
The same issue is also present with the
I'm trying to realize the following permission structure for a "token exchange service" (hand out backup tokens to trusted hosts):
Code:
User automation@pbs:
automation@pbs!api: Can create API tokens for it's own user
automation@pbs!host1: Can create backups (role DatastoreBackup)
...
automation@pbs!hostn: Can create backups (role DatastoreBackup)
My question now is: Can I create a restricted api token which can only create and modify tokens of the owning user and which permissions do the user and api token need?
The documentation of the /access/users/{userid}/token/{token-name} (the API viewer seems currently broken) endpoint say, the required permissions are:
Code:
Or
Check: {"partial":false,"path":["access","users"],"privs":["Permissions.Modify"]}
Check if user matches parameter 'userid'
When I give the token the following permission
acl:1:/access/users:automate@pbs!api:Admin to the api token (since tokens don't have any permissions when created), I still get a permission check failed error when trying to create new tokens.It seems like a token can't match the
user matches parameter 'userid' check from the API documentation. The only way I was able to create new tokens via an API token, was to give
Admin permissions for /access/users to both, the user and the token. This implies, the token which should have been restricted, can now modify all users and permissions.Is there a way to avoid the
Admin permissions for the automation@pbs user?The same issue is also present with the
/access/acl endpoint, which is required to set the DatastoreBackup role for the new host tokens.