feat: import upstream ZITADEL Login V2 v4.20.4 source workspace

This commit is contained in:
Vib Tools committed 2026-11-22 04:15:54 -08:00
1 parent eadd0e558b
commit 4404849fc4
644 files changed
+153201 -10

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -0,0 +1,164 @@
syntax = "proto3";
package zitadel.action.v2;
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
import "validate/validate.proto";
import "zitadel/protoc_gen_zitadel/v2/options.proto";
import "google/protobuf/timestamp.proto";
option go_package = "github.com/zitadel/zitadel/pkg/grpc/action/v2;action";
message Execution {
// The condition under which the execution is triggered.
Condition condition = 1;
// The timestamp of the execution creation.
google.protobuf.Timestamp creation_date = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"2024-12-18T07:50:47.492Z\"";
}
];
// The timestamp of the last change to the execution.
google.protobuf.Timestamp change_date = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"2025-01-23T10:34:18.051Z\"";
}
];
// Ordered list of targets called during the execution.
// The order of the targets in this list defines the order of execution.
// If one of the targets fails, depending on the target's type and settings,
// the execution might be interrupted and the following targets will not be called.
repeated string targets = 4;
}
message Condition {
// Condition-types under which conditions the execution should happen, only one possible.
oneof condition_type {
option (validate.required) = true;
// Condition-type to execute if a request on the defined API point happens.
RequestExecution request = 1;
// Condition-type to execute on response if a request on the defined API point happens.
ResponseExecution response = 2;
// Condition-type to execute if function is used, replaces actions v1.
FunctionExecution function = 3;
// Condition-type to execute if an event is created in the system.
EventExecution event = 4;
}
}
message RequestExecution {
// Condition for the request execution. Only one is possible.
oneof condition{
option (validate.required) = true;
// Define a GRPC-method as condition.
// When a request to this method happens, the execution is triggered.
string method = 1 [
(validate.rules).string = {min_len: 1, max_len: 1000},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
min_length: 1,
max_length: 1000,
example: "\"/zitadel.session.v2.SessionService/ListSessions\"";
}
];
// Define a GRPC-service as condition.
// When a request to any method of this service happens, the execution is triggered.
string service = 2 [
(validate.rules).string = {min_len: 1, max_len: 1000},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
min_length: 1,
max_length: 1000,
example: "\"zitadel.session.v2.SessionService\"";
}
];
// Define all calls as condition.
// When a call to any available service happens, the execution is triggered.
bool all = 3 [(validate.rules).bool = {const: true}];
}
}
message ResponseExecution {
// Condition for the response execution. Only one is possible.
oneof condition{
option (validate.required) = true;
// Define a GRPC-method as condition.
// Before a response is returned to the client from this method, the execution is triggered.
string method = 1 [
(validate.rules).string = {min_len: 1, max_len: 1000},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
min_length: 1,
max_length: 1000,
example: "\"/zitadel.session.v2.SessionService/ListSessions\"";
}
];
// Define a GRPC-service as condition.
// Before a response is returned to the client from any method of this service, the execution is triggered.
string service = 2 [
(validate.rules).string = {min_len: 1, max_len: 1000},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
min_length: 1,
max_length: 1000,
example: "\"zitadel.session.v2.SessionService\"";
}
];
// Define all calls as condition.
// Before a response is returned to the client from any available service,
// the execution is triggered.
bool all = 3 [(validate.rules).bool = {const: true}];
}
}
// Executed on the specified function
message FunctionExecution {
string name = 1 [(validate.rules).string = {min_len: 1, max_len: 1000}];
}
message EventExecution {
// Condition for the event execution. Only one is possible.
oneof condition{
option (validate.required) = true;
// Define a specific event as condition.
// After this event is created, the execution is triggered.
string event = 1 [
(validate.rules).string = {min_len: 1, max_len: 1000},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
min_length: 1,
max_length: 1000,
example: "\"user.human.added\"";
}
];
// Define an event group as condition.
// After any event under this group is created, the execution is triggered.
string group = 2 [
(validate.rules).string = {min_len: 1, max_len: 1000},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
min_length: 1,
max_length: 1000,
example: "\"user.human\"";
}
];
// Define all events as condition.
// After any event is created, the execution is triggered.
bool all = 3 [(validate.rules).bool = {const: true}];
}
}
@@ -0,0 +1,136 @@
syntax = "proto3";
package zitadel.action.v2;
option go_package = "github.com/zitadel/zitadel/pkg/grpc/action/v2;action";
import "google/api/field_behavior.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
import "validate/validate.proto";
import "google/protobuf/timestamp.proto";
import "zitadel/action/v2/execution.proto";
import "zitadel/filter/v2/filter.proto";
message ExecutionSearchFilter {
oneof filter {
option (validate.required) = true;
// Filter for executions that are executed when certain conditions are met.
InConditionsFilter in_conditions_filter = 1;
// Filter for executions of a certain type.
ExecutionTypeFilter execution_type_filter = 2;
// Filter for executions that include a specific target.
TargetFilter target_filter = 3;
}
}
message InConditionsFilter {
// Defines the conditions to query for.
repeated Condition conditions = 1;
}
message ExecutionTypeFilter {
// Defines the type to query for.
ExecutionType execution_type = 1;
}
message TargetFilter {
// Defines the id of the target that needs to be part of the execution.
string target_id = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"69629023906488334\"";
}
];
}
enum TargetFieldName {
TARGET_FIELD_NAME_UNSPECIFIED = 0;
TARGET_FIELD_NAME_ID = 1;
TARGET_FIELD_NAME_CREATED_DATE = 2;
TARGET_FIELD_NAME_CHANGED_DATE = 3;
TARGET_FIELD_NAME_NAME = 4;
TARGET_FIELD_NAME_TARGET_TYPE = 5;
TARGET_FIELD_NAME_URL = 6;
TARGET_FIELD_NAME_TIMEOUT = 7;
TARGET_FIELD_NAME_INTERRUPT_ON_ERROR = 8;
}
message TargetSearchFilter {
oneof filter {
option (validate.required) = true;
// Filter for targets with a specific name.
TargetNameFilter target_name_filter = 1;
// Filter for targets with specific ids.
InTargetIDsFilter in_target_ids_filter = 2;
}
}
message TargetNameFilter {
// Defines the name of the target to query for.
string target_name = 1 [
(validate.rules).string = {max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
max_length: 200;
example: "\"ip_allow_list\"";
}
];
// Defines which text comparison method used for the name query.
zitadel.filter.v2.TextFilterMethod method = 2 [
(validate.rules).enum.defined_only = true
];
}
message InTargetIDsFilter {
// Defines the ids to query for.
repeated string target_ids = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "[\"69629023906488334\",\"69622366012355662\"]";
}
];
}
enum ExecutionType {
EXECUTION_TYPE_UNSPECIFIED = 0;
EXECUTION_TYPE_REQUEST = 1;
EXECUTION_TYPE_RESPONSE = 2;
EXECUTION_TYPE_EVENT = 3;
EXECUTION_TYPE_FUNCTION = 4;
}
enum ExecutionFieldName {
EXECUTION_FIELD_NAME_UNSPECIFIED = 0;
EXECUTION_FIELD_NAME_ID = 1;
EXECUTION_FIELD_NAME_CREATED_DATE = 2;
EXECUTION_FIELD_NAME_CHANGED_DATE = 3;
}
enum PublicKeyFieldName {
// Unspecified field name.
PUBLIC_KEY_FIELD_NAME_UNSPECIFIED = 0;
// Sort by creation date.
PUBLIC_KEY_FIELD_NAME_CREATION_DATE = 1;
// Sort by change date.
PUBLIC_KEY_FIELD_NAME_CHANGE_DATE = 2;
// Sort by expiration date.
PUBLIC_KEY_FIELD_NAME_EXPIRATION_DATE = 3;
}
message PublicKeySearchFilter {
oneof filter {
// Filter the keys by one or multiple ids.
filter.v2.InIDsFilter key_ids_filter = 1;
// Filter the keys by their active status.
bool active_filter = 2;
// Filter the keys by their expiration status.
filter.v2.TimestampFilter expiration_date_filter = 3;
}
}
@@ -0,0 +1,177 @@
syntax = "proto3";
package zitadel.action.v2;
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
import "validate/validate.proto";
import "zitadel/protoc_gen_zitadel/v2/options.proto";
import "google/protobuf/timestamp.proto";
option go_package = "github.com/zitadel/zitadel/pkg/grpc/action/v2;action";
message Target {
// The unique identifier of the target.
string id = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"69629012906488334\"";
}
];
// The timestamp of the target creation.
google.protobuf.Timestamp creation_date = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"2024-12-18T07:50:47.492Z\"";
}
];
// The timestamp of the last change to the target.
google.protobuf.Timestamp change_date = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"2025-01-23T10:34:18.051Z\"";
}
];
// Display name of the target.
string name = 4 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"ip_allow_list\"";
}
];
// Defines the target type and how the response of the target is treated.
oneof target_type {
RESTWebhook rest_webhook = 5;
RESTCall rest_call = 6;
RESTAsync rest_async = 7;
}
// Timeout defines the duration until Zitadel cancels the execution.
// If the target doesn't respond before this timeout expires, the the connection is closed and the action fails. Depending on the target type and possible setting on `interrupt_on_error` following targets will not be called. In case of a `rest_async` target only this specific target will fail, without any influence on other targets of the same execution.
google.protobuf.Duration timeout = 8 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"10s\"";
}
];
// The URL that will be called in case of an execution.
string endpoint = 9 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"https://example.com/hooks/ip_check\""
}
];
// The current signing key used to sign the request sent to the target.
// The key can be used to verify the integrity and authenticity of the request
// on the receiver side. The key should be treated as a secret and only known to Zitadel and the receiver.
// The signature is included in the request header `X-ZITADEL-Signature`
// and calculated over the raw body of the request using HMAC with SHA256.
string signing_key = 10 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"98KmsU67\""
}
];
// Payload type defines how the payload is formatted and secured.
// The default is `PAYLOAD_TYPE_JSON`, which sends the payload as JSON in the body of the request.
// For integrity and authenticity a signature is included in the header `X-ZITADEL-Signature`.
// You can also choose to send the payload as a JWT (`PAYLOAD_TYPE_JWT`), which sends
// the payload as a signed JWT in the body of the request. This allows the receiver to verify
// the authenticity and integrity of the payload using the signing key (published on the JWKS URL).
// If you need encryption as well, you can choose `PAYLOAD_TYPE_JWE`, which sends the payload
// as an encrypted JWT in the body of the request. You can provide your own public key for encryption.
PayloadType payload_type = 11 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"PAYLOAD_TYPE_JSON\""
}
];
}
message RESTWebhook {
// Define if any error stops the whole execution. By default the process continues as normal.
bool interrupt_on_error = 1;
}
message RESTCall {
// Define if any error stops the whole execution. By default the process continues as normal.
bool interrupt_on_error = 1;
}
message RESTAsync {}
enum PayloadType {
PAYLOAD_TYPE_UNSPECIFIED = 0;
// PAYLOAD_TYPE_JSON will send the payload as JSON in the body of the request.
// For integrity and authenticity a signature is included in the header `X-ZITADEL-Signature`.
// This is the current default, for backwards compatibility reasons.
PAYLOAD_TYPE_JSON = 1;
// PAYLOAD_TYPE_JWT will send the payload as JSON Web Token (JWT) in the body of the request.
// This allows the receiver to verify the authenticity and integrity of the payload
// using the signing key (published on the JWKS URL).
PAYLOAD_TYPE_JWT = 2;
// PAYLOAD_TYPE_JWE will send the payload as Encrypted JWT (JWE) in the body of the request.
// This allows additional security, e.g when passing sensitive information.
// You can provide your own public key for encryption.
PAYLOAD_TYPE_JWE = 3;
}
message PublicKey {
// KeyID is the unique identifier of the public key.
// It's also used as the `kid` field in the JWE header when the payload type is set to `PAYLOAD_TYPE_JWE`.
string key_id = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"69629032906489576\"";
}
];
// Active indicates whether the public key is active and used for payload encryption.
// Only one public key can be active at a time.
bool active = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "true";
}
];
// The public key in PEM format.
bytes public_key = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"-----BEGIN PUBLIC KEY-----...\"";
}
];
// Fingerprint is the fingerprint of the public key. It's prefixed with the hashing algorithm used
// and base64 encoded without padding, e.g. `SHA256:STqK+Sd4qgdu+UjiwI8NBjOD6P7UqQ42EZYIdySEyTw`.
// The fingerprint can be used to easily compare the public key with other sources.
string fingerprint = 4 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"SHA256:STqK+Sd4qgdu+UjiwI8NBjOD6P7UqQ42EZYIdySEyTw\"";
}
];
// ExpirationDate is the timestamp when the public key automatically expires and
// no longer will be used for payload encryption, even when active.
// Be sure to upload and activate a new public key before the expiration date
// to avoid failed executions.
google.protobuf.Timestamp expiration_date = 5 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"2024-12-18T07:50:47.492Z\"";
}
];
// CreationDate is the timestamp when the the public key was uploaded.
google.protobuf.Timestamp creation_date = 6 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"2024-12-18T07:50:47.492Z\"";
}
];
// ChangeDate is the timestamp when the public key was last changed, e.g. activated or deactivated.
google.protobuf.Timestamp change_date = 7 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"2024-12-18T07:50:47.492Z\"";
}
];
}