feat: system api requires authenticated requests (#3570)

* begin auth

* feat: system api requires authenticated requests

* fix tests
This commit is contained in:
Livio Amstutz
2022-05-30 13:38:30 +02:00
committed by GitHub
parent 41d78ef523
commit 2fc39c0da0
15 changed files with 179 additions and 50 deletions

View File

@@ -104,6 +104,10 @@ service SystemService {
post: "/instances/_search"
body: "*"
};
option (zitadel.v1.auth_option) = {
permission: "authenticated";
};
}
// Returns the detail of an instance
@@ -111,6 +115,10 @@ service SystemService {
option (google.api.http) = {
get: "/instances/{instance_id}";
};
option (zitadel.v1.auth_option) = {
permission: "authenticated";
};
}
// Creates a new instance with all needed setup data
@@ -120,6 +128,10 @@ service SystemService {
post: "/instances"
body: "*"
};
option (zitadel.v1.auth_option) = {
permission: "authenticated";
};
}
// Removes a instances
@@ -128,6 +140,10 @@ service SystemService {
option (google.api.http) = {
delete: "/instances/{instance_id}"
};
option (zitadel.v1.auth_option) = {
permission: "authenticated";
};
}
// Checks if a domain exists
@@ -136,6 +152,10 @@ service SystemService {
post: "/domains/{domain}/_exists";
body: "*"
};
option (zitadel.v1.auth_option) = {
permission: "authenticated";
};
}
// Returns the custom domains of an instance
@@ -144,6 +164,10 @@ service SystemService {
post: "/instances/{instance_id}/domains/_search";
body: "*"
};
option (zitadel.v1.auth_option) = {
permission: "authenticated";
};
}
// Returns the domain of an instance
@@ -152,6 +176,10 @@ service SystemService {
post: "/instances/{instance_id}/domains";
body: "*"
};
option (zitadel.v1.auth_option) = {
permission: "authenticated";
};
}
// Returns the domain of an instance
@@ -159,6 +187,10 @@ service SystemService {
option (google.api.http) = {
delete: "/instances/{instance_id}/domains/{domain}";
};
option (zitadel.v1.auth_option) = {
permission: "authenticated";
};
}
// Returns the domain of an instance
@@ -167,6 +199,10 @@ service SystemService {
post: "/instances/{instance_id}/domains/_set_primary";
body: "*"
};
option (zitadel.v1.auth_option) = {
permission: "authenticated";
};
}
@@ -179,6 +215,10 @@ service SystemService {
body: "*"
};
option (zitadel.v1.auth_option) = {
permission: "authenticated";
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "views";
external_docs: {
@@ -203,6 +243,9 @@ service SystemService {
post: "/views/{database}/{view_name}";
};
option (zitadel.v1.auth_option) = {
permission: "authenticated";
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "views";
@@ -228,6 +271,10 @@ service SystemService {
body: "*"
};
option (zitadel.v1.auth_option) = {
permission: "authenticated";
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "failed events";
external_docs: {
@@ -253,6 +300,10 @@ service SystemService {
delete: "/failedevents/{database}/{view_name}/{failed_sequence}";
};
option (zitadel.v1.auth_option) = {
permission: "authenticated";
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "failed events";
external_docs: {