Repository navigation
feat: a Room can ask one question at the door, and the answer becomes a group - #27
Merged
Merged
Conversation
… a group spec.question is optional: a prompt and two to eight answers, each a label and a demo: group. Everyone who joins picks one; the browser will not submit without it, and the server accepts only an answer the Room offers. The answer's group is kept on the Participant (spec.groups, new and optional) and sent to Dex beside the audienceGroup at every sign-in, comma-separated, which Dex's authproxy connector splits into the token's groups. The apiserver's demo:-only containment rule covers it unchanged. A Room without a question sends exactly the group it sent before, and a forged answer adds nothing. Groups that escaped the schema are dropped before they reach the header. The demo client now shows the token's groups, and its write form works in a real browser: under Referrer-Policy no-referrer a browser sends Origin "null", which its own check refused. Co-Authored-By: Claude Opus 5.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.
A Room can ask everyone who joins one question with a fixed set of answers. The group of the answer they pick joins
audienceGroupin their token, so RBAC can let part of the room do what the rest cannot.Someone who picks Svelte signs in with
demo:my-talkanddemo:framework-svelte.How
spec.questionis optional and mutable. Answer groups followaudienceGroup's pattern, and the CRD refuses duplicate groups and duplicate labels.spec.groups, keeps the answer. Operators may edit it, and the next sign-in carries the change.X-Remote-Groupbecomes<audienceGroup>,<answer group>. Dex's authproxy connector splits on,, its defaultgroupHeaderSeparator, and no group the pattern admits contains one. The apiserver'sdemo:-only containment rule covers these groups unchanged.Why this is a
feat:X-Remote-Groupas before, so the identity contract doesn't change. A tested forgedanswerfield adds nothing.requirements.mdsaid groups come "never from client input". It now says that every group comes from event configuration and a participant only chooses among the Room's answers.Also in this PR
The demo client shows the token's groups. Its "Write a message to Kubernetes" button now works in a real browser: under
Referrer-Policy: no-referrera browser sendsOrigin: null, which its own check refused. Room Pass fixed the same bug earlier.Rollout
Apply the new CRDs from
config/crdbefore settingspec.questionon a Room. With the old CRDs, Kubernetes silently drops the unknown field. Like any spec change, setting the question starts a new join-code epoch, and anyone who joined before it existed isn't asked.Test plan
task lint,task test,task verify-generate,task integrationtask e2e-up && task browser: 8/8. The new test picks Svelte, reads both groups from the real Dex token, and writes to Kubernetes with it (201).task e2e, which still expects exactly[demo:room-pass-test]for a Room without a questiontask test-network: not run locally; this change doesn't touch the network policy🤖 Generated with Claude Code