Skip to content
Merged
Show file tree
Hide file tree
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
111 changes: 64 additions & 47 deletions app/controlplane/api/controlplane/v1/cas_credentials.pb.go

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

28 changes: 18 additions & 10 deletions app/controlplane/api/controlplane/v1/cas_credentials.proto
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright 2023 The Chainloop Authors.
// Copyright 2023-2025 The Chainloop Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -17,29 +17,37 @@ syntax = "proto3";

package controlplane.v1;

option go_package = "github.com/chainloop-dev/chainloop/app/controlplane/api/controlplane/v1;v1";
import "buf/validate/validate.proto";
import "controlplane/v1/response_messages.proto";

option go_package = "github.com/chainloop-dev/chainloop/app/controlplane/api/controlplane/v1;v1";

service CASCredentialsService {
rpc Get (CASCredentialsServiceGetRequest) returns (CASCredentialsServiceGetResponse);
rpc Get(CASCredentialsServiceGetRequest) returns (CASCredentialsServiceGetResponse);
}

message CASCredentialsServiceGetRequest {
Role role = 1 [(buf.validate.field).enum = {in: [1,2]}];
Role role = 1 [(buf.validate.field).enum = {
in: [
1,
2
]
}];
// during the download we need the digest to find the proper cas backend
string digest = 2;

enum Role {
ROLE_UNSPECIFIED = 0;
ROLE_DOWNLOADER = 1;
ROLE_UPLOADER = 2;
}
ROLE_UNSPECIFIED = 0;
ROLE_DOWNLOADER = 1;
ROLE_UPLOADER = 2;
}
}

message CASCredentialsServiceGetResponse {
Result result = 1;

message Result {
string token = 2;
CASBackendItem backend = 3;
}
}
}

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

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

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

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

2 changes: 1 addition & 1 deletion app/controlplane/internal/service/cascredential.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,6 @@ func (s *CASCredentialsService) Get(ctx context.Context, req *pb.CASCredentialsS
}

return &pb.CASCredentialsServiceGetResponse{
Result: &pb.CASCredentialsServiceGetResponse_Result{Token: t},
Result: &pb.CASCredentialsServiceGetResponse_Result{Token: t, Backend: bizCASBackendToPb(backend)},
}, nil
}
Loading