Repository navigation
[M2.3d4c] Role-binding mutation HTTP endpoints and privilege-change acceptance - #115
Merged
Merged
Conversation
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.
What changed
M2.3d4c: HTTP endpoints for project and environment role bindings, on top of the existing audited
BindingCommands(M2.3c4c1).RequireTenant('member.manage', <exact scope>), no bearer opt-in, Origin and CSRF required, and the password-attempt rate limit applies.POST /organizations/{o}/projects/{p}/bindings(200): email, role, password and optional TOTP or recovery code.POST /organizations/{o}/projects/{p}/bindings/{membershipId}/remove(200).POST /organizations/{o}/projects/{p}/environments/{e}/bindings(200).POST .../environments/{e}/bindings/{membershipId}/remove(200).{ binding, session? }. Only canonical path ids reach the command.member.manage.openapi.jsonand the api-client types are regenerated. The SPEC is updated and M2.3d4c is ticked.Fixes included:
membership-http.integration.spec.ts(from [M2.3d4b] Membership mutation HTTP endpoints with fresh proof and encrypted retries #114). The restricted Prisma client cannot see tenant rows outside a tenant transaction (row-level security), so counting memberships through it always returned 0, andfindFirstOrThrowwould have failed. Both specs now read tenant rows through the administrative login, like the other tenant tests.rejects malformed, forged and non-Ed25519 requestsedited the base64 text of the PEM. When the signature's last byte was 0, the lenient decoder ignored the edit, so the forged CSR still verified (about 1 run in 256; it failed once in this gate). The test now flips one bit of the last DER byte. It passed 8 consecutive runs.How it was tested
/roleon bindings, non-UUID or upper-case ids,/deleteand extra segments are rejected.binding-http.integration.spec.ts:member.manageis rejected; DTO validation;Security considerations