Skip to content

Reject extra fields in service organizations #311

Closed

Description

@uniqueg

Found in the whole-repo pre-release review for v1.0.0rc1 (finding M1).

Problem

ExternalServiceRegister.properties.organization (cloud_registry/api/additions.openapi.yaml) has no additionalProperties: false, unlike the top level and the type schema. POST /services and PUT /services/{serviceId} both use this schema. So the nested organization object accepts any extra keys (strings of any length, nested objects, arrays), which are stored and served to everyone. Only the 1 MiB body limit caps them, so the per-field length limits documented in docs/api.md do not bound the size of a service.

With an account (e.g., via LS Login) and the per-user service limit, one user can register services with about 1 MB of extra organization data each. Every anonymous GET /services (not paged) then returns tens of MB, which can get a pod with the default 128Mi memory limit OOM-killed under a few concurrent requests, and a few dozen such accounts fill the default MongoDB volume.

Fix

  • Add additionalProperties: false to organization in ExternalServiceRegister.
  • Regression tests: an extra organization field gets 400 on POST and PUT.
  • Warn at startup of stored services with extra organization fields (like warn_invalid_urls()), and mention this in the upgrade notes (docs/upgrading.md) and the API docs.

Out of scope: paging or an upper bound for the services list.

Activity

  1. added this to the v1.0.0-rc1 milestone on Nov 1, 2026
  2. added
    priority: high
    status: in progress
    type: security
    workload: hours
    on Nov 1, 2026
  3. removed
    status: in progress
    on Nov 1, 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: securityworkload: hours

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions