Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Verify
on: [push, pull_request]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: python -m pip install cryptography
- run: python -m unittest test_gate -v
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ The gate rereads the keyset file when it changes. Spent tokens are held in
memory only, in one set per key, and a key's set is dropped when the key leaves
the keyset. Requests are not logged.

**Restart boundary:** a previously spent token can be redeemed again after a
restart while its signing key is still valid. Separate gate processes also
have independent spent sets. This implementation deliberately avoids durable
request state; it does not provide restart-safe or multi-process single use.
Do not use it for that requirement without designing a shared redemption store.

## Keys

python3 keyrotate.py init # create the first key
Expand Down
Loading