Skip to content

Commit c7461f3

Browse files
committed
fix(controlplane): remove the RobotAccountService/Create RPC (CP-N4)
Robot accounts are superseded by workflow-scoped API tokens, which offer the same per-workflow granularity plus a finite expiration, revocation coverage and an explicit policy set. Creation was removed from the CLI in 2024 (#890, #894) and has had no caller in any Chainloop component since: no reference in the CLI, the frontend or the platform backend, only generated stubs. Removing the RPC removes the escalation at the root rather than restricting who may reach it. Deleted: the proto method and its request/response messages, the service handler, RobotAccountUseCase.Create, RobotAccountRepo.Create, and the now-orphaned authConf field on the use case (regenerated wire accordingly). The RobotAccount.JWT field went with it, since only the deleted creation path ever set it. List and Revoke are deliberately kept. Existing robot accounts never expire and still authenticate for attestation through RobotAccountUseCase.FindByID, so inventory and revocation must stay available to retire them; removing Revoke would strand permanent credentials with no kill switch. The robot-account integration test now seeds through the ent client, since creation is no longer reachable from the use case, and continues to cover revocation. This is a wire-breaking change: a pre-2024 client still calling RobotAccountService/Create receives Unimplemented instead of a credential. Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
1 parent acdf967 commit c7461f3

18 files changed

Lines changed: 59 additions & 879 deletions

‎app/controlplane/api/controlplane/v1/robot_accounts.pb.go‎

Lines changed: 38 additions & 244 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎app/controlplane/api/controlplane/v1/robot_accounts.proto‎

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,14 @@ import "google/protobuf/timestamp.proto";
2222

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

25+
// Deprecated: superseded by workflow-scoped API tokens. Create was removed because its policy was
26+
// grantable to API tokens (privilege escalation); List and Revoke remain so that existing robot
27+
// accounts, which never expire, can still be inventoried and retired.
2528
service RobotAccountService {
26-
rpc Create(RobotAccountServiceCreateRequest) returns (RobotAccountServiceCreateResponse);
2729
rpc List(RobotAccountServiceListRequest) returns (RobotAccountServiceListResponse);
2830
rpc Revoke(RobotAccountServiceRevokeRequest) returns (RobotAccountServiceRevokeResponse);
2931
}
3032

31-
message RobotAccountServiceCreateRequest {
32-
string name = 1;
33-
string workflow_id = 2 [(buf.validate.field).string.uuid = true];
34-
}
35-
36-
message RobotAccountServiceCreateResponse {
37-
RobotAccountFull result = 1;
38-
39-
message RobotAccountFull {
40-
string id = 1;
41-
string name = 2;
42-
string workflow_id = 3;
43-
google.protobuf.Timestamp created_at = 4;
44-
google.protobuf.Timestamp revoked_at = 5;
45-
// The key is returned only during creation
46-
string key = 6;
47-
}
48-
}
49-
5033
message RobotAccountServiceRevokeRequest {
5134
string id = 1 [(buf.validate.field).string.uuid = true];
5235
}

‎app/controlplane/api/controlplane/v1/robot_accounts_grpc.pb.go‎

Lines changed: 0 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)