I’m building a container to do backups of persistent volumes. It needs the ability to create and read snapshots (and potentially delete them) but nothing else.
It looks like at the moment, API clients can be restricted on the project level, but there’s no granular permissions over which actions it can perform.
Is this on the roadmap? What other alternatives do I have?
Unrelated to question, more so for community. Maybe I could add some graphical scriptlet management tools to Ararat to make this easier to access/configure. Curious on thoughts!
May be interesting and something similar could also apply to the cloud-init config which can similarly be a bit of a black box. The main issue with this kind of approach is with reading back the data in case the user has made some modifications (or at least detection user made changes).
The scriptlet mechanism needs more examples in general I think and not just the authorization scriptlet, but also the placement scriptlet and QEMU scriptlet. Would be nice if some of the folks using those features in anger could contribute sanitized version of what they’re doing as examples.
For authorization specifically, something I suggested a couple of times to folks looking at using it is to have a pretty generic authorization scriptlet which is mostly static but then performs permission checks based on user.XYZ configuration keys set on the objects.
So you can then set a user.access.exec = foo,bar in your instance’s config and have the scriptlet allow users using client certificates with the name field set to foo or bar to do the instance exec action.
Sorry to insist but I can’t figure out how to get the scriptlet to query the instance for the user config. Is there any documentation or examples I can consult?
Looks like we’re missing some of those functions under the authorization scriptlet code path…
@bensmrs what do you think is best here? Should we add a bunch of get_XYZ functions for each of the object types, or is there some way we could have a more generic get_object which retrieves the full struct of the target object without needing per-type logic in Starlark?
Given we’re in an authorization context with a target object, it would be nice if it could just pull that object without the user having to figure out the API path for it. That would mean some logic on the Go side though.