Skip to content
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

feat(oidc): add trust relationship API #3

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions proto/depot/core/v1/project.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ service ProjectService {

// Delete a project
rpc DeleteProject(DeleteProjectRequest) returns (DeleteProjectResponse) {}

// List project's OIDC trust relationships.
rpc ListTrustRelationships(ListTrustRelationshipsRequest) returns (ListTrustRelationshipsResponse) {}
// Add an OIDC trust relationship to a project.
rpc AddTrustRelationship(AddTrustRelationshipRequest) returns (AddTrustRelationshipResponse) {}
// Remove an OIDC trust relationship from a project.
rpc RemoveTrustRelationship(RemoveTrustRelationshipRequest) returns (RemoveTrustRelationshipResponse) {}
}

message Project {
Expand Down Expand Up @@ -75,3 +82,51 @@ message CachePolicy {
int32 keep_bytes = 1;
int32 keep_days = 2;
}

message ListTrustRelationshipsRequest {
string project_id = 1;
}

message ListTrustRelationshipsResponse {
repeated TrustRelationship trust_relationships = 1;
}

message AddTrustRelationshipRequest {
string project_id = 1;
TrustRelationship trust_relationship = 2;
}

message AddTrustRelationshipResponse {}

message RemoveTrustRelationshipRequest {
string project_id = 1;
TrustRelationship trust_relationship = 2;
}

message RemoveTrustRelationshipResponse {}

message TrustRelationship {
oneof provider {
Github github = 1;
CircleCI circleci = 2;
Buildkite buildkite = 3;
}
}

message Github {
// The Github organization or user name
string repository_owner = 1;
string repository = 2;
}

message CircleCI {
// CircleCI organization UUID must be a valid UUID, not the friendly organization ID.
string organization_uuid = 1;
// CircleCI project UUID must be a valid UUID, not the friendly project ID
string project_uuid = 2;
}

message Buildkite {
string organization_slug = 1;
string pipeline_slug = 2;
}
Loading