-
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
Add Identity Center Account Assignments to Unified Resource Cache #49580
Add Identity Center Account Assignments to Unified Resource Cache #49580
Conversation
|
||
// IdentityCenterAccountAssignment represents a requestable Identity Center | ||
// Account Assignment | ||
message IdentityCenterAccountAssignment { |
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.
Why do we need a second duplicated IdentityCenterAccountAssignment proto definition where IdentityCenterAccountAssignment
is already defined in:
https://github.com/gravitational/teleport/blob/master/api/proto/teleport/legacy/types/types.proto#L3409
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.
So, types.IdentityCenterAccountAssignment
is for specifying Account Assignments in role conditions. If I had known bettrer back when defining this, I'd have called them an AccountAssignmentCondition
or AccountAssignmentExpression
(as they can be globbed).
This definition, proto.IdentityCenterAccountAssignment
allows Account Assignment resources to be included in a list of resources returned by ListResources
( essentially by having a parallel (and slightly simplified) definition of an identitycenterv1.AccountAssignment
in the legacy authservice protobuf definitions).
The primary identitycenterv1.AccountAssignment
gets copied into a proto.IdentityCenterAccountAssignment
at read time and then gets shipped over to whatever client invoked ListResources()
, then gets re-packed back into an identitycenterv1.AccountAssignment
.
The reason we can't just include an identitycenterv1.AccountAssignment
in the ListResources
output that the legacy protobuf codegen used for the authservice
and the new codegen used for identitycenter/v1
produce incompatible serialization code, so resulting generated code does not compile.
If there is a way around this that will let us use the definitions from identitycenter/v1
, I'd be much happier.
ba6f65d
to
aa1132c
Compare
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.
@tcsc Does this need a rebase? Feels like it contains code from PRs I already reviewed.
And how. |
a5a936b
to
a354833
Compare
a354833
to
88f231a
Compare
Adds Identity Center Account Assignments to the Unified resource cache so they can be requested in access requests. Unfortunately we can't just include an `identitycenterv1.AccountAssignment` directly in the resource cache ListResources output because the legacy protobuf codegen used for the authservice and the new codegen used for identitycenter/v1 produce incompatible serialization code, so resulting generated code does not compile. To get around this issue, this change introduces a parallel (and slightly simplified) definition of an IdentityCenterAccountAssignment in the authservice protobuf spec to act as the wire format for this type. The cached `identitycenterv1.AccountAssignment` resources are copied into a `proto.IdentityCenterAccountAssignment` on a cache read. Includes: - adding resources to cache - adding account assignment paginated resource - account assignment role condition matching for RBAC
b15b40c
to
a8d3470
Compare
Backports #49580 Adds Identity Center Account Assignments to the Unified resource cache so they can be requested in access requests. Unfortunately we can't just include an `identitycenterv1.AccountAssignment` directly in the resource cache ListResources output because the legacy protobuf codegen used for the authservice and the new codegen used for identitycenter/v1 produce incompatible serialization code, so resulting generated code does not compile. To get around this issue, this change introduces a parallel (and slightly simplified) definition of an IdentityCenterAccountAssignment in the authservice protobuf spec to act as the wire format for this type. The cached `identitycenterv1.AccountAssignment` resources are copied into a `proto.IdentityCenterAccountAssignment` on a cache read. Includes: - adding resources to cache - adding account assignment paginated resource - account assignment role condition matching for RBAC
Backports #49580 Adds Identity Center Account Assignments to the Unified resource cache so they can be requested in access requests. Unfortunately we can't just include an `identitycenterv1.AccountAssignment` directly in the resource cache ListResources output because the legacy protobuf codegen used for the authservice and the new codegen used for identitycenter/v1 produce incompatible serialization code, so resulting generated code does not compile. To get around this issue, this change introduces a parallel (and slightly simplified) definition of an IdentityCenterAccountAssignment in the authservice protobuf spec to act as the wire format for this type. The cached `identitycenterv1.AccountAssignment` resources are copied into a `proto.IdentityCenterAccountAssignment` on a cache read. Includes: - adding resources to cache - adding account assignment paginated resource - account assignment role condition matching for RBAC
Backports #49580 and #49977 Adds Identity Center Account Assignments to the Unified resource cache so they can be requested in access requests. Unfortunately we can't just include an `identitycenterv1.AccountAssignment` directly in the resource cache ListResources output because the legacy protobuf codegen used for the authservice and the new codegen used for identitycenter/v1 produce incompatible serialization code, so resulting generated code does not compile. To get around this issue, this change introduces a parallel (and slightly simplified) definition of an IdentityCenterAccountAssignment in the authservice protobuf spec to act as the wire format for this type. The cached `identitycenterv1.AccountAssignment` resources are copied into a `proto.IdentityCenterAccountAssignment` on a cache read. Includes: - adding resources to cache - adding account assignment paginated resource - account assignment role condition matching for RBAC
…he (#49976) Backports #49580 and #49977 Adds Identity Center Account Assignments to the Unified resource cache so they can be requested in access requests. Unfortunately we can't just include an `identitycenterv1.AccountAssignment` directly in the resource cache ListResources output because the legacy protobuf codegen used for the authservice and the new codegen used for identitycenter/v1 produce incompatible serialization code, so resulting generated code does not compile. To get around this issue, this change introduces a parallel (and slightly simplified) definition of an IdentityCenterAccountAssignment in the authservice protobuf spec to act as the wire format for this type. The cached `identitycenterv1.AccountAssignment` resources are copied into a `proto.IdentityCenterAccountAssignment` on a cache read. Includes: - adding resources to cache - adding account assignment paginated resource - account assignment role condition matching for RBAC
…he (#49976) Backports #49580 and #49977 Adds Identity Center Account Assignments to the Unified resource cache so they can be requested in access requests. Unfortunately we can't just include an `identitycenterv1.AccountAssignment` directly in the resource cache ListResources output because the legacy protobuf codegen used for the authservice and the new codegen used for identitycenter/v1 produce incompatible serialization code, so resulting generated code does not compile. To get around this issue, this change introduces a parallel (and slightly simplified) definition of an IdentityCenterAccountAssignment in the authservice protobuf spec to act as the wire format for this type. The cached `identitycenterv1.AccountAssignment` resources are copied into a `proto.IdentityCenterAccountAssignment` on a cache read. Includes: - adding resources to cache - adding account assignment paginated resource - account assignment role condition matching for RBAC
Adds Identity Center Account Assignments to the Unified resource cache so they can be requested in access requests.
Unfortunately we can't just include an
identitycenterv1.AccountAssignment
directly in the resource cacheListResources
output because the legacy protobuf codegen used for theauthservice
and the new codegen used foridentitycenter/v1
produce incompatible serialization code, so resulting generated code does not compile.To get around this issue, this change introduces a parallel (and slightly simplified) definition of an
IdentityCenterAccountAssignment
in theauthservice
protobuf spec to act as the wire format for this type. The cachedidentitycenterv1.AccountAssignment
resources are copied into aproto.IdentityCenterAccountAssignment
on a cache read.I'm not particularly thrilled with this solution, and if anyone has an alternative that lets us use the definitions from
identitycenter/v1
without this parallel definition, I'd be much obliged.Change Includes: