mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-02 08:58:52 +00:00
feat: user api requests to resource API (#9794)
# Which Problems Are Solved This pull request addresses a significant gap in the user service v2 API, which currently lacks methods for managing machine users. # How the Problems Are Solved This PR adds new API endpoints to the user service v2 to manage machine users including their secret, keys and personal access tokens. Additionally, there's now a CreateUser and UpdateUser endpoints which allow to create either a human or machine user and update them. The existing `CreateHumanUser` endpoint has been deprecated along the corresponding management service endpoints. For details check the additional context section. # Additional Context - Closes https://github.com/zitadel/zitadel/issues/9349 ## More details - API changes: https://github.com/zitadel/zitadel/pull/9680 - Implementation: https://github.com/zitadel/zitadel/pull/9763 - Tests: https://github.com/zitadel/zitadel/pull/9771 ## Follow-ups - Metadata: support managing user metadata using resource API https://github.com/zitadel/zitadel/pull/10005 - Machine token type: support managing the machine token type (migrate to new enum with zero value unspecified?) --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Livio Spring <[email protected]>
This commit is contained in:
co-authored by
Copilot
Livio Spring
parent
e2a61a6002
commit
8fc11a7366
@@ -185,10 +185,10 @@ message ProjectSearchFilter {
|
||||
option (validate.required) = true;
|
||||
|
||||
ProjectNameFilter project_name_filter = 1;
|
||||
InProjectIDsFilter in_project_ids_filter = 2;
|
||||
ProjectResourceOwnerFilter project_resource_owner_filter = 3;
|
||||
ProjectGrantResourceOwnerFilter project_grant_resource_owner_filter = 4;
|
||||
ProjectOrganizationIDFilter project_organization_id_filter = 5;
|
||||
zitadel.filter.v2beta.InIDsFilter in_project_ids_filter = 2;
|
||||
zitadel.filter.v2beta.IDFilter project_resource_owner_filter = 3;
|
||||
zitadel.filter.v2beta.IDFilter project_grant_resource_owner_filter = 4;
|
||||
zitadel.filter.v2beta.IDFilter project_organization_id_filter = 5;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,68 +210,18 @@ message ProjectNameFilter {
|
||||
];
|
||||
}
|
||||
|
||||
message InProjectIDsFilter {
|
||||
// Defines the ids to query for.
|
||||
repeated string project_ids = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
description: "the ids of the projects to include"
|
||||
example: "[\"69629023906488334\",\"69622366012355662\"]";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message ProjectResourceOwnerFilter {
|
||||
// Defines the ID of organization the project belongs to query for.
|
||||
string project_resource_owner = 1 [
|
||||
(validate.rules).string = {max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"69629023906488334\""
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message ProjectGrantResourceOwnerFilter {
|
||||
// Defines the ID of organization the project grant belongs to query for.
|
||||
string project_grant_resource_owner = 1 [
|
||||
(validate.rules).string = {max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"69629023906488334\""
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message ProjectOrganizationIDFilter {
|
||||
// Defines the ID of organization the project and granted project belong to query for.
|
||||
string project_organization_id = 1 [
|
||||
(validate.rules).string = {max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"69629023906488334\""
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message ProjectGrantSearchFilter {
|
||||
oneof filter {
|
||||
option (validate.required) = true;
|
||||
|
||||
ProjectNameFilter project_name_filter = 1;
|
||||
ProjectRoleKeyFilter role_key_filter = 2;
|
||||
InProjectIDsFilter in_project_ids_filter = 3;
|
||||
ProjectResourceOwnerFilter project_resource_owner_filter = 4;
|
||||
ProjectGrantResourceOwnerFilter project_grant_resource_owner_filter = 5;
|
||||
zitadel.filter.v2beta.InIDsFilter in_project_ids_filter = 3;
|
||||
zitadel.filter.v2beta.IDFilter project_resource_owner_filter = 4;
|
||||
zitadel.filter.v2beta.IDFilter project_grant_resource_owner_filter = 5;
|
||||
}
|
||||
}
|
||||
|
||||
message GrantedOrganizationIDFilter {
|
||||
// Defines the ID of organization the project is granted to query for.
|
||||
string granted_organization_id = 1 [
|
||||
(validate.rules).string = {max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"69629023906488334\""
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message ProjectRole {
|
||||
// ID of the project.
|
||||
string project_id = 1 [
|
||||
@@ -344,4 +294,4 @@ message ProjectRoleDisplayNameFilter {
|
||||
zitadel.filter.v2beta.TextFilterMethod method = 2 [
|
||||
(validate.rules).enum.defined_only = true
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user