Fixes #24475: API account UI needs to provide a configuration for tenants #5490
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://issues.rudder.io/issues/24475
There is
a lot
of changes that are due to the use ofelm-format
which is extremely happy to give new lines everywhere. I think the result is a bit better, but hell, do they love spaces. You should really look at diff with?w=1
.That PR adds the infrastructure to be able to configure tenants for API account.
The logic is similar to the
api-authorization
plugin:We have three kind of tenants:
*
means "all tenants", and is the defaults for compat reason-
meains "no tenants", and the poor accout won't be able to do much with nodes,There is the corresponding changes in backend for API parsing on post/put, diff event update, etc. Nothing fancy.
In LDAP, we just have one attribute in API account,
apiTenants
, which is just the string for the chosen tenants (ie*
,-
, ortenant1,tenant2,etc
- like for users inrudder-users.xml
).There is one thing that is really not cool: the ACL plugins is appending its content at the end of the modal, and so do that new plugin, because we need and existing anchor when the page is init to init the corresponding elm app. And the place where it would be logic to put the list of tenant (just below the select for tenant mode) does not always exist (and certainly not when the page is loaded).
This is the UI when plugin is disabled:
And when it's enabled: