Commit graph

7 commits

Author SHA1 Message Date
0745216107
harden plasmavmc image ingestion and internal execution paths 2026-04-02 07:57:25 +09:00
b75766af0b
Implement IAM tenant registry and privileged admin surfaces 2026-03-31 01:23:16 +09:00
6fa172eab1
Implement host lifecycle orchestration and distributed storage restructuring 2026-03-27 12:14:12 +09:00
ed0f9f42f4
WIP snapshot: preserve dirty worktree 2026-03-20 16:25:11 +09:00
5c1cd9f9fc test(lightningstor): Add comprehensive S3 auth security tests
Added 9 security tests to verify SigV4 authentication hardening:
- Invalid/malformed auth header rejection
- Signature changes with different secret keys
- Signature changes with different request components (body, URI, headers, query params)
- Credential lookup for unknown keys
- Empty credentials fallback
- Malformed S3_CREDENTIALS handling

Result: 19/19 auth tests passing (10 original + 9 new security tests)

Task: T058.S3 Complete
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-12 06:48:15 +09:00
07b3320436 feat(lightningstor): Add multi-credential S3 auth support
Implement Option B (enhanced env var) for T058.S2:
- Support multiple S3 credentials via S3_CREDENTIALS env var
- Format: "key1:secret1,key2:secret2,..."
- Backward compatible with S3_ACCESS_KEY_ID/S3_SECRET_KEY
- Add tests for both multi and single credential formats

This unblocks T039 production deployment while proper IAM
credential service (T060) is implemented separately.

Tests: 10/10 auth tests pass (added 2 new credential tests)

Refs: T058.S2 Option B (approved), T060 (proper IAM integration)
2025-12-12 06:41:09 +09:00
d2149b6249 fix(lightningstor): Fix SigV4 canonicalization for AWS S3 auth
- Replace form_urlencoded with RFC 3986 compliant URI encoding
- Implement aws_uri_encode() matching AWS SigV4 spec exactly
- Unreserved chars (A-Z,a-z,0-9,-,_,.,~) not encoded
- All other chars percent-encoded with uppercase hex
- Preserve slashes in paths, encode in query params
- Normalize empty paths to '/' per AWS spec
- Fix test expectations (body hash, HMAC values)
- Add comprehensive SigV4 signature determinism test

This fixes the canonicalization mismatch that caused signature
validation failures in T047. Auth can now be enabled for production.

Refs: T058.S1
2025-12-12 06:23:46 +09:00