Token files aren't shared between Python and the other SDKs (access_exp vs accessExp)

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go, java, python, typescript

調査の方向性

Start with python/src/bitpin_sdk/token_store.py and compare its JSON serialization with the TypeScript, Go, and Java token stores; inspect Java’s reader for its handling of both key spellings. Update Python’s written keys and ensure every reader accepts both spellings for one release. Add a cross-language test that reads files written by each SDK; done means all four formats can be read without forcing reauthentication.

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

説明

bug python security

FileTokenStore is meant to let bots in different languages on one host share tokens, so they stay under the authenticate limit of 3 requests per minute per IP. The JSON keys differ, though:

  • Python writes access_exp / refresh_exp (dataclasses.asdict(tokens) in python/src/bitpin_sdk/token_store.py).
  • TypeScript, Go and Java write accessExp / refreshExp.

The key id (PBKDF2) is the same everywhere, so every language finds the other's file. Python then fails to read a Go/TS/Java file and authenticates again, and Go and TS can't read a Python file. Java already reads both spellings.

Fix: pick accessExp (three of the four SDKs) and make Python write it. Every reader should accept both for one release, and a cross-language test should read a file written by each SDK.

主要言語
Python
スター
0
フォーク
0
平均マージ
28分
マージ済み PR(30日)
20

環境構築

はじめの一歩

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

bitpin-dev/bitpin-sdk のほかの issue

bitpin-dev/bitpin-sdk の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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