docs: explain that API keys are project-wide secrets - #92
Merged
Conversation
The API keys page said only "load the key from a config file or environment variable instead of hardcoding it", which doesn't tell people what the actual risk is or what to do when their app ships to devices they don't control. Spell out that an API key is a long-lived, unscoped, project-wide bearer secret, that it's extractable from any binary it ships in, and that the relay token minting doesn't help because the token is minted locally from the key. Then cover where the key does belong: endpoints you operate, including MDM-managed fleets where it arrives as a managed configuration and can be revoked centrally. Per-user authorization is a layer you add with endpoint hooks. Note that per-endpoint access issued through your own application server is in progress and explicitly not implemented yet. Adds an FAQ entry for this, taken from a real user question. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NQRfUmiEunzASEtgGhJ872
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.
Why
The API keys page said only "In production, load the key from a config file or environment variable instead of hardcoding it." That doesn't tell anyone what the actual risk is, and it leaves the most common real question unanswered. From a user:
Two things going on there: a correct instinct about the key, and a misconception that connections need one at all.
What changed
iroh-services/access.mdx— two new sections:What's next now names the per-endpoint access feature (backend authenticates a user, hands their endpoint a scoped credential, key never reaches the device) and says plainly that it is not implemented yet and that layer is currently yours to build.
about/faq.mdx— new entry answering the user's question, leading with the correction that iroh connections never require an API key; only metrics, net diagnostics, and authenticated dedicated relays do.Note
No code examples for the app-server pattern — there's nothing to point at until the feature exists, and inventing one would imply support that isn't there.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NQRfUmiEunzASEtgGhJ872