Skip to content

Commit

Permalink
Add protobufs for Workload Identity Revocation (#51996) (#52032)
Browse files Browse the repository at this point in the history
* Add protos for workload identity revocations

* Add event marshal/unmarshaling

* Restore lexical order

* Add more detailed comments to messages
  • Loading branch information
strideynet authored Feb 11, 2025
1 parent 37ef1dc commit 88d962f
Show file tree
Hide file tree
Showing 11 changed files with 5,104 additions and 2,039 deletions.
7 changes: 7 additions & 0 deletions api/client/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ func EventToGRPC(in types.Event) (*proto.Event, error) {
out.Resource = &proto.Event_WorkloadIdentity{
WorkloadIdentity: r,
}
case *workloadidentityv1pb.WorkloadIdentityX509Revocation:
out.Resource = &proto.Event_WorkloadIdentityX509Revocation{
WorkloadIdentityX509Revocation: r,
}
default:
return nil, trace.BadParameter("resource type %T is not supported", r)
}
Expand Down Expand Up @@ -624,6 +628,9 @@ func EventFromGRPC(in *proto.Event) (*types.Event, error) {
} else if r := in.GetPluginStaticCredentials(); r != nil {
out.Resource = r
return &out, nil
} else if r := in.GetWorkloadIdentityX509Revocation(); r != nil {
out.Resource = types.Resource153ToLegacy(r)
return &out, nil
} else {
return nil, trace.BadParameter("received unsupported resource %T", in.Resource)
}
Expand Down
862 changes: 446 additions & 416 deletions api/client/proto/event.pb.go

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 88d962f

Please sign in to comment.