Secret Manager `list_secrets` silently returns empty when both `organization_id` and `project_id` are set
メンテナーはふだん 1 日以内に返信
@estellesoulard がすでに取り組んでいます。
2026年9月21日 から。
評価
調査の方向性
Start at SecretV1Beta1API.list_secrets and list_secrets_all, then trace how Client injects default_organization_id into requests. Reproduce the project-scoped listing with request logging and compare behavior when the organization ID is omitted; done means the intended handling of both scope parameters is implemented or clearly documented and covered by a regression test.
索引モデルが issue の本文から書いたものです。
説明
Description
SecretV1Beta1API.list_secrets (and list_secrets_all) returns an empty result set with HTTP 200 — no error — when the request includes both organization_id and project_id, even though matching secrets exist and the same request without organization_id returns them correctly.
The Client auto-fills default_organization_id from the profile/config on every request. Since list_secrets also accepts an explicit project_id (or falls back to default_project_id), nearly every call ends up sending both parameters — silently breaking listing for anyone who authenticates via a project-scoped API key (created for a single Project, not the whole Organization), which is a documented/recommended way to scope credentials.
Reproduction
from scaleway import Client
from scaleway.secret.v1beta1 import SecretV1Beta1API
client = Client.from_config_file_and_env() # picks up default_organization_id + default_project_id
api = SecretV1Beta1API(client)
r = api.list_secrets(scheduled_for_deletion=False, project_id=client.default_project_id)
print(r.total_count) # -> 0
Enabling request logging shows the outgoing request includes both IDs:
GET https://api.scaleway.com/secret-manager/v1beta1/regions/fr-par/secrets?organization_id=<ORG_ID>&project_id=<PROJECT_ID>&scheduled_for_deletion=False
Calling the same endpoint directly with curl, omitting organization_id, returns the expected secrets:
curl -H "X-Auth-Token: $SCW_SECRET_KEY"
"https://api.scaleway.com/secret-manager/v1beta1/regions/fr-par/secrets?project_id=<PROJECT_ID>&scheduled_for_deletion=false"
# -> {"secrets": [...], "total_count": 9}
Re-adding organization_id to that same curl request reproduces the empty result:
curl -H "X-Auth-Token: $SCW_SECRET_KEY"
"https://api.scaleway.com/secret-manager/v1beta1/regions/fr-par/secrets?organization_id=<ORG_ID>&project_id=<PROJECT_ID>&scheduled_for_deletion=false"
# -> {"secrets": [], "total_count": 0}
So this looks like API-side behavior (the two filters may be ANDed against an internal scope in a way that a project-scoped key can't satisfy when organization_id is present), but the SDK makes it very easy to hit unknowingly, since organization_id is injected automatically and silently, with no error/warning that the combination yields zero rows.
Environment
scalewaySDK version: 2.11.0- Python: 3.12
- Auth: project-scoped API key (via
scwconfig file /SCW_ACCESS_KEY+SCW_SECRET_KEY)
Expected behavior
Either:
- The SDK should not auto-send
organization_idwhen an explicit (or default)project_idis already being used for a request, or - The API should return an explicit error (e.g. 403) instead of an empty 200 when the org/project combination can't be satisfied, or
- This should be documented so it's discoverable without reverse-engineering.
Workaround
Explicitly clear client.default_organization_id = None before calling list_secrets/list_secrets_all when authenticating with a project-scoped key.
- 主要言語
- Python
- スター
- 37
- フォーク
- 17
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 72
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
scaleway/scaleway-sdk-python のほかの issue
-
Published wheel declares both BSD and proprietary classifiers, and ships no license file再び着手できるかも @estellesoulard が 32 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
scaleway/scaleway-sdk-python#2131 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Ensure SDK python usability with LSP pylance / pyright再び着手できるかも @elwinar が 51 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンagent enhancement
scaleway/scaleway-sdk-python#1954 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
scaleway/scaleway-sdk-python#1673 ·
メンテナーはふだん 1 日以内に返信
-
Breaking change in v2.10.x: User and Server models require new mandatory fields再び着手できるかも @estellesoulard が 283 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
scaleway/scaleway-sdk-python#1309 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Allow setting MongoDB private network when restoring a snapshot再び着手できるかも @estellesoulard が 283 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
scaleway/scaleway-sdk-python#1139 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
scaleway/scaleway-sdk-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
foxglove/mcap#1907 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
namespace operations
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
EclipseFdn/open-vsx.org#14623 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
developmentseed/titiler-cmr#261 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
andrewyng/openworker#774 ·
メンテナーはふだん 1 日以内に返信
-
aggfuncオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
worldbank/blackmarblepy#160 ·