@cofy-x/axern-sdk 0.2.0-bootstrap.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/generated/proto.js +0 -1
- package/dist/proto/axern/control/admin/v1/access.proto +123 -0
- package/dist/proto/axern/control/admin/v1/audit.proto +11 -0
- package/dist/proto/axern/control/gateway/v1/gateway.proto +25 -0
- package/dist/proto/axern/control/identity/v1/identity.proto +39 -0
- package/dist/proto/axern/control/tunnel/v1/tunnel.proto +3 -11
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/generated/proto.js
CHANGED
|
@@ -15,7 +15,6 @@ const defaultProtoRootCandidates = [
|
|
|
15
15
|
];
|
|
16
16
|
const protoFiles = [
|
|
17
17
|
"axern/control/environment/v1/environment.proto",
|
|
18
|
-
"axern/control/gateway/v1/gateway.proto",
|
|
19
18
|
"axern/control/service/v1/service.proto",
|
|
20
19
|
"axern/control/tunnel/v1/tunnel.proto",
|
|
21
20
|
"axern/node/sandbox/v1/node.proto",
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package axern.control.admin.v1;
|
|
4
|
+
|
|
5
|
+
option go_package = "github.com/cofy-x/axern/sdk/go/gen/axern/control/admin/v1;adminv1";
|
|
6
|
+
|
|
7
|
+
import "google/protobuf/timestamp.proto";
|
|
8
|
+
|
|
9
|
+
enum PrincipalKind {
|
|
10
|
+
PRINCIPAL_KIND_UNSPECIFIED = 0;
|
|
11
|
+
PRINCIPAL_KIND_HUMAN = 1;
|
|
12
|
+
PRINCIPAL_KIND_SERVICE = 2;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
enum PrincipalStatus {
|
|
16
|
+
PRINCIPAL_STATUS_UNSPECIFIED = 0;
|
|
17
|
+
PRINCIPAL_STATUS_ACTIVE = 1;
|
|
18
|
+
PRINCIPAL_STATUS_DISABLED = 2;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
enum AccessScopeType {
|
|
22
|
+
ACCESS_SCOPE_TYPE_UNSPECIFIED = 0;
|
|
23
|
+
ACCESS_SCOPE_TYPE_PLATFORM = 1;
|
|
24
|
+
ACCESS_SCOPE_TYPE_NAMESPACE = 2;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
enum AccessRole {
|
|
28
|
+
ACCESS_ROLE_UNSPECIFIED = 0;
|
|
29
|
+
ACCESS_ROLE_PLATFORM_ADMIN = 1;
|
|
30
|
+
ACCESS_ROLE_NAMESPACE_ADMIN = 2;
|
|
31
|
+
ACCESS_ROLE_NAMESPACE_EDITOR = 3;
|
|
32
|
+
ACCESS_ROLE_NAMESPACE_VIEWER = 4;
|
|
33
|
+
ACCESS_ROLE_ROLLOUT_EXECUTOR = 5;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
message Principal {
|
|
37
|
+
string principal_id = 1;
|
|
38
|
+
string name = 2;
|
|
39
|
+
string display_name = 3;
|
|
40
|
+
PrincipalKind kind = 4;
|
|
41
|
+
PrincipalStatus status = 5;
|
|
42
|
+
int64 version = 6;
|
|
43
|
+
google.protobuf.Timestamp created_at = 7;
|
|
44
|
+
google.protobuf.Timestamp updated_at = 8;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message PrincipalCredential {
|
|
48
|
+
string credential_id = 1;
|
|
49
|
+
string principal_id = 2;
|
|
50
|
+
string fingerprint = 3;
|
|
51
|
+
google.protobuf.Timestamp certificate_not_after = 4;
|
|
52
|
+
string label = 5;
|
|
53
|
+
google.protobuf.Timestamp created_at = 6;
|
|
54
|
+
google.protobuf.Timestamp revoked_at = 7;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message RoleBinding {
|
|
58
|
+
string binding_id = 1;
|
|
59
|
+
string principal_id = 2;
|
|
60
|
+
AccessScopeType scope_type = 3;
|
|
61
|
+
string namespace = 4;
|
|
62
|
+
AccessRole role = 5;
|
|
63
|
+
string created_by_principal_id = 6;
|
|
64
|
+
google.protobuf.Timestamp created_at = 7;
|
|
65
|
+
string revoked_by_principal_id = 8;
|
|
66
|
+
google.protobuf.Timestamp revoked_at = 9;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
message CreatePrincipalRequest {
|
|
70
|
+
string name = 1;
|
|
71
|
+
string display_name = 2;
|
|
72
|
+
PrincipalKind kind = 3;
|
|
73
|
+
}
|
|
74
|
+
message CreatePrincipalResponse { Principal principal = 1; }
|
|
75
|
+
|
|
76
|
+
message ListPrincipalsRequest {}
|
|
77
|
+
message ListPrincipalsResponse { repeated Principal principals = 1; }
|
|
78
|
+
|
|
79
|
+
message DisablePrincipalRequest { string principal_id = 1; }
|
|
80
|
+
message DisablePrincipalResponse { Principal principal = 1; }
|
|
81
|
+
|
|
82
|
+
message AddPrincipalCredentialRequest {
|
|
83
|
+
string principal_id = 1;
|
|
84
|
+
bytes certificate_der = 2;
|
|
85
|
+
string label = 3;
|
|
86
|
+
}
|
|
87
|
+
message AddPrincipalCredentialResponse { PrincipalCredential credential = 1; }
|
|
88
|
+
|
|
89
|
+
message ListPrincipalCredentialsRequest { string principal_id = 1; }
|
|
90
|
+
message ListPrincipalCredentialsResponse { repeated PrincipalCredential credentials = 1; }
|
|
91
|
+
|
|
92
|
+
message RevokePrincipalCredentialRequest { string credential_id = 1; }
|
|
93
|
+
message RevokePrincipalCredentialResponse { PrincipalCredential credential = 1; }
|
|
94
|
+
|
|
95
|
+
message GrantRoleBindingRequest {
|
|
96
|
+
string principal_id = 1;
|
|
97
|
+
AccessScopeType scope_type = 2;
|
|
98
|
+
string namespace = 3;
|
|
99
|
+
AccessRole role = 4;
|
|
100
|
+
}
|
|
101
|
+
message GrantRoleBindingResponse { RoleBinding binding = 1; }
|
|
102
|
+
|
|
103
|
+
message ListRoleBindingsRequest {
|
|
104
|
+
string principal_id = 1;
|
|
105
|
+
string namespace = 2;
|
|
106
|
+
bool include_revoked = 3;
|
|
107
|
+
}
|
|
108
|
+
message ListRoleBindingsResponse { repeated RoleBinding bindings = 1; }
|
|
109
|
+
|
|
110
|
+
message RevokeRoleBindingRequest { string binding_id = 1; }
|
|
111
|
+
message RevokeRoleBindingResponse { RoleBinding binding = 1; }
|
|
112
|
+
|
|
113
|
+
service AccessAdmin {
|
|
114
|
+
rpc CreatePrincipal(CreatePrincipalRequest) returns (CreatePrincipalResponse) {}
|
|
115
|
+
rpc ListPrincipals(ListPrincipalsRequest) returns (ListPrincipalsResponse) {}
|
|
116
|
+
rpc DisablePrincipal(DisablePrincipalRequest) returns (DisablePrincipalResponse) {}
|
|
117
|
+
rpc AddPrincipalCredential(AddPrincipalCredentialRequest) returns (AddPrincipalCredentialResponse) {}
|
|
118
|
+
rpc ListPrincipalCredentials(ListPrincipalCredentialsRequest) returns (ListPrincipalCredentialsResponse) {}
|
|
119
|
+
rpc RevokePrincipalCredential(RevokePrincipalCredentialRequest) returns (RevokePrincipalCredentialResponse) {}
|
|
120
|
+
rpc GrantRoleBinding(GrantRoleBindingRequest) returns (GrantRoleBindingResponse) {}
|
|
121
|
+
rpc ListRoleBindings(ListRoleBindingsRequest) returns (ListRoleBindingsResponse) {}
|
|
122
|
+
rpc RevokeRoleBinding(RevokeRoleBindingRequest) returns (RevokeRoleBindingResponse) {}
|
|
123
|
+
}
|
|
@@ -14,6 +14,13 @@ enum AdminAuditOperation {
|
|
|
14
14
|
ADMIN_AUDIT_OPERATION_RETRY_STORAGE_BINDING = 4;
|
|
15
15
|
ADMIN_AUDIT_OPERATION_PURGE_SERVICE = 5;
|
|
16
16
|
ADMIN_AUDIT_OPERATION_RETIRE_NODE = 6;
|
|
17
|
+
ADMIN_AUDIT_OPERATION_CREATE_PRINCIPAL = 7;
|
|
18
|
+
ADMIN_AUDIT_OPERATION_DISABLE_PRINCIPAL = 8;
|
|
19
|
+
ADMIN_AUDIT_OPERATION_ADD_CREDENTIAL = 9;
|
|
20
|
+
ADMIN_AUDIT_OPERATION_REVOKE_CREDENTIAL = 10;
|
|
21
|
+
ADMIN_AUDIT_OPERATION_GRANT_ROLE_BINDING = 11;
|
|
22
|
+
ADMIN_AUDIT_OPERATION_REVOKE_ROLE_BINDING = 12;
|
|
23
|
+
ADMIN_AUDIT_OPERATION_BOOTSTRAP_ACCESS = 13;
|
|
17
24
|
}
|
|
18
25
|
|
|
19
26
|
enum AdminAuditTargetType {
|
|
@@ -22,6 +29,9 @@ enum AdminAuditTargetType {
|
|
|
22
29
|
ADMIN_AUDIT_TARGET_TYPE_STORAGE_BINDING = 2;
|
|
23
30
|
ADMIN_AUDIT_TARGET_TYPE_SERVICE = 3;
|
|
24
31
|
ADMIN_AUDIT_TARGET_TYPE_NODE = 4;
|
|
32
|
+
ADMIN_AUDIT_TARGET_TYPE_PRINCIPAL = 5;
|
|
33
|
+
ADMIN_AUDIT_TARGET_TYPE_CREDENTIAL = 6;
|
|
34
|
+
ADMIN_AUDIT_TARGET_TYPE_ROLE_BINDING = 7;
|
|
25
35
|
}
|
|
26
36
|
|
|
27
37
|
message AdminAuditEvent {
|
|
@@ -31,6 +41,7 @@ message AdminAuditEvent {
|
|
|
31
41
|
string target_id = 4;
|
|
32
42
|
string operator_reason = 5;
|
|
33
43
|
google.protobuf.Timestamp created_at = 6;
|
|
44
|
+
string actor_principal_id = 7;
|
|
34
45
|
}
|
|
35
46
|
|
|
36
47
|
message AdminAuditEventFilter {
|
|
@@ -42,6 +42,8 @@ message ResolveServiceRouteResponse {
|
|
|
42
42
|
message ResolveAllocationTerminalRequest {
|
|
43
43
|
string allocation_id = 1;
|
|
44
44
|
int64 ttl_seconds = 2;
|
|
45
|
+
string client_certificate_fingerprint = 3;
|
|
46
|
+
string rollout_execution_lease = 4;
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
message ResolveAllocationTerminalResponse {
|
|
@@ -54,7 +56,30 @@ message ResolveAllocationTerminalResponse {
|
|
|
54
56
|
axern.control.common.v1.ExecutionLease lease = 7;
|
|
55
57
|
}
|
|
56
58
|
|
|
59
|
+
message ResolveTunnelRelayTargetRequest {
|
|
60
|
+
string session_id = 1;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
message ResolveTunnelRelayTargetResponse {
|
|
64
|
+
string node_edge_target = 1;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
message ResolveServiceReplicaTargetsRequest {
|
|
68
|
+
string service_id = 1;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message ServiceReplicaTarget {
|
|
72
|
+
string allocation_id = 1;
|
|
73
|
+
string node_id = 2;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
message ResolveServiceReplicaTargetsResponse {
|
|
77
|
+
repeated ServiceReplicaTarget replicas = 1;
|
|
78
|
+
}
|
|
79
|
+
|
|
57
80
|
service GatewayControl {
|
|
58
81
|
rpc ResolveServiceRoute(ResolveServiceRouteRequest) returns (ResolveServiceRouteResponse) {}
|
|
59
82
|
rpc ResolveAllocationTerminal(ResolveAllocationTerminalRequest) returns (ResolveAllocationTerminalResponse) {}
|
|
83
|
+
rpc ResolveTunnelRelayTarget(ResolveTunnelRelayTargetRequest) returns (ResolveTunnelRelayTargetResponse) {}
|
|
84
|
+
rpc ResolveServiceReplicaTargets(ResolveServiceReplicaTargetsRequest) returns (ResolveServiceReplicaTargetsResponse) {}
|
|
60
85
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package axern.control.identity.v1;
|
|
4
|
+
|
|
5
|
+
option go_package = "github.com/cofy-x/axern/sdk/go/gen/axern/control/identity/v1;identityv1";
|
|
6
|
+
|
|
7
|
+
import "google/protobuf/timestamp.proto";
|
|
8
|
+
|
|
9
|
+
message PrincipalIdentity {
|
|
10
|
+
string principal_id = 1;
|
|
11
|
+
string name = 2;
|
|
12
|
+
string display_name = 3;
|
|
13
|
+
string kind = 4;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
message CredentialIdentity {
|
|
17
|
+
string credential_id = 1;
|
|
18
|
+
string label = 2;
|
|
19
|
+
string fingerprint = 3;
|
|
20
|
+
google.protobuf.Timestamp certificate_not_after = 4;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message EffectiveRole {
|
|
24
|
+
string role = 1;
|
|
25
|
+
string scope_type = 2;
|
|
26
|
+
string namespace = 3;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
message WhoAmIRequest {}
|
|
30
|
+
|
|
31
|
+
message WhoAmIResponse {
|
|
32
|
+
PrincipalIdentity principal = 1;
|
|
33
|
+
CredentialIdentity credential = 2;
|
|
34
|
+
repeated EffectiveRole roles = 3;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
service IdentityControl {
|
|
38
|
+
rpc WhoAmI(WhoAmIRequest) returns (WhoAmIResponse) {}
|
|
39
|
+
}
|
|
@@ -86,6 +86,8 @@ message TunnelSession {
|
|
|
86
86
|
google.protobuf.Timestamp last_peer_event_at = 20;
|
|
87
87
|
int64 bytes_in = 21;
|
|
88
88
|
int64 bytes_out = 22;
|
|
89
|
+
string namespace = 23;
|
|
90
|
+
string creator_principal_id = 24;
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
message TunnelSessionEvent {
|
|
@@ -129,6 +131,7 @@ message ListTunnelSessionsRequest {
|
|
|
129
131
|
string allocation_id = 1;
|
|
130
132
|
string node_id = 2;
|
|
131
133
|
bool include_terminal = 3;
|
|
134
|
+
string namespace = 4;
|
|
132
135
|
}
|
|
133
136
|
|
|
134
137
|
message ListTunnelSessionsResponse {
|
|
@@ -173,16 +176,6 @@ message RenewTunnelSessionResponse {
|
|
|
173
176
|
TunnelSession session = 1;
|
|
174
177
|
}
|
|
175
178
|
|
|
176
|
-
message ValidateTunnelPeerRequest {
|
|
177
|
-
string session_id = 1;
|
|
178
|
-
TunnelPeerKind peer_kind = 2;
|
|
179
|
-
string token = 3;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
message ValidateTunnelPeerResponse {
|
|
183
|
-
TunnelSession session = 1;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
179
|
service TunnelControl {
|
|
187
180
|
rpc CreateTunnelSession(CreateTunnelSessionRequest) returns (CreateTunnelSessionResponse) {}
|
|
188
181
|
rpc GetTunnelSession(GetTunnelSessionRequest) returns (GetTunnelSessionResponse) {}
|
|
@@ -191,5 +184,4 @@ service TunnelControl {
|
|
|
191
184
|
rpc InspectTunnelSession(InspectTunnelSessionRequest) returns (InspectTunnelSessionResponse) {}
|
|
192
185
|
rpc RevokeTunnelSession(RevokeTunnelSessionRequest) returns (RevokeTunnelSessionResponse) {}
|
|
193
186
|
rpc RenewTunnelSession(RenewTunnelSessionRequest) returns (RenewTunnelSessionResponse) {}
|
|
194
|
-
rpc ValidateTunnelPeer(ValidateTunnelPeerRequest) returns (ValidateTunnelPeerResponse) {}
|
|
195
187
|
}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED