Skip to content

Commit d1ce976

Browse files
committed
remove cache; use grpc; refactor
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
1 parent 0984be8 commit d1ce976

22 files changed

Lines changed: 1232 additions & 349 deletions

app/controlplane/api/controlplane/v1/operation_authorization.pb.go

Lines changed: 219 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
//
2+
// Copyright 2026 The Chainloop Authors.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
syntax = "proto3";
17+
18+
package controlplane.v1;
19+
20+
option go_package = "github.com/chainloop-dev/chainloop/app/controlplane/api/controlplane/v1;v1";
21+
22+
// OperationAuthorizationService is implemented by an external service
23+
// to authorize specific control plane operations.
24+
service OperationAuthorizationService {
25+
rpc Check(OperationAuthorizationServiceCheckRequest) returns (OperationAuthorizationServiceCheckResponse);
26+
}
27+
28+
message OperationAuthorizationServiceCheckRequest {
29+
// The gRPC operation being authorized, e.g. "/controlplane.v1.OrganizationService/Create"
30+
string operation = 1;
31+
// The user ID requesting the operation
32+
string user_id = 2;
33+
// The organization ID in context, if any
34+
string organization_id = 3;
35+
}
36+
37+
message OperationAuthorizationServiceCheckResponse {
38+
bool allowed = 1;
39+
// Human-readable reason when denied
40+
string reason = 2;
41+
}

app/controlplane/api/controlplane/v1/operation_authorization_grpc.pb.go

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

0 commit comments

Comments
 (0)