mirror of
https://github.com/jsiebens/ionscale.git
synced 2026-03-31 15:07:49 +01:00
feat: use hujson as data format for ACL and IAM policy
This commit is contained in:
@@ -2,8 +2,6 @@ syntax = "proto3";
|
||||
|
||||
package ionscale.v1;
|
||||
|
||||
import "google/protobuf/struct.proto";
|
||||
|
||||
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
|
||||
|
||||
message GetACLPolicyRequest {
|
||||
@@ -11,55 +9,12 @@ message GetACLPolicyRequest {
|
||||
}
|
||||
|
||||
message GetACLPolicyResponse {
|
||||
ACLPolicy policy = 1;
|
||||
string policy = 1;
|
||||
}
|
||||
|
||||
message SetACLPolicyRequest {
|
||||
uint64 tailnet_id = 1;
|
||||
ACLPolicy policy = 2;
|
||||
string policy = 2;
|
||||
}
|
||||
|
||||
message SetACLPolicyResponse {}
|
||||
|
||||
message ACLPolicy {
|
||||
map<string, string> hosts = 1;
|
||||
map<string, google.protobuf.ListValue> groups = 2;
|
||||
repeated ACL acls = 3;
|
||||
map<string, google.protobuf.ListValue> tagowners = 4;
|
||||
optional AutoApprovers autoapprovers = 5;
|
||||
repeated SSHRule ssh = 6;
|
||||
repeated NodeAttr nodeattrs = 7;
|
||||
repeated ACLGrant grants = 8;
|
||||
}
|
||||
|
||||
message ACL {
|
||||
string action = 1;
|
||||
repeated string src = 2;
|
||||
repeated string dst = 3;
|
||||
string proto = 4;
|
||||
}
|
||||
|
||||
message AutoApprovers {
|
||||
map<string, google.protobuf.ListValue> routes = 1;
|
||||
repeated string exitnode = 2;
|
||||
}
|
||||
|
||||
message SSHRule {
|
||||
string action = 1;
|
||||
repeated string src = 2;
|
||||
repeated string dst = 3;
|
||||
repeated string users = 4;
|
||||
string checkperiod = 5;
|
||||
}
|
||||
|
||||
message NodeAttr {
|
||||
repeated string target = 1;
|
||||
repeated string attr = 2;
|
||||
}
|
||||
|
||||
message ACLGrant {
|
||||
repeated string src = 1;
|
||||
repeated string dst = 2;
|
||||
repeated string ip = 3;
|
||||
map<string, google.protobuf.ListValue> app = 4;
|
||||
}
|
||||
@@ -9,19 +9,12 @@ message GetIAMPolicyRequest {
|
||||
}
|
||||
|
||||
message GetIAMPolicyResponse {
|
||||
IAMPolicy policy = 1;
|
||||
string policy = 1;
|
||||
}
|
||||
|
||||
message SetIAMPolicyRequest {
|
||||
uint64 tailnet_id = 1;
|
||||
IAMPolicy policy = 2;
|
||||
string policy = 2;
|
||||
}
|
||||
|
||||
message SetIAMPolicyResponse {}
|
||||
|
||||
message IAMPolicy {
|
||||
repeated string subs = 1;
|
||||
repeated string emails = 2;
|
||||
repeated string filters = 3;
|
||||
map<string, string> roles = 4;
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1
|
||||
message Tailnet {
|
||||
uint64 id = 1;
|
||||
string name = 2;
|
||||
IAMPolicy iam_policy = 3;
|
||||
ACLPolicy acl_policy = 4;
|
||||
string iam_policy = 3;
|
||||
string acl_policy = 4;
|
||||
DNSConfig dns_config = 5;
|
||||
|
||||
bool service_collection_enabled = 6;
|
||||
@@ -23,8 +23,8 @@ message Tailnet {
|
||||
|
||||
message CreateTailnetRequest {
|
||||
string name = 1;
|
||||
IAMPolicy iam_policy = 2;
|
||||
ACLPolicy acl_policy = 3;
|
||||
string iam_policy = 2;
|
||||
string acl_policy = 3;
|
||||
DNSConfig dns_config = 4;
|
||||
|
||||
bool service_collection_enabled = 5;
|
||||
@@ -39,8 +39,8 @@ message CreateTailnetResponse {
|
||||
|
||||
message UpdateTailnetRequest {
|
||||
uint64 tailnet_id = 1;
|
||||
IAMPolicy iam_policy = 2;
|
||||
ACLPolicy acl_policy = 3;
|
||||
string iam_policy = 2;
|
||||
string acl_policy = 3;
|
||||
DNSConfig dns_config = 4;
|
||||
|
||||
bool service_collection_enabled = 5;
|
||||
|
||||
Reference in New Issue
Block a user