Type 2: include data about PAT expiry
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
- 領域
- api, authentication
調査の方向性
Start at the sign_in method in server/endpoint/auth_endpoint.py and compare its authentication response handling with the linked Tableau REST API documentation. Trace the returned token-expiry value and determine how the optional threshold, warning, default, and callback should behave; done means near-expiry tokens produce the requested warning or callback with the API’s days:hours:seconds string.
索引モデルが issue の本文から書いたものです。
説明
Summary
When authenticating with a personal access token (PAT) a duration until the expiry of the token is returned by the login request.
This information is dropped by the python client, yet would be useful to have it logged as a warning when the expiration date is near.
Description
As users of the python client, we have automated some data-engineering tasks, and authenticate with PATs.
Since the PATs may be configured to expire after a given period of time, it is necessary to keep track of when tokens need to be renewed.
The time until expiry is available in the following REST Request:
https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_auth.htm#make-a-sign-in-request-with-a-personal-access-token
Since this request is already made as a part of the authentication process in the python client, I would like to extend the client to pass two optional parameters to the sign_in method:
- token_expiry_warning_threshold: Optional[int] = 60
- token_expiry_warning_callback: Optional[Callable[[str], None]]
The provided threshold should be an integer which represents days. If the token is set to expire in less days than in the threshold, a warning should be logged. I think 60 days is a sane default given the default expiration period is after 1 year.
A callable may also be provided which will be called with the string containing the time until expiry as received from the API. Its format is "days:hours:seconds".
- 主要言語
- Python
- スター
- 716
- フォーク
- 446
- 平均マージ
- 8日 8時間
- マージ済み PR(30日)
- 2
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
tableau/server-client-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
tableau/server-client-python#1865 ·
-
in-progress
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
tableau/server-client-python#1829 · コメント 1 件 ·
-
enhancement gap needs investigation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
tableau/server-client-python#1322 · コメント 1 件 ·
-
[Type2] Allow Incremental Refresh type schedules to be added via `server.schedules.add_to_schedule` オープンhelp wanted Server-Side Enhancement ui-exists
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
tableau/server-client-python#1101 · コメント 3 件 ·
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
tableau/server-client-python#783 · コメント 5 件 ·