Skip to content

fix(people): extend exact ASGI scalar authority to confirmed-hire ingress #323

Description

@seonghobae

Finding

Fresh audit of canonical People owner #55 after #322 shows the confirmed-hire HTTP boundary still has the predecessor scalar semantics even though it consumes the now-hardened shared Authorization-header parser.

At current #55 head 677aaace49e88f20504252cda61cbeb812e0f6c0, HireAcceptanceAsgiApp still:

  • compares scope["type"] and scope["method"] before proving exact built-in str;
  • accepts path through isinstance(path, str) before len/tokenization;
  • accepts query_string through isinstance(raw_query, bytes) before len/decode;
  • accepts authenticator output through isinstance(principal, AuthenticatedPrincipal) rather than the exact principal boundary already used by canonical People GET.

The shared _authorization_header is fixed by #322, but these hire-local ingress checks can still admit behavior-bearing Python subtypes before or across authentication. Existing oversized-input tests prove bounds but do not prove inert exact scalar authority.

Required repair

Use a dedicated test-first hire scalar-integrity contract with trapping str/bytes subtypes, preserving existing ValueError/405/404/400/500 semantics and proving zero mutation calls on rejection. Then apply the minimum hire-local exact-type gates. Do not copy sibling Employment/Position implementations; keep #55 as the canonical writer.

Also audit post-authentication idempotency/content-type header parsing separately rather than assuming the shared Authorization-header repair covers those fields.

Keep open until the exact repaired #55 head has normal protected acceptance and integration. No force-push, destructive rebase, self/model approval, no-op retrigger, predecessor-evidence transfer, or gate weakening.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions