Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

UserServiceMachine request model is missing accessTokenType supported by User Service V2

オープン
#140 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
python
領域
api

調査の方向性

Locate the generated UserServiceMachine request model and the UserServiceCreateUserRequest and UserServiceUpdateUserRequest models, then inspect how the existing UserServiceAccessTokenType fields are represented. Regenerate the Python SDK against the current schema and add serialization coverage showing that accessTokenType is preserved in both create and update machine-user requests.

索引モデルが issue の本文から書いたものです。

説明

Description

The generated UserServiceMachine request model does not expose accessTokenType, although current ZITADEL User Service V2 supports setting it when creating or updating a machine user.

This prevents Python SDK users from requesting JWT access tokens. ZITADEL otherwise defaults new machine users to opaque bearer tokens.

The SDK already contains:

  • UserServiceAccessTokenType
  • ACCESS_TOKEN_TYPE_BEARER
  • ACCESS_TOKEN_TYPE_JWT
  • access_token_type on the UserServiceMachineUser response model

However, the corresponding request model only contains name and description.

Environment

  • zitadel_client==4.1.8
  • Python 3.14.6
  • This appears to be a generated-schema issue and is not Python-version-specific.

Reproduction

from zitadel_client.models import (
    UserServiceAccessTokenType,
    UserServiceMachine,
)

machine = UserServiceMachine(
    name="example-client",
    accessTokenType=UserServiceAccessTokenType.ACCESS_TOKEN_TYPE_JWT,
)

print(machine.model_dump(by_alias=True, exclude_none=True))

Actual output:

{"name": "example-client"}

The unrecognised accessTokenType input is silently discarded.

Consequently, using this model through UserServiceCreateUserRequest cannot send:

{
  "machine": {
    "name": "example-client",
    "accessTokenType": "ACCESS_TOKEN_TYPE_JWT"
  }
}

The same UserServiceMachine model is used by UserServiceUpdateUserRequest, so updating the access-token type is also unavailable.

Expected behaviour

UserServiceMachine should expose a field equivalent to:

access_token_type: UserServiceAccessTokenType | None = Field(
    default=None,
    alias="accessTokenType",
)

Serializing a create or update request should preserve the selected access-token type.

Upstream context

The missing API capability was reported in:

It was added to the core User Service V2 protobuf in:

The current protobuf contains access_token_type on the nested machine messages for both CreateUserRequest and UpdateUserRequest, but the Python SDK request model still reflects the older schema.

Suggested resolution

Please regenerate the Python SDK against a current ZITADEL core schema and add a serialization test confirming that accessTokenType is included in create and update machine-user requests.

主要言語
Python
スター
16
フォーク
3
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

zitadel/client-python のほかの issue

zitadel/client-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。