docs: Bring all documentation up to date for v2.10.1

- architecture/: overview, technology stack, auth (OIDC + built-in
  IndieAuth), syndication (POSSE) rewritten; new database.md,
  deployment.md and indieweb-protocols.md; legacy stack marked historical
- decisions/: reconstructed ADR-060 and ADR-063; 31 status corrections
  (superseded auth ADRs, proposed -> accepted); INDEX rebuilt
- design/: reconstructed the v1.6.0 documents the webmention code cites;
  reports for 18 v2 releases without a design folder; INDEX rebuilt
- projectplan/: BACKLOG rewritten (shipped items removed, open issues from
  the reviews added); RELEASE.md for v2.0.0-v2.10.1; INDEX
- standards/: development setup (uv, tests, DEV_MODE), testing (CI test
  stage), git and release flow, versioning, coding standards, cookies
- README, CLAUDE.md, .env.example (every setting the code reads, with
  defaults) brought up to date
- 137 broken links repaired (old absolute paths, moved files); stale ADR
  references in code comments corrected (comments only)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
PhilandClaude Opus 5.5 committed 2026-11-03 12:40:19 -07:00
1 parent fa551de197
commit 0716984958
143 files changed
+6222 -8660

No files matched your search

+31 -10
View File
@@ -1,8 +1,9 @@
# Cookie Naming Convention
**Status**: ACTIVE
**Status**: Active
**Date**: 2025-11-18
**Version**: 1.0
**Last Updated**: 2026-11-03 (v2.10.1; cookie list checked against the code)
**Version**: 1.1
## Purpose
@@ -44,9 +45,19 @@ All StarPunk cookies use the `starpunk_` prefix for clear ownership.
### Current Cookies
| Cookie Name | Purpose | Security Attributes | Max Age |
|-------------|---------|---------------------|---------|
| `starpunk_session` | Authentication session token | HttpOnly, Secure (prod), SameSite=Lax | 30 days |
| Cookie Name | Set by | Purpose | Security Attributes | Max Age |
|-------------|--------|---------|---------------------|---------|
| `starpunk_session` | `/auth/callback` (`starpunk/routes/auth.py`, constant `SESSION_COOKIE`) | Admin session token (the token's hash is stored in the `sessions` table) | HttpOnly, SameSite=Lax, Secure when `SITE_URL` starts with `https://` | `SESSION_LIFETIME` days (default 30) |
| `starpunk_session` | `/dev/login` (`starpunk/routes/dev_auth.py`, only with `DEV_MODE=true`) | Same cookie, created without authentication | HttpOnly, SameSite=Lax, never Secure | 30 days (fixed) |
`starpunk_session` is read in `starpunk/auth.py` (`require_auth`),
`starpunk/routes/auth.py`, `starpunk/routes/indieauth.py` (consent screen)
and `starpunk/__init__.py` (`before_request`, so every page knows whether
the owner is logged in), and deleted on logout.
Not cookies: the OIDC login state, nonce and PKCE verifier are kept
server-side in the `oidc_login_state` table, and Micropub clients
authenticate with bearer tokens (`indieauth_tokens` table), never cookies.
### Future Cookies
@@ -149,7 +160,11 @@ StarPunk and Flask cookies can coexist without conflict:
- `starpunk_session` - Application authentication
**Flask cookies** (framework-managed):
- `session` - Flask server-side session (for flash messages)
- `session` - Flask's signed session cookie (signed with `SECRET_KEY`, which
defaults to `SESSION_SECRET`). StarPunk stores flash messages and
`session["next"]`, the page to return to after login (set by
`require_auth` and the IndieAuth consent screen). Keep it to small,
non-secret values: it is signed, not encrypted.
Both are necessary and serve different purposes. Do not interfere with Flask's `session` cookie.
@@ -188,7 +203,7 @@ Both are necessary and serve different purposes. Do not interfere with Flask's `
```python
def test_auth_cookie_name(client):
"""Test authentication uses correct cookie name"""
"""Test authentication uses correct cookie name (app built with DEV_MODE=True)"""
response = client.post("/dev/login")
# Verify correct cookie name
@@ -202,9 +217,9 @@ def test_auth_cookie_name(client):
## References
### Internal Documentation
- **Auth Redirect Loop Fix**: `/docs/reports/2025-11-18-auth-redirect-loop-fix.md`
- **Auth Redirect Loop Fix**: `docs/design/v1.0.0/2025-11-18-auth-redirect-loop-fix.md`
- **ADR-011**: Development Authentication Mechanism
- **ADR-005**: IndieLogin Authentication
- **ADR-064**: OIDC admin login and built-in IndieAuth server (replaced ADR-005, IndieLogin, in v2.0.0)
### External Standards
- [RFC 6265 - HTTP State Management Mechanism (Cookies)](https://tools.ietf.org/html/rfc6265)
@@ -213,6 +228,12 @@ def test_auth_cookie_name(client):
## History
### Version 1.1 (2026-11-03)
- Cookie table checked against v2.10.1: `starpunk_session` lifetime follows
`SESSION_LIFETIME`, Secure follows the `SITE_URL` scheme; dev login cookie
listed; Flask `session` contents and server-side OIDC state documented
- References updated (reports folder no longer exists; ADR-064 replaced ADR-005)
### Version 1.0 (2025-11-18)
- Initial version
- Established `starpunk_` prefix convention
@@ -223,5 +244,5 @@ def test_auth_cookie_name(client):
---
**Document Owner**: StarPunk Architecture Team
**Last Updated**: 2025-11-18
**Last Updated**: 2026-11-03
**Status**: Active Standard