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

Add Secret Store Support

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
backend, security

調査の方向性

stubs/wit_world/imports/secret_store.py の WIT bindings から始め、要求されている SecretStore API と Secret API を、文書化されている Fastly Secret Store の動作と比較します。@on_viceroy と inline の test.toml secret-store データを使って Viceroy のカバレッジを追加します。リソースラッパー、dict のようなアクセス、プレーンテキストのメソッド、そして秘密情報を漏らさない文字列表現がカバーされていれば完了です。

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

説明

Overview

Add support for Fastly's Secret Store, providing secure access to sensitive credentials and secrets at the edge.

WIT Interface

interface secret-store {
  resource secret {
    from-bytes: static func(bytes: list<u8>) -> result<secret, error>;
    plaintext: func(max-len: u64) -> result<list<u8>, error>;
  }

  resource store {
    open: static func(name: string) -> result<store, open-error>;
    get: func(key: string) -> result<option<secret>, error>;
  }
}

WIT bindings: stubs/wit_world/imports/secret_store.py

API Design

  • Implement SecretStore resource wrapper
  • Implement Secret resource with plaintext() and plaintext_str() methods
  • Override __str__ and __repr__ to return "<Secret>" to prevent accidental exposure in logs
  • Provide dict-like interface: __getitem__, __contains__
  • from_bytes() available but discouraged (for API compatibility when secrets come from non-store sources)

Cross-SDK Comparison:

  • Rust: SecretStore::open() with get() (panics), try_get() (fallible), contains(). Secret has plaintext() returning Bytes with lazy decryption/caching. Warns against bringing secrets into memory unnecessarily.

  • Go: Open() returns *Store, Get() returns *Secret. Plaintext() decrypts to []byte. Includes SecretFromBytes() for non-store secrets and convenience Plaintext(storeName, secretName) one-liner.

  • JS: new SecretStore(name), async get() returns SecretStoreEntry | null. Entry has plaintext() (UTF-8 string) and rawBytes() (Uint8Array). Static fromBytes() for creating entry from raw data.

Recommended Python approach:

  • Dict-like access: store[key] raises if not found, store.get(key, default=None) returns None if missing
  • Secret object with lazy plaintext() returning bytes, optional plaintext_str() for UTF-8 text
  • Consider context manager for secrets to encourage memory cleanup
  • Security warnings in docstrings about keeping secrets in memory

Viceroy Testing

Viceroy supports Secret Store with inline or file-based test data via test.toml:

[local_server]
# Inline secrets
secret_stores.my_secrets = [
  {key = "api_key", data = "secret-value-123"},
  {key = "cert", file = "path/to/cert.pem"},
  {key = "from_env", env = "MY_ENV_VAR"}
]

# Or JSON file format
secret_stores.json_secrets = { file = "data/secrets.json", format = "json" }

Secrets can be provided inline, from files, or from environment variables. Tests can use @on_viceroy with inline TOML configuration.

Reference

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

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

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

はじめの一歩

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

fastly/compute-sdk-python のほかの issue

fastly/compute-sdk-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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