Skip to content

fix: address rc1 pre-release review findings #290

Closed

Description

@uniqueg

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 (and owners-change-group-permissions) by name inherit the new rules owners-manage-invitations and owners-revoke-invitations on upgrade. Owners can then grant owner or maintainer by invitation, which the deployment meant to prevent. Neither the recipe in docs/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_subjects leaves created_by, created_as.user and accepted.user_id of the invitations collection 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 _createdBy takes 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.email is copied from the claims without checking email_verified.
  • Unbounded invitations.expiry_days. Very large values make every POST /services/{id}/invitations fail with 500 (OverflowError).
  • Docs gaps. docs/reference.md lacks the modules invitations, service_limits, rename, service_types and locks; the "Audit logs" section of docs/operations.md doesn't mention invitation and limit log lines.

Proposed fix

One PR:

  • Recipe and upgrade note: also remove owners-manage-invitations and owners-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: null if admins can be identified reliably at startup).
  • Document revoking the open invitations of a member who leaves an owner group.
  • Store email in accepted only if email_verified is true; document that user_id is 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.

Activity

  1. added this to the v1.0.0-rc1 milestone on Oct 29, 2026
  2. added
    priority: high
    status: in progress
    type: bug
    type: security
    workload: hours
    on Oct 29, 2026
  3. removed
    status: in progress
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: hightype: bugtype: securityworkload: hours

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions