feat/created-by: identity tracking, S3 key prefix, graceful S3 fallback - #2
Merged
Conversation
Records the caller's identity on each stored entry, sourced from a JWT identity claim (default sub, configurable via auth.jwt.identity_claim) or the name of a matched named_tokens config entry. Unnamed static tokens and disabled-auth requests remain anonymous. Also extends release CI to publish docker images for pre-release semver tags (e.g. v1.4.0-alpha.1) without moving the latest tag, and runs ci.yml on all branches so feature branches get vet/test/build.
Partial S3 configuration (e.g. WORDSTORE_S3_REGION leaking from a shared ConfigMap with no bucket or credentials) used to fail validate() or os.Exit() in s3client.NewClient, taking the whole MCP server down even though only the file tools depend on S3. Now: - validate() no longer requires bucket/region/proxy fields when the S3 block is non-nil; only defaults are applied. - main.go skips file-tool init with a WARN log if bucket/region are missing or NewClient fails, then keeps the server running with the text-based tools. - Proxy config is gated independently — missing hmac_secret/base_url disables only the proxy, presigned URLs still work. - s3.enabled: false / WORDSTORE_S3_ENABLED=false remains as the explicit kill switch for environments that may leak partial S3 env.
Introduces optional s3.key_prefix (WORDSTORE_S3_KEY_PREFIX) to scope all new file uploads under a folder within the bucket (e.g. "tenants/acme/<uuid>/file"). Omitting the prefix preserves the existing bucket-root layout. Existing entries keep their stored S3 key. Also updates README features list and S3 section to document new parameters and graceful fallback behaviour introduced in this branch.
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.
Summary
created_byper entry — populated from JWT identity claim (auth.jwt.identity_claim, defaultsub) or matchedauth.named_tokensentry name; null for anonymous/plain-token requestsauth.named_tokens— new config block for named static tokens (service accounts) that populatecreated_byauth.jwt.required_scopes/auth.jwt.identity_claim— new JWT config knobss3.enabled: false/WORDSTORE_S3_ENABLED=false— explicit S3 kill switch for environments with leaky env varss3.key_prefix/WORDSTORE_S3_KEY_PREFIX— optional folder prefix for new S3 object keys; existing entries unaffectedci.ymlruns on all branches;release.ymlflavor: latest=autoso pre-release tags ship without movinglatestghcr.io/giglabo/watchword:1.4.0-alpha.1,1.4.0-alpha.2already publishedTest plan
v1.4.0-alpha.2image: partial S3 env → server starts, file tools absent, warning in logscreated_bypopulated correctly onstore_entry/get_entryidentity_claim: emailpopulatescreated_byfrom JWT email claims3.key_prefix: new uploads land under prefix, existing entries download fine without prefix🤖 Generated with Claude Code