-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workload Identity: Add protos for issuance service and Attributes (#5…
…0163) (#50332) * Add protos for issuance service and attrs * "expiry" -> "expires_at" rename * Pull jwt/x509 svid out into own messages * Add WorkloadIdentity/WorkloadIdentityRevision fields to SPIFFESVIDIssued * Update package name
- Loading branch information
1 parent
278aa99
commit 7cef3d6
Showing
12 changed files
with
3,162 additions
and
1,081 deletions.
There are no files selected for viewing
543 changes: 543 additions & 0 deletions
543
api/gen/proto/go/teleport/workloadidentity/v1/attrs.pb.go
Large diffs are not rendered by default.
Oops, something went wrong.
1,014 changes: 1,014 additions & 0 deletions
1,014
api/gen/proto/go/teleport/workloadidentity/v1/issuance_service.pb.go
Large diffs are not rendered by default.
Oops, something went wrong.
190 changes: 190 additions & 0 deletions
190
api/gen/proto/go/teleport/workloadidentity/v1/issuance_service_grpc.pb.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 4 additions & 4 deletions
8
api/gen/proto/go/teleport/workloadidentity/v1/resource_service.pb.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
api/gen/proto/go/teleport/workloadidentity/v1/resource_service_grpc.pb.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
// Copyright 2024 Gravitational, Inc | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
package teleport.workloadidentity.v1; | ||
|
||
option go_package = "github.com/gravitational/teleport/api/gen/proto/go/teleport/workloadidentity/v1;workloadidentityv1"; | ||
|
||
// Attributes sourced from the Kubernetes workload attestor. | ||
message WorkloadAttrsKubernetes { | ||
// Whether the workload passed Kubernetes attestation. | ||
bool attested = 1; | ||
// The namespace of the workload pod. | ||
string namespace = 2; | ||
// The name of the workload pod. | ||
string pod_name = 3; | ||
// The service account of the workload pod. | ||
string service_account = 4; | ||
// The UID of the workload pod. | ||
string pod_uid = 5; | ||
// The labels of the workload pod. | ||
map<string, string> labels = 6; | ||
} | ||
|
||
// Attributes sourced from the Unix workload attestor. | ||
message WorkloadAttrsUnix { | ||
// Whether the workload passed Unix attestation. | ||
bool attested = 1; | ||
// The PID of the workload process. | ||
int32 pid = 2; | ||
// The primary user ID of the workload process. | ||
uint32 gid = 3; | ||
// The primary group ID of the workload process. | ||
uint32 uid = 4; | ||
} | ||
|
||
// The attributes provided by `tbot` regarding the workload's attestation. | ||
// This will be mostly unset if the workload has not requested credentials via | ||
// the SPIFFE Workload API. | ||
message WorkloadAttrs { | ||
// The Unix-specific attributes. | ||
WorkloadAttrsUnix unix = 1; | ||
// The Kubernetes-specific attributes. | ||
WorkloadAttrsKubernetes kubernetes = 2; | ||
} | ||
|
||
// Attributes related to the user/bot making the request for a workload | ||
// identity. | ||
message UserAttrs { | ||
// The name of the user. | ||
string name = 1; | ||
// Whether the user is a bot. | ||
bool is_bot = 2; | ||
// If the user is a bot, the name of the bot. | ||
string bot_name = 3; | ||
// If the user is a bot, the instance ID of the bot. | ||
string bot_instance_id = 4; | ||
// Labels of the user. | ||
map<string, string> labels = 5; | ||
} | ||
|
||
// The attributes of a principal requesting a workload identity. These | ||
// attributes can be leveraged in rules, expressions and templating within the | ||
// WorkloadIdentity resource. | ||
message Attrs { | ||
// Attributes sourced by workload attestation performed by `tbot`. | ||
WorkloadAttrs workload = 1; | ||
// Attributes sourced from the user/bot making the request for a workload | ||
// identity credential. | ||
UserAttrs user = 2; | ||
} |
Oops, something went wrong.