-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds KindIdentityCenter
umbrella resource kind
#48730
Conversation
The Identity Center integration manages several resource types, and specifying individal condition statements for each kind is both unwieldy and unnecessary - anyone that can manipulate one of these resources should be able to manilpate them all in the same way. In order to simplify things, this patch introduces an umbrella `KindIdentityCenter` that will represent _any_ `KindIdentityCenter*` resource in Role conditions and RBAC checks.
This pull request is automatically being deployed by Amplify Hosting (learn more). |
Updates the default implicit rules to refrence the new `KindIdentityCenter` resource kind. Also updates comments on the covered `KindIdentityCenter*` kinds with a reminder to user `KindIdentityCenter` in RBAC checks.
api/types/constants.go
Outdated
// KindIdentityCenterAccount describes an Identity-Center managed AWS Account | ||
// DO NOT USE THIS KIND IN RBAC CHECKS: use KindIdentityCenter instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems error prone.
What if we made these constants the SubKind?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if we need to make these sub-kinds (that would probably complicate existing resources/caching quite a bit) but @tcsc what we usually do in these cases is in the ACL layer you check whether identity has either specific permission or the more broad one so e.g. in the service methods that deal with IC accounts, you would see check KindIdentityCenterAccount or KindIdentityCenter. We do this with e.g. connectors - there are kinds for each specific connector type and the kind that covers all auth connectors.
So I would do that, and remove these "DO NOT USE ..." comments because they do look error prone. I also don't see where this new kind is being used, only that it's added to the default roles - is that PR coming to teleport.e next?
The Identity Center integration manages several resource types,
and specifying individal condition statements for each kind is
both unwieldy and unnecessary - anyone that can manipulate one
of these resources should be able to manilpate them all in the
same way.
In order to simplify things, this patch introduces an umbrella
KindIdentityCenter
that will represent anyKindIdentityCenter*
resource in Role conditions and RBAC checks.