-
-
Notifications
You must be signed in to change notification settings - Fork 12
localserver command for serving S3 credentials via HTTP #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
New `localserver` command that starts a localhost HTTP server serving temporary S3 credentials: - Serves credentials on GET / as JSON - --refresh-interval option to control credential regeneration (required) - -p/--port to set port (default 8094) - --read-only/--write-only permission options - --prefix option for key restriction - Credentials cached internally, regenerated after refresh interval - Thread-safe with dogpile prevention Also fixes tests to work with newer versions of click that removed the mix_stderr parameter from CliRunner. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Renamed --refresh-interval to -d/--duration using existing DurationParam validation (15 minutes to 12 hours) - Extracted localserver code into s3_credentials/localserver.py module: - CredentialCache class for thread-safe credential caching - make_credential_handler for HTTP request handling - run_server function to start the server - Moved localserver tests to tests/test_localserver.py - Added documentation in docs/localserver.md - Updated docs index to include localserver 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The AWS CLI credential_process requires Version: 1 in the JSON output. Without this field, the credential_process integration won't work. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
I manually tested it following these tips from Claude:
Like this: |
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Refactored the code a bit: http://gistpreview.github.io/?99b41ecbf1c6157024cf9c122ce37e22 |
Consolidates three separate tests (success, 404, 500) into a single parametrized test for cleaner, more maintainable test code. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New
localservercommand that starts a localhost HTTP server serving temporary S3 credentials:Also fixes tests to work with newer versions of click that removed the mix_stderr parameter from CliRunner.
🤖 Generated with Claude Code
Claude Code transcript: https://gistpreview.github.io/?500add71f397874ebadb8e04e8a33b53