fix: add OC_USER and OC_EMAIL to dev-env .env.local#1151
Merged
Gkrumbach07 merged 1 commit intoambient-code:mainfrom Apr 2, 2026
Merged
fix: add OC_USER and OC_EMAIL to dev-env .env.local#1151Gkrumbach07 merged 1 commit intoambient-code:mainfrom
Gkrumbach07 merged 1 commit intoambient-code:mainfrom
Conversation
The dev-env target generates .env.local with OC_TOKEN but was missing OC_USER and OC_EMAIL. Without these, the frontend proxy does not set X-Forwarded-User headers, causing the backend to reject write operations (e.g. workspace creation) with 401 "no user subject found in token". The kind overlay already sets these env vars for the in-cluster frontend, so this aligns the local dev setup with the cluster behavior. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
📝 WalkthroughWalkthroughThe Makefile's Changes
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
Author
|
Or I (and claude) may have missed some kind of setup 😉 |
Gkrumbach07
approved these changes
Apr 2, 2026
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
make dev-envnow includesOC_USERandOC_EMAILin the generated.env.localmake dev COMPONENT=frontend)frontend-test-patch.yaml) which already sets these varsRoot cause
The frontend proxy (
buildForwardHeadersinauth.ts) usesOC_USERto set theX-Forwarded-Userheader. Without it, the backend'sforwardedIdentityMiddlewarecannot populateuserIDin the Gin context, andCreateProjectfails with "no user subject found in token".Test plan
make kind-up LOCAL_IMAGES=truemake dev-envand verifycomponents/frontend/.env.localcontainsOC_USERandOC_EMAILmake dev COMPONENT=frontendlocalhost:3000— should succeed (previously returned 401)🤖 Generated with Claude Code