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

Add endpoints to handle authorization policies #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
46 changes: 46 additions & 0 deletions api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,43 @@ message ReportConsumerGroupCoordinatorResponse {
// Intentionally empty
}

// ACLPolicy represents an Access Control List policy
message ACLPolicy {
string userId = 1;
string resourceId = 2;
string action = 3;
}

// AddPolicyRequest is sent by the client to the metadata leader to add a new authorization policy.
message AddPolicyRequest {
ACLPolicy policy = 1;
}

// AddPolicyResponse is sent by the server in response to a request to add a new authorization policy.
message AddPolicyResponse {
// Intentionally empty
}

// RevokePolicyRequest is sent by the client to the metadata leader to revoke an authorization policy.
message RevokePolicyRequest {
ACLPolicy policy = 1;
}

// RevokePolicyResponse is sent by the server in response to a request revoke an authorization policy.
message RevokePolicyResponse {
// Intentionally empty
}

// ListPolicyRequest is sent by the client to the metadata leader to list all existing ACL policies on all resources.
message ListPolicyRequest {
// Intentionally empty
}

// ListPolicyResponse is sent by the server in response to ListPolicyRequest
message ListPolicyResponse {
map<int32,ACLPolicy> policies = 1;
}

// Broker contains information for a Liftbridge broker.
message Broker {
string id = 1; // Broker id
Expand Down Expand Up @@ -561,4 +598,13 @@ service API {
// NOTE: This is a beta endpoint and is subject to change. It is not
// included as part of Liftbridge's semantic versioning scheme.
rpc ReportConsumerGroupCoordinator(ReportConsumerGroupCoordinatorRequest) returns (ReportConsumerGroupCoordinatorResponse) {}

// AddPolicy adds an ACL policy to the cluster
rpc AddPolicy(AddPolicyRequest) returns (AddPolicyResponse) {}

// RevokePolicy revokes an existing ACL policy from the cluster
rpc RevokePolicy(RevokePolicyRequest) returns (RevokePolicyResponse) {}

// ListPolicy retrieves all existing ACL policies from the cluster
rpc ListPolicy(ListPolicyRequest) returns (ListPolicyResponse) {}
}
Loading