localserver command for serving S3 credentials via HTTP#93
Merged
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>
Owner
Author
|
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>
Owner
Author
|
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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