feat: import upstream ZITADEL Login V2 v4.20.4 source workspace
This commit is contained in:
1 parent
eadd0e558b
commit
4404849fc4
644 files changed
+153201
-10
No files matched your search
@@ -0,0 +1,205 @@
|
||||
syntax = "proto3";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "zitadel/filter/v2/filter.proto";
|
||||
import "zitadel/object/v2/object.proto";
|
||||
import "validate/validate.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
package zitadel.instance.v2;
|
||||
|
||||
option go_package = "github.com/zitadel/zitadel/pkg/grpc/instance/v2;instance";
|
||||
|
||||
message Instance {
|
||||
// ID is the unique identifier of the instance.
|
||||
string id = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"69629023906488334\""
|
||||
}
|
||||
];
|
||||
|
||||
// ChangeDate is the timestamp when the instance was last changed.
|
||||
google.protobuf.Timestamp change_date = 2 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
|
||||
// CreationDate is the timestamp when the instance was created.
|
||||
google.protobuf.Timestamp creation_date = 3 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
|
||||
// State is the current state of the instance.
|
||||
State state = 4;
|
||||
|
||||
// Name is the display name of the instance.
|
||||
// This can be changed by the instance administrator.
|
||||
string name = 5 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"ZITADEL\"";
|
||||
}
|
||||
];
|
||||
|
||||
// Version of the system the instance is running on.
|
||||
// This is managed by the system and cannot be changed by the instance administrator.
|
||||
string version = 6 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"1.0.0\"";
|
||||
}
|
||||
];
|
||||
|
||||
// CustomDomains are the domains that are assigned to the instance.
|
||||
// The list includes auto-generated and manually added domains.
|
||||
// They are all unique across all instances in the system.
|
||||
// They're used to route requests to the correct instance.
|
||||
repeated CustomDomain custom_domains = 7;
|
||||
}
|
||||
|
||||
enum State {
|
||||
STATE_UNSPECIFIED = 0;
|
||||
STATE_CREATING = 1;
|
||||
STATE_RUNNING = 2;
|
||||
STATE_STOPPING = 3;
|
||||
STATE_STOPPED = 4;
|
||||
}
|
||||
|
||||
message CustomDomain {
|
||||
// InstanceID is the unique identifier of the instance the domain belongs to.
|
||||
string instance_id = 1;
|
||||
|
||||
// CreationDate is the timestamp when the domain was created.
|
||||
google.protobuf.Timestamp creation_date = 2 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
|
||||
// Domain is the fully qualified domain name.
|
||||
// It must be unique across all instances in the system.
|
||||
string domain = 3 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"zitadel.com\""
|
||||
}
|
||||
];
|
||||
|
||||
// Primary states whether this domain is the primary domain of the instance.
|
||||
// Each instance must have exactly one primary domain.
|
||||
// The primary domain is used for various purposes and acts as fallback
|
||||
// in those cases, e.g if no explicit domain is specified.
|
||||
bool primary = 4;
|
||||
|
||||
// Generate states whether this domain was auto-generated by the system.
|
||||
// Auto-generated domains follow a specific pattern and are created
|
||||
// when a new instance is created.
|
||||
// They cannot be deleted, but the primary domain can be changed
|
||||
// to a manually added domain.
|
||||
bool generated = 5;
|
||||
}
|
||||
|
||||
enum FieldName {
|
||||
FIELD_NAME_UNSPECIFIED = 0;
|
||||
FIELD_NAME_ID = 1;
|
||||
FIELD_NAME_NAME = 2;
|
||||
FIELD_NAME_CREATION_DATE = 3;
|
||||
}
|
||||
|
||||
message Filter {
|
||||
oneof filter {
|
||||
option (validate.required) = true;
|
||||
|
||||
// Filter for one or more specific instance IDs.
|
||||
zitadel.filter.v2.InIDsFilter in_ids_filter = 1;
|
||||
|
||||
// Filter for instances that have at least one of the specified Custom Domains.
|
||||
CustomDomainsFilter custom_domains_filter = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message CustomDomainsFilter {
|
||||
// The domains to query for. All instances that have at least one of the
|
||||
// specified domains will be returned.
|
||||
// A maximum of 20 domains can be specified.
|
||||
repeated string domains = 1 [
|
||||
(validate.rules).repeated = {max_items: 20, items: {string: {min_len: 1, max_len: 253}}},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
max_items: 20;
|
||||
example: "[\"my-instace.zitadel.cloud\", \"auth.custom.com\"]";
|
||||
}
|
||||
];
|
||||
}
|
||||
message CustomDomainFilter {
|
||||
oneof filter {
|
||||
option (validate.required) = true;
|
||||
|
||||
// Filter for a specific Custom Domain.
|
||||
DomainFilter domain_filter = 1;
|
||||
|
||||
// Filter whether the domain is auto-generated.
|
||||
bool generated_filter = 2;
|
||||
|
||||
// Filter whether the domain is the primary domain of the instance.
|
||||
bool primary_filter = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message DomainFilter {
|
||||
// The domain to filter for.
|
||||
string domain = 1 [
|
||||
(validate.rules).string = {max_len: 253},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
max_length: 253;
|
||||
example: "\"zitadel.com\"";
|
||||
}
|
||||
];
|
||||
|
||||
// The method to use for text comparison.
|
||||
// If not specified, EQUALS is used.
|
||||
zitadel.object.v2.TextQueryMethod method = 2 [
|
||||
(validate.rules).enum.defined_only = true
|
||||
];
|
||||
}
|
||||
|
||||
enum DomainFieldName {
|
||||
DOMAIN_FIELD_NAME_UNSPECIFIED = 0;
|
||||
DOMAIN_FIELD_NAME_DOMAIN = 1;
|
||||
DOMAIN_FIELD_NAME_PRIMARY = 2;
|
||||
DOMAIN_FIELD_NAME_GENERATED = 3;
|
||||
DOMAIN_FIELD_NAME_CREATION_DATE = 4;
|
||||
}
|
||||
|
||||
message TrustedDomain {
|
||||
// InstanceID is the unique identifier of the instance the domain belongs to.
|
||||
string instance_id = 1;
|
||||
|
||||
// The timestamp when the domain was created.
|
||||
google.protobuf.Timestamp creation_date = 2 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
|
||||
// Domain is the fully qualified domain name.
|
||||
string domain = 3 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"zitadel.com\""
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message TrustedDomainFilter {
|
||||
oneof filter {
|
||||
option (validate.required) = true;
|
||||
|
||||
// Filter for a specific Trusted Domain.
|
||||
DomainFilter domain_filter = 1;
|
||||
}
|
||||
}
|
||||
|
||||
enum TrustedDomainFieldName {
|
||||
TRUSTED_DOMAIN_FIELD_NAME_UNSPECIFIED = 0;
|
||||
TRUSTED_DOMAIN_FIELD_NAME_DOMAIN = 1;
|
||||
TRUSTED_DOMAIN_FIELD_NAME_CREATION_DATE = 2;
|
||||
}
|
||||
@@ -0,0 +1,508 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package zitadel.instance.v2;
|
||||
|
||||
import "validate/validate.proto";
|
||||
import "zitadel/object/v2/object.proto";
|
||||
import "zitadel/instance/v2/instance.proto";
|
||||
import "zitadel/filter/v2/filter.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/field_behavior.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "zitadel/protoc_gen_zitadel/v2/options.proto";
|
||||
|
||||
option go_package = "github.com/zitadel/zitadel/pkg/grpc/instance/v2;instance";
|
||||
|
||||
// Service to manage instances and their domains.
|
||||
// The service provides methods to create, update, delete and list instances and their domains.
|
||||
//
|
||||
// Contrary to most services in ZITADEL, the instance service allows accessing data not only from
|
||||
// the current instance, but also from other instances.
|
||||
service InstanceService {
|
||||
|
||||
// Delete Instance
|
||||
//
|
||||
// Deletes an instance with the given ID.
|
||||
// This method requires system level permissions and cannot be called from an instance context.
|
||||
//
|
||||
// Required permissions:
|
||||
// - `system.instance.delete`
|
||||
rpc DeleteInstance(DeleteInstanceRequest) returns (DeleteInstanceResponse) {
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "system.instance.delete"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Get Instance
|
||||
//
|
||||
// Returns the instance in the current context or by its ID.
|
||||
// By default the instance will be determined by the context of the request,
|
||||
// e.g. the host header.
|
||||
// You can optionally pass an InstanceID to retrieve a specific instance.
|
||||
// This requires additional permissions.
|
||||
//
|
||||
// Required permissions:
|
||||
// - `iam.read`
|
||||
// - `system.instance.read` (if InstanceID is set)
|
||||
rpc GetInstance(GetInstanceRequest) returns (GetInstanceResponse) {
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "authenticated"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Update Instance
|
||||
//
|
||||
// Updates instance's name in the current context or by its ID.
|
||||
// By default the instance will be determined by the context of the request,
|
||||
// e.g. the host header.
|
||||
// You can optionally pass an InstanceID to update a specific instance.
|
||||
// This requires additional permissions.
|
||||
//
|
||||
// Required permissions:
|
||||
// - `iam.write`
|
||||
// - `system.instance.write` (if InstanceID is set)
|
||||
rpc UpdateInstance(UpdateInstanceRequest) returns (UpdateInstanceResponse) {
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "authenticated"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// List Instances
|
||||
//
|
||||
// Lists instances matching the given query.
|
||||
// The query can be used to filter either by instance ID or domain.
|
||||
// The request is paginated and returns 100 results by default.
|
||||
// This method requires system level permissions and cannot be called from an instance context.
|
||||
//
|
||||
// Required permissions:
|
||||
// - `system.instance.read`
|
||||
rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) {
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "system.instance.read"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Add Custom Domain
|
||||
//
|
||||
// Adds a Custom Domain to the instance.
|
||||
// The Custom Domain must be unique across all instances.
|
||||
// Once the domain is added, it will be used to route requests to this instance.
|
||||
// This method requires system level permissions and cannot be called from an instance context.
|
||||
//
|
||||
// Required permissions:
|
||||
// - `system.domain.write`
|
||||
rpc AddCustomDomain(AddCustomDomainRequest) returns (AddCustomDomainResponse) {
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "system.domain.write"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Remove Custom Domain
|
||||
//
|
||||
// Removes a Custom Domain from the instance.
|
||||
// Be aware that this will stop routing requests from this domain to the instance and
|
||||
// might break existing setups or integrations.
|
||||
// This method requires system level permissions and cannot be called from an instance context.
|
||||
//
|
||||
// Required permissions:
|
||||
// - `system.domain.write`
|
||||
rpc RemoveCustomDomain(RemoveCustomDomainRequest) returns (RemoveCustomDomainResponse) {
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "system.domain.write"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// List Custom Domains
|
||||
//
|
||||
// Lists Custom Domains of the instance.
|
||||
//
|
||||
// By default the instance will be determined by the context of the request,
|
||||
// e.g. the host header.
|
||||
// You can optionally pass an InstanceID to list the domains of a specific instance.
|
||||
// This requires additional permissions.
|
||||
//
|
||||
// Required permissions:
|
||||
// - `iam.read`
|
||||
// - `system.instance.read` (if InstanceID is set)
|
||||
rpc ListCustomDomains(ListCustomDomainsRequest) returns (ListCustomDomainsResponse) {
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "authenticated"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Add Trusted Domain
|
||||
//
|
||||
// Adds a Trusted Domain to the instance.
|
||||
// By default the instance will be determined by the context of the request,
|
||||
// e.g. the host header.
|
||||
// You can optionally pass an InstanceID to list the domains of a specific instance.
|
||||
// This requires additional permissions.
|
||||
//
|
||||
// It must be a valid domain name.
|
||||
// Once the domain is added, it can be used in API responses like OIDC discovery,
|
||||
// email templates, and more.
|
||||
// This can be used in cases where the API is accessed through a different domain
|
||||
// than the Custom Domain, e.g. proxy setups and custom login UIs.
|
||||
// Unlike Custom Domains, Trusted Domains are not used to route requests to this instance
|
||||
// and therefore do not need to be uniquely assigned to an instance.
|
||||
//
|
||||
// Required permissions:
|
||||
// - `iam.write`
|
||||
// - `system.instance.write` (if InstanceID is set)
|
||||
rpc AddTrustedDomain(AddTrustedDomainRequest) returns (AddTrustedDomainResponse) {
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "authenticated"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Remove Trusted Domain
|
||||
//
|
||||
// Removes a Trusted Domain from the instance.
|
||||
// By default the instance will be determined by the context of the request,
|
||||
// e.g. the host header.
|
||||
// You can optionally pass an InstanceID to list the domains of a specific instance.
|
||||
// This requires additional permissions.
|
||||
//
|
||||
// Required permissions:
|
||||
// - `iam.write`
|
||||
// - `system.instance.write` (if InstanceID is set)
|
||||
rpc RemoveTrustedDomain(RemoveTrustedDomainRequest) returns (RemoveTrustedDomainResponse) {
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "authenticated"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// List Trusted Domains
|
||||
//
|
||||
// Lists Trusted Domains of the instance.
|
||||
// By default the instance will be determined by the context of the request,
|
||||
// e.g. the host header.
|
||||
// You can optionally pass an InstanceID to list the domains of a specific instance.
|
||||
// This requires additional permissions.
|
||||
//
|
||||
// Required permissions:
|
||||
// - `iam.read`
|
||||
// - `system.instance.read` (if InstanceID is set)
|
||||
rpc ListTrustedDomains(ListTrustedDomainsRequest) returns (ListTrustedDomainsResponse) {
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "authenticated"
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
message DeleteInstanceRequest {
|
||||
// InstanceID is the unique ID of the instance to be deleted.
|
||||
string instance_id = 1 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
example: "\"222430354126975533\"";
|
||||
},
|
||||
(google.api.field_behavior) = REQUIRED
|
||||
];
|
||||
}
|
||||
|
||||
message DeleteInstanceResponse {
|
||||
// DeletionDate is the timestamp when the instance was deleted.
|
||||
google.protobuf.Timestamp deletion_date = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message GetInstanceRequest {
|
||||
// InstanceID is the unique ID of the instance to be retrieved.
|
||||
// If not set, the instance in the current context (e.g. identified by the host header) will be returned.
|
||||
// If an ID is set, the caller must have additional permissions.
|
||||
string instance_id = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
example: "\"222430354126975533\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message GetInstanceResponse {
|
||||
// The instance matching the instance ID
|
||||
zitadel.instance.v2.Instance instance = 1;
|
||||
}
|
||||
|
||||
message UpdateInstanceRequest {
|
||||
// InstanceID is the unique ID of the instance to be updated.
|
||||
// If not set, the instance in the current context (e.g. identified by the host header) will be changed.
|
||||
// If an ID is set, the caller must have additional permissions.
|
||||
string instance_id = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
example: "\"222430354126975533\"";
|
||||
}
|
||||
];
|
||||
|
||||
// InstanceName is the new name of the instance to be set.
|
||||
string instance_name = 2 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
example: "\"my instance\"";
|
||||
},
|
||||
(google.api.field_behavior) = REQUIRED
|
||||
];
|
||||
}
|
||||
|
||||
message UpdateInstanceResponse {
|
||||
// ChangeDate is the timestamp when the instance was last changed.
|
||||
// In case the instance was not changed during the call, the previous change date is returned.
|
||||
google.protobuf.Timestamp change_date = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message ListInstancesRequest {
|
||||
// Paginate through the results using a limit, offset and sorting.
|
||||
zitadel.filter.v2.PaginationRequest pagination = 1;
|
||||
|
||||
// The field the result is sorted by.
|
||||
FieldName sorting_column = 2 [
|
||||
(validate.rules).enum = {defined_only: true}
|
||||
];
|
||||
|
||||
// Filter the instances to be returned.
|
||||
repeated Filter filters = 3;
|
||||
}
|
||||
|
||||
message ListInstancesResponse {
|
||||
// The instances matching the query.
|
||||
repeated Instance instances = 1;
|
||||
|
||||
// Contains the total number of instances matching the query and the applied limit.
|
||||
zitadel.filter.v2.PaginationResponse pagination = 2;
|
||||
}
|
||||
|
||||
message AddCustomDomainRequest {
|
||||
// InstanceID is the unique ID of the instance to which the domain will be added.
|
||||
string instance_id = 1 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
example: "\"222430354126975533\"";
|
||||
},
|
||||
(google.api.field_behavior) = REQUIRED
|
||||
];
|
||||
|
||||
// Custom Domain to add to the instance.
|
||||
// Must be a valid domain name.
|
||||
// Once the domain is added, it will be used to route requests to this instance.
|
||||
string custom_domain = 2 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 253},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 253;
|
||||
},
|
||||
(google.api.field_behavior) = REQUIRED
|
||||
];
|
||||
}
|
||||
|
||||
message AddCustomDomainResponse {
|
||||
// CreationDate is the timestamp when the domain was added.
|
||||
google.protobuf.Timestamp creation_date = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message RemoveCustomDomainRequest {
|
||||
// InstanceID is the unique ID of the instance from which the domain will be removed.
|
||||
string instance_id = 1 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
example: "\"222430354126975533\"";
|
||||
},
|
||||
(google.api.field_behavior) = REQUIRED
|
||||
];
|
||||
|
||||
// CustomDomain is the the domain to remove from the instance.
|
||||
string custom_domain = 2 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 253},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 253;
|
||||
},
|
||||
(google.api.field_behavior) = REQUIRED
|
||||
];
|
||||
}
|
||||
|
||||
message RemoveCustomDomainResponse {
|
||||
// DeletionDate is the timestamp when the domain was removed.
|
||||
google.protobuf.Timestamp deletion_date = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message ListCustomDomainsRequest {
|
||||
// InstanceID is the unique ID of the instance whose domains will be listed.
|
||||
// If not set, the instance in the current context (e.g. identified by the host header) will be used.
|
||||
// If an ID is set, the caller must have additional permissions.
|
||||
string instance_id = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
example: "\"222430354126975533\"";
|
||||
}
|
||||
];
|
||||
|
||||
// Paginate and sort the results using a limit, offset and sorting.
|
||||
zitadel.filter.v2.PaginationRequest pagination = 2;
|
||||
|
||||
// The field the result is sorted by.
|
||||
DomainFieldName sorting_column = 3;
|
||||
|
||||
// Filter the domains to be returned.
|
||||
repeated CustomDomainFilter filters = 4;
|
||||
}
|
||||
|
||||
message ListCustomDomainsResponse {
|
||||
// The list of Custom Domains matching the query.
|
||||
repeated CustomDomain domains = 1;
|
||||
|
||||
// Contains the total number of domains matching the query and the applied limit.
|
||||
zitadel.filter.v2.PaginationResponse pagination = 2;
|
||||
}
|
||||
|
||||
message AddTrustedDomainRequest {
|
||||
// InstanceID is the unique ID of the instance to which the Trusted Domain will be added.
|
||||
// If not set, the instance in the current context (e.g. identified by the host header) will be used.
|
||||
// If an ID is set, the caller must have additional permissions.
|
||||
string instance_id = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
example: "\"222430354126975533\"";
|
||||
}
|
||||
];
|
||||
|
||||
// Trusted Domain to be added to the instance.
|
||||
// Must be a valid domain name.
|
||||
// Once the domain is added, it can be used in API responses like OIDC discovery,
|
||||
// email templates, and more.
|
||||
// This can be used in cases where the API is accessed through a different domain
|
||||
// than the Custom Domain, e.g. proxy setups and custom login UIs.
|
||||
// Unlike Custom Domains, Trusted Domains are not used to route requests to this instance
|
||||
// and therefore do not need to be uniquely assigned to an instance.
|
||||
string trusted_domain = 2 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 253},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"login.example.com\"";
|
||||
min_length: 1;
|
||||
max_length: 253;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message AddTrustedDomainResponse {
|
||||
// CreationDate is the timestamp when the Trusted Domain was added.
|
||||
google.protobuf.Timestamp creation_date = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message RemoveTrustedDomainRequest {
|
||||
// InstanceID is the unique ID of the instance from which the Trusted Domain will be removed.
|
||||
// If not set, the instance in the current context (e.g. identified by the host header) will be used.
|
||||
// If an ID is set, the caller must have additional permissions.
|
||||
string instance_id = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
example: "\"222430354126975533\"";
|
||||
}
|
||||
];
|
||||
|
||||
// The Trusted Domain to remove from the instance.
|
||||
string trusted_domain = 2 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 253},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"login.example.com\"";
|
||||
min_length: 1;
|
||||
max_length: 253;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message RemoveTrustedDomainResponse {
|
||||
// DeletionDate is the timestamp when the Trusted Domain was removed.
|
||||
google.protobuf.Timestamp deletion_date = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message ListTrustedDomainsRequest {
|
||||
// InstanceID is the unique ID of the instance whose Trusted Domains will be listed.
|
||||
// If not set, the instance in the current context (e.g. identified by the host header) will be used.
|
||||
// If an ID is set, the caller must have additional permissions.
|
||||
string instance_id = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
example: "\"222430354126975533\"";
|
||||
}
|
||||
];
|
||||
|
||||
// Paginate and sort the results using a limit, offset and sorting.
|
||||
zitadel.filter.v2.PaginationRequest pagination = 2;
|
||||
|
||||
// The field the result is sorted by.
|
||||
TrustedDomainFieldName sorting_column = 3;
|
||||
|
||||
// Filter the domains to be returned.
|
||||
repeated TrustedDomainFilter filters = 4;
|
||||
}
|
||||
|
||||
message ListTrustedDomainsResponse {
|
||||
// The list of Trusted Domains matching the query.
|
||||
repeated TrustedDomain trusted_domain = 1;
|
||||
|
||||
// Contains the total number of domains matching the query and the applied limit.
|
||||
zitadel.filter.v2.PaginationResponse pagination = 2;
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
syntax = "proto3";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "zitadel/object/v2/object.proto";
|
||||
import "validate/validate.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
package zitadel.instance.v2beta;
|
||||
|
||||
option go_package = "github.com/zitadel/zitadel/pkg/grpc/instance/v2beta;instance";
|
||||
|
||||
message Instance {
|
||||
string id = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"69629023906488334\""
|
||||
}
|
||||
];
|
||||
|
||||
// change_date is the timestamp when the object was changed
|
||||
//
|
||||
// on read: the timestamp of the last event reduced by the projection
|
||||
//
|
||||
// on manipulation: the timestamp of the event(s) added by the manipulation
|
||||
google.protobuf.Timestamp change_date = 2 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
|
||||
google.protobuf.Timestamp creation_date = 3 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
State state = 4 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
description: "current state of the instance";
|
||||
}
|
||||
];
|
||||
string name = 5 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"ZITADEL\"";
|
||||
}
|
||||
];
|
||||
string version = 6 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"1.0.0\"";
|
||||
}
|
||||
];
|
||||
repeated Domain domains = 7;
|
||||
}
|
||||
|
||||
enum State {
|
||||
STATE_UNSPECIFIED = 0;
|
||||
STATE_CREATING = 1;
|
||||
STATE_RUNNING = 2;
|
||||
STATE_STOPPING = 3;
|
||||
STATE_STOPPED = 4;
|
||||
}
|
||||
|
||||
message Domain {
|
||||
string instance_id = 1;
|
||||
|
||||
google.protobuf.Timestamp creation_date = 2 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
|
||||
string domain = 3 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"zitadel.com\""
|
||||
}
|
||||
];
|
||||
bool primary = 4;
|
||||
bool generated = 5;
|
||||
}
|
||||
|
||||
enum FieldName {
|
||||
FIELD_NAME_UNSPECIFIED = 0;
|
||||
FIELD_NAME_ID = 1;
|
||||
FIELD_NAME_NAME = 2;
|
||||
FIELD_NAME_CREATION_DATE = 3;
|
||||
}
|
||||
|
||||
message Query {
|
||||
oneof query {
|
||||
option (validate.required) = true;
|
||||
|
||||
IdsQuery id_query = 1;
|
||||
DomainsQuery domain_query = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message IdsQuery {
|
||||
repeated string ids = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
description: "Instance ID";
|
||||
example: "[\"4820840938402429\",\"4820840938402422\"]"
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message DomainsQuery {
|
||||
repeated string domains = 1 [
|
||||
(validate.rules).repeated = {max_items: 20, items: {string: {min_len: 1, max_len: 100}}},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
max_items: 20;
|
||||
example: "[\"my-instace.zitadel.cloud\", \"auth.custom.com\"]";
|
||||
description: "Return the instances that have the requested domains";
|
||||
}
|
||||
];
|
||||
}
|
||||
message DomainSearchQuery {
|
||||
oneof query {
|
||||
option (validate.required) = true;
|
||||
|
||||
DomainQuery domain_query = 1;
|
||||
DomainGeneratedQuery generated_query = 2;
|
||||
DomainPrimaryQuery primary_query = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message DomainQuery {
|
||||
string domain = 1 [
|
||||
(validate.rules).string = {max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
max_length: 200;
|
||||
example: "\"zitadel.com\"";
|
||||
}
|
||||
];
|
||||
zitadel.object.v2.TextQueryMethod method = 2 [
|
||||
(validate.rules).enum.defined_only = true,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
description: "Defines which text equality method is used";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message DomainGeneratedQuery {
|
||||
bool generated = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
description: "Generated domains";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message DomainPrimaryQuery {
|
||||
bool primary = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
description: "Primary domains";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
enum DomainFieldName {
|
||||
DOMAIN_FIELD_NAME_UNSPECIFIED = 0;
|
||||
DOMAIN_FIELD_NAME_DOMAIN = 1;
|
||||
DOMAIN_FIELD_NAME_PRIMARY = 2;
|
||||
DOMAIN_FIELD_NAME_GENERATED = 3;
|
||||
DOMAIN_FIELD_NAME_CREATION_DATE = 4;
|
||||
}
|
||||
|
||||
message TrustedDomain {
|
||||
string instance_id = 1;
|
||||
|
||||
google.protobuf.Timestamp creation_date = 2 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
|
||||
string domain = 3 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"zitadel.com\""
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message TrustedDomainSearchQuery {
|
||||
oneof query {
|
||||
option (validate.required) = true;
|
||||
|
||||
DomainQuery domain_query = 1;
|
||||
}
|
||||
}
|
||||
|
||||
enum TrustedDomainFieldName {
|
||||
TRUSTED_DOMAIN_FIELD_NAME_UNSPECIFIED = 0;
|
||||
TRUSTED_DOMAIN_FIELD_NAME_DOMAIN = 1;
|
||||
TRUSTED_DOMAIN_FIELD_NAME_CREATION_DATE = 2;
|
||||
}
|
||||
@@ -0,0 +1,680 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package zitadel.instance.v2beta;
|
||||
|
||||
import "validate/validate.proto";
|
||||
import "zitadel/object/v2/object.proto";
|
||||
import "zitadel/instance/v2beta/instance.proto";
|
||||
import "zitadel/filter/v2beta/filter.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/field_behavior.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "zitadel/protoc_gen_zitadel/v2/options.proto";
|
||||
|
||||
option go_package = "github.com/zitadel/zitadel/pkg/grpc/instance/v2beta;instance";
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
|
||||
info: {
|
||||
title: "Instance Service";
|
||||
version: "2.0-beta";
|
||||
description: "This API is intended to manage instances in ZITADEL.";
|
||||
contact:{
|
||||
name: "ZITADEL"
|
||||
url: "https://zitadel.com"
|
||||
email: "hi@zitadel.com"
|
||||
}
|
||||
license: {
|
||||
name: "AGPL-3.0-only",
|
||||
url: "https://github.com/zitadel/zitadel/blob/main/LICENSING.md";
|
||||
};
|
||||
};
|
||||
schemes: HTTPS;
|
||||
schemes: HTTP;
|
||||
|
||||
consumes: "application/json";
|
||||
consumes: "application/grpc";
|
||||
|
||||
produces: "application/json";
|
||||
produces: "application/grpc";
|
||||
|
||||
consumes: "application/grpc-web+proto";
|
||||
produces: "application/grpc-web+proto";
|
||||
|
||||
host: "$CUSTOM_DOMAIN";
|
||||
base_path: "/";
|
||||
|
||||
external_docs: {
|
||||
description: "Detailed information about ZITADEL",
|
||||
url: "https://zitadel.com/docs"
|
||||
}
|
||||
security_definitions: {
|
||||
security: {
|
||||
key: "OAuth2";
|
||||
value: {
|
||||
type: TYPE_OAUTH2;
|
||||
flow: FLOW_ACCESS_CODE;
|
||||
authorization_url: "$CUSTOM_DOMAIN/oauth/v2/authorize";
|
||||
token_url: "$CUSTOM_DOMAIN/oauth/v2/token";
|
||||
scopes: {
|
||||
scope: {
|
||||
key: "openid";
|
||||
value: "openid";
|
||||
}
|
||||
scope: {
|
||||
key: "urn:zitadel:iam:org:project:id:zitadel:aud";
|
||||
value: "urn:zitadel:iam:org:project:id:zitadel:aud";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
security: {
|
||||
security_requirement: {
|
||||
key: "OAuth2";
|
||||
value: {
|
||||
scope: "openid";
|
||||
scope: "urn:zitadel:iam:org:project:id:zitadel:aud";
|
||||
}
|
||||
}
|
||||
}
|
||||
responses: {
|
||||
key: "403";
|
||||
value: {
|
||||
description: "Returned when the user does not have permission to access the resource.";
|
||||
schema: {
|
||||
json_schema: {
|
||||
ref: "#/definitions/rpcStatus";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
responses: {
|
||||
key: "404";
|
||||
value: {
|
||||
description: "Returned when the resource does not exist.";
|
||||
schema: {
|
||||
json_schema: {
|
||||
ref: "#/definitions/rpcStatus";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Service to manage instances and their domains.
|
||||
// The service provides methods to create, update, delete and list instances and their domains.
|
||||
//
|
||||
// Deprecated: use instance service v2 instead. This service will be removed in the next major version of ZITADEL.
|
||||
service InstanceService {
|
||||
|
||||
// Delete Instance
|
||||
//
|
||||
// Deprecated: please move to the corresponding endpoint under instance service v2. This endpoint will be removed with the next major version of ZITADEL.
|
||||
//
|
||||
// Deletes an instance with the given ID.
|
||||
//
|
||||
// Required permissions:
|
||||
// - `system.instance.delete`
|
||||
rpc DeleteInstance(DeleteInstanceRequest) returns (DeleteInstanceResponse) {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
deprecated: true;
|
||||
responses: {
|
||||
key: "200";
|
||||
value: {
|
||||
description: "The deleted instance.";
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
option (google.api.http) = {
|
||||
delete: "/v2beta/instances/{instance_id}"
|
||||
};
|
||||
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "system.instance.delete"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Get Instance
|
||||
//
|
||||
// Deprecated: please move to the corresponding endpoint under instance service v2. This endpoint will be removed with the next major version of ZITADEL.
|
||||
//
|
||||
// Returns the instance in the current context.
|
||||
//
|
||||
// The instance_id in the input message will be used in the future.
|
||||
//
|
||||
// Required permissions:
|
||||
// - `iam.read`
|
||||
rpc GetInstance(GetInstanceRequest) returns (GetInstanceResponse) {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
deprecated: true;
|
||||
responses: {
|
||||
key: "200";
|
||||
value: {
|
||||
description: "The instance of the context.";
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
option (google.api.http) = {
|
||||
get: "/v2beta/instances/{instance_id}"
|
||||
};
|
||||
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "iam.read"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Update Instance
|
||||
//
|
||||
// Deprecated: please move to the corresponding endpoint under instance service v2. This endpoint will be removed with the next major version of ZITADEL.
|
||||
//
|
||||
// Updates instance in context with the provided name.
|
||||
//
|
||||
// The instance_id in the input message will be used in the future.
|
||||
//
|
||||
// Required permissions:
|
||||
// - `iam.write`
|
||||
rpc UpdateInstance(UpdateInstanceRequest) returns (UpdateInstanceResponse) {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
deprecated: true;
|
||||
responses: {
|
||||
key: "200";
|
||||
value: {
|
||||
description: "The instance was successfully updated.";
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
option (google.api.http) = {
|
||||
put: "/v2beta/instances/{instance_id}"
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "iam.write"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// List Instances
|
||||
//
|
||||
// Deprecated: please move to the corresponding endpoint under instance service v2. This endpoint will be removed with the next major version of ZITADEL.
|
||||
//
|
||||
// Lists instances matching the given query.
|
||||
// The query can be used to filter either by instance ID or domain.
|
||||
// The request is paginated and returns 100 results by default.
|
||||
//
|
||||
// Required permissions:
|
||||
// - `system.instance.read`
|
||||
rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
deprecated: true;
|
||||
responses: {
|
||||
key: "200";
|
||||
value: {
|
||||
description: "The list of instances.";
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
option (google.api.http) = {
|
||||
post: "/v2beta/instances/search"
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "system.instance.read"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Add Custom Domain
|
||||
//
|
||||
// Deprecated: please move to the corresponding endpoint under instance service v2. This endpoint will be removed with the next major version of ZITADEL.
|
||||
//
|
||||
// Adds a Custom Domain to the instance in context.
|
||||
//
|
||||
// The instance_id in the input message will be used in the future
|
||||
//
|
||||
// Required permissions:
|
||||
// - `system.domain.write`
|
||||
rpc AddCustomDomain(AddCustomDomainRequest) returns (AddCustomDomainResponse) {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
deprecated: true;
|
||||
responses: {
|
||||
key: "200";
|
||||
value: {
|
||||
description: "The added Custom Domain.";
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
option (google.api.http) = {
|
||||
post: "/v2beta/instances/{instance_id}/custom-domains"
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "system.domain.write"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Remove Custom Domain
|
||||
//
|
||||
// Deprecated: please move to the corresponding endpoint under instance service v2. This endpoint will be removed with the next major version of ZITADEL.
|
||||
//
|
||||
// Removes a Custom Domain from the instance.
|
||||
//
|
||||
// The instance_id in the input message will be used in the future.
|
||||
//
|
||||
// Required permissions:
|
||||
// - `system.domain.write`
|
||||
rpc RemoveCustomDomain(RemoveCustomDomainRequest) returns (RemoveCustomDomainResponse) {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
deprecated: true;
|
||||
responses: {
|
||||
key: "200";
|
||||
value: {
|
||||
description: "The removed Custom Domain.";
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
option (google.api.http) = {
|
||||
delete: "/v2beta/instances/{instance_id}/custom-domains/{domain}"
|
||||
};
|
||||
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "system.domain.write"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// List Custom Domains
|
||||
//
|
||||
// Deprecated: please move to the corresponding endpoint under instance service v2. This endpoint will be removed with the next major version of ZITADEL.
|
||||
//
|
||||
// Lists Custom Domains of the instance.
|
||||
//
|
||||
// The instance_id in the input message will be used in the future.
|
||||
//
|
||||
// Required permissions:
|
||||
// - `iam.read`
|
||||
rpc ListCustomDomains(ListCustomDomainsRequest) returns (ListCustomDomainsResponse) {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
deprecated: true;
|
||||
responses: {
|
||||
key: "200";
|
||||
value: {
|
||||
description: "The list of Custom Domains.";
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
option (google.api.http) = {
|
||||
post: "/v2beta/instances/{instance_id}/custom-domains/search"
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "iam.read"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Add Trusted Domain
|
||||
//
|
||||
// Deprecated: please move to the corresponding endpoint under instance service v2. This endpoint will be removed with the next major version of ZITADEL.
|
||||
//
|
||||
// Adds a trusted domain to the instance.
|
||||
//
|
||||
// The instance_id in the input message will be used in the future.
|
||||
//
|
||||
// Required permissions:
|
||||
// - `iam.write`
|
||||
rpc AddTrustedDomain(AddTrustedDomainRequest) returns (AddTrustedDomainResponse) {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
deprecated: true;
|
||||
responses: {
|
||||
key: "200";
|
||||
value: {
|
||||
description: "The added trusted domain.";
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
option (google.api.http) = {
|
||||
post: "/v2beta/instances/{instance_id}/trusted-domains"
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "iam.write"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Remove Trusted Domain
|
||||
//
|
||||
// Deprecated: please move to the corresponding endpoint under instance service v2. This endpoint will be removed with the next major version of ZITADEL.
|
||||
//
|
||||
// Removes a trusted domain from the instance.
|
||||
//
|
||||
// The instance_id in the input message will be used in the future.
|
||||
//
|
||||
// Required permissions:
|
||||
// - `iam.write`
|
||||
rpc RemoveTrustedDomain(RemoveTrustedDomainRequest) returns (RemoveTrustedDomainResponse) {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
deprecated: true;
|
||||
responses: {
|
||||
key: "200";
|
||||
value: {
|
||||
description: "The removed trusted domain.";
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
option (google.api.http) = {
|
||||
delete: "/v2beta/instances/{instance_id}/trusted-domains/{domain}"
|
||||
};
|
||||
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "iam.write"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// List Trusted Domains
|
||||
//
|
||||
// Deprecated: please move to the corresponding endpoint under instance service v2. This endpoint will be removed with the next major version of ZITADEL.
|
||||
//
|
||||
// Lists trusted domains of the instance.
|
||||
//
|
||||
// The instance_id in the input message will be used in the future.
|
||||
//
|
||||
// Required permissions:
|
||||
// - `iam.read`
|
||||
rpc ListTrustedDomains(ListTrustedDomainsRequest) returns (ListTrustedDomainsResponse) {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
deprecated: true;
|
||||
responses: {
|
||||
key: "200";
|
||||
value: {
|
||||
description: "The list of trusted domains.";
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
option (google.api.http) = {
|
||||
post: "/v2beta/instances/{instance_id}/trusted-domains/search"
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.protoc_gen_zitadel.v2.options) = {
|
||||
auth_option: {
|
||||
permission: "iam.read"
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
message DeleteInstanceRequest {
|
||||
string instance_id = 1 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
example: "\"222430354126975533\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message DeleteInstanceResponse {
|
||||
google.protobuf.Timestamp deletion_date = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message GetInstanceRequest {
|
||||
string instance_id = 1 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
example: "\"222430354126975533\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message GetInstanceResponse {
|
||||
zitadel.instance.v2beta.Instance instance = 1;
|
||||
}
|
||||
|
||||
message UpdateInstanceRequest {
|
||||
// used only to identify the instance to change.
|
||||
string instance_id = 1 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
example: "\"222430354126975533\"";
|
||||
}
|
||||
];
|
||||
string instance_name = 2 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
description: "\"name of the instance to update\"";
|
||||
example: "\"my instance\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message UpdateInstanceResponse {
|
||||
google.protobuf.Timestamp change_date = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message ListInstancesRequest {
|
||||
// Criteria the client is looking for.
|
||||
repeated Query queries = 1;
|
||||
|
||||
// Pagination and sorting.
|
||||
zitadel.filter.v2beta.PaginationRequest pagination = 2;
|
||||
|
||||
// The field the result is sorted by.
|
||||
optional FieldName sorting_column = 3;
|
||||
}
|
||||
|
||||
message ListInstancesResponse {
|
||||
// The list of instances.
|
||||
repeated Instance instances = 1;
|
||||
|
||||
// Contains the total number of instances matching the query and the applied limit.
|
||||
zitadel.filter.v2beta.PaginationResponse pagination = 2;
|
||||
}
|
||||
|
||||
message AddCustomDomainRequest {
|
||||
string instance_id = 1 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
example: "\"222430354126975533\"";
|
||||
}
|
||||
];
|
||||
string domain = 2 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 253},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 253;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message AddCustomDomainResponse {
|
||||
google.protobuf.Timestamp creation_date = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message RemoveCustomDomainRequest {
|
||||
string instance_id = 1 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
example: "\"222430354126975533\"";
|
||||
}
|
||||
];
|
||||
string domain = 2 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 253},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 253;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message RemoveCustomDomainResponse {
|
||||
google.protobuf.Timestamp deletion_date = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message ListCustomDomainsRequest {
|
||||
string instance_id = 1 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
example: "\"222430354126975533\"";
|
||||
}
|
||||
];
|
||||
|
||||
// Pagination and sorting.
|
||||
zitadel.filter.v2beta.PaginationRequest pagination = 2;
|
||||
|
||||
// The field the result is sorted by.
|
||||
DomainFieldName sorting_column = 3;
|
||||
|
||||
// Criteria the client is looking for.
|
||||
repeated DomainSearchQuery queries = 4;
|
||||
}
|
||||
|
||||
message ListCustomDomainsResponse {
|
||||
repeated Domain domains = 1;
|
||||
|
||||
// Contains the total number of domains matching the query and the applied limit.
|
||||
zitadel.filter.v2beta.PaginationResponse pagination = 2;
|
||||
}
|
||||
|
||||
message AddTrustedDomainRequest {
|
||||
string instance_id = 1 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
example: "\"222430354126975533\"";
|
||||
}
|
||||
];
|
||||
string domain = 2 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 253},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"login.example.com\"";
|
||||
min_length: 1;
|
||||
max_length: 253;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message AddTrustedDomainResponse {
|
||||
google.protobuf.Timestamp creation_date = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message RemoveTrustedDomainRequest {
|
||||
string instance_id = 1 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
example: "\"222430354126975533\"";
|
||||
}
|
||||
];
|
||||
string domain = 2 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 253},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"login.example.com\"";
|
||||
min_length: 1;
|
||||
max_length: 253;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message RemoveTrustedDomainResponse {
|
||||
google.protobuf.Timestamp deletion_date = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2025-01-23T10:34:18.051Z\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message ListTrustedDomainsRequest {
|
||||
string instance_id = 1 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
example: "\"222430354126975533\"";
|
||||
}
|
||||
];
|
||||
|
||||
// Pagination and sorting.
|
||||
zitadel.filter.v2beta.PaginationRequest pagination = 2;
|
||||
|
||||
// The field the result is sorted by.
|
||||
TrustedDomainFieldName sorting_column = 3;
|
||||
|
||||
// Criteria the client is looking for.
|
||||
repeated TrustedDomainSearchQuery queries = 4;
|
||||
}
|
||||
|
||||
message ListTrustedDomainsResponse {
|
||||
repeated TrustedDomain trusted_domain = 1;
|
||||
|
||||
// Contains the total number of domains matching the query and the applied limit.
|
||||
zitadel.filter.v2beta.PaginationResponse pagination = 2;
|
||||
}
|
||||
Reference in new issue
Block a user