feat(api): allow specifying access_token type (opaque/JWT) for service users (#5150)

Add functionality to configure the access token type on the service accounts to provide the oidc library with the necessary information to create the right type of access token.
This commit is contained in:
Stefan Benz
2023-02-08 09:06:34 +01:00
committed by GitHub
parent da130c2ed9
commit 3616b6b028
31 changed files with 504 additions and 331 deletions

View File

@@ -3313,6 +3313,7 @@ message AddMachineUserRequest {
string name = 2 [(validate.rules).string = {min_len: 1, max_len: 200}];
string description = 3 [(validate.rules).string = {max_len: 500}];
zitadel.user.v1.AccessTokenType access_token_type = 4 [(validate.rules).enum = {defined_only: true}];
}
message AddMachineUserResponse {
@@ -3633,6 +3634,7 @@ message UpdateMachineRequest {
string user_id = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
string description = 2 [(validate.rules).string.max_len = 500];
string name = 3 [(validate.rules).string = {min_len: 1, max_len: 200}];
zitadel.user.v1.AccessTokenType access_token_type = 4 [(validate.rules).enum = {defined_only: true}];
}
message UpdateMachineResponse {

View File

@@ -83,6 +83,11 @@ message Machine {
example: "\"true\"";
}
];
AccessTokenType access_token_typ = 4 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Type of access token to receive";
}
];
}
message Profile {
@@ -161,6 +166,11 @@ enum Gender {
GENDER_DIVERSE = 3;
}
enum AccessTokenType {
ACCESS_TOKEN_TYPE_BEARER = 0;
ACCESS_TOKEN_TYPE_JWT = 1;
}
message SearchQuery {
oneof query {
option (validate.required) = true;