Repository navigation
Closed
Labels
priority: highHigh prioritytype: bugSomething isn't workingtype: securityRelated to securityworkload: hoursLikely takes hours to resolve
Milestone
Description
Problem
The pre-release review for v1.0.0rc1 (changes since v0.6.0) found one medium and several low issues that should be fixed before tagging:
- Invitations re-open owner role-granting (medium). Deployments that followed the documented recipe and restricted
owners-change-permissions(andowners-change-group-permissions) by name inherit the new rulesowners-manage-invitationsandowners-revoke-invitationson upgrade. Owners can then grantownerormaintainerby invitation, which the deployment meant to prevent. Neither the recipe indocs/access-control.md, the "From 0.6.0" upgrade notes, nor the startup warning (warn_owner_rules()) mention it. - Namespace migration skips invitations.
python -m cloud_registry.namespace_subjectsleavescreated_by,created_as.userandaccepted.user_idof theinvitationscollection bare, so open invitations of user owners are deleted on the first accept attempt (404), and the self-acceptance check for group-created invitations stops working. - Backfill counts admin-registered services against the admin. The backfill of
_createdBytakes the only user owner, which for services registered by admins before 0.7 is the admin, although admin-mode registrations count for nobody. - Invitations of members who leave an owner group stay open. Not documented.
- Unverified email in accepted invitations.
accepted.emailis copied from the claims without checkingemail_verified. - Unbounded
invitations.expiry_days. Very large values make everyPOST /services/{id}/invitationsfail with 500 (OverflowError). - Docs gaps.
docs/reference.mdlacks the modulesinvitations,service_limits,rename,service_typesandlocks; the "Audit logs" section ofdocs/operations.mddoesn't mention invitation and limit log lines.
Proposed fix
One PR:
- Recipe and upgrade note: also remove
owners-manage-invitationsandowners-revoke-invitations; extend the startup warning to fire when owners may create invitations but may not grant roles to users. - Add an idempotent
_namespace_invitations()to the migration, with counts, docs and tests. - Document the backfill behaviour for admins with a reset query (or set
_createdBy: nullif admins can be identified reliably at startup). - Document revoking the open invitations of a member who leaves an owner group.
- Store
emailinacceptedonly ifemail_verifiedis true; document thatuser_idis the only reliable identifier. - Bound
expiry_days(at most 3650) and document it. - Add the missing reference entries and the audit log sentence.
Acceptance criteria
- Tests cover the new warning, the migration of invitations, the email check and the bound.
- Docs build with
mkdocs build --strict.
The CI tests not running on the locked dependencies are tracked separately.
Metadata
Metadata
Assignees
Labels
priority: highHigh prioritytype: bugSomething isn't workingtype: securityRelated to securityworkload: hoursLikely takes hours to resolve
Activity
docs: quiesce invitations during the migration