Skip to content

Enforce SYSTEM_ONLY locks with action-type declarations - #738

Draft
yeilho wants to merge 16 commits into
linkedin:mainfrom
yeilho:iye/tier3-lock-evaluation
Draft

yeilho wants to merge 16 commits into
linkedin:mainfrom
yeilho:iye/tier3-lock-evaluation

Conversation

@yeilho

@yeilho yeilho commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Enforce SYSTEM_ONLY locks using X-OpenHouse-Action-Type without granting additional privileges.

Changes

Require a SYSTEM declaration for otherwise-authorized data reads and writes under an active SYSTEM_ONLY lock. An absent declaration returns HTTP 423; other supplied values, including USER, unknown, blank, padded, and old boolean declarations, return HTTP 400 when this access check is reached. Preserve existing ACL and legacy-lock checks, protect lock metadata, and surface HTTP 423 with generic authorized-unlock guidance rather than hiding the denial as a missing table.

Testing Done

  • Local code review completed by GPT-6 Astra and Claude Opus 5.
  • Added and updated tests for the changes made.

436 service, Java, and Spark cases passed across both runtime variants, covering declaration parsing and authorization order, SDK/HTTP metadata and snapshot writes, catalog load/refresh/tableExists, denial propagation without commit retries, and legacy 400/404 behavior.

Additional Information

Stack 2/4; depends on #737. Targets main, so the draft includes unmerged predecessors. Review only this increment.

SYSTEM is case-insensitive. Validation remains at the existing post-authorization active-SYSTEM_ONLY access check, not global request middleware. Automated deletion, SQL unlock, and deployment are separate.

Generated with GitHub Copilot CLI.

yeilho and others added 8 commits September 10, 2026 10:00
Preserve legacy lock operations and generated client signatures while tracking cleanup lock ownership and table generation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Allow authorized table admins to create and directly unlock matching cleanup locks without an additional SYSTEM_ADMIN requirement. Keep task-one lock identity guards and legacy behavior unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep TIER3_AUTO_CLEANUP as optional lock metadata and add opt-in per-client SYSTEM_ACTION header propagation. Defer lock enforcement, guarded unlock, and owner/generation checks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Normalize omitted and null reasons while preserving unknown-request rejection. Add compatibility coverage and authenticated generated-client HTTP integration tests without changing lock enforcement.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Return HTTP 423 only for cleanup lock access denials so catalog load, refresh, and tableExists retain the reason and recovery guidance. Preserve legacy and malformed 400 behavior, generic 404 handling, authorization ordering, and lifecycle controls.

Cover REST reads and writes, error-body preservation, and real catalog and exception-mapping regressions across both Java and Spark runtime variants.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
yeilho and others added 5 commits September 17, 2026 09:56
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use SYSTEM_ONLY with SYSTEM/USER action-type declarations, and apply LEGACY defaults only to active locks. Cover serialization and client/server compatibility without changing enforcement.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve owner and generation guards, metadata-only status, and active-only legacy defaults while adopting SYSTEM_ONLY and action-type declarations.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merge the guarded lifecycle update, evaluate SYSTEM and USER declarations after authorization, and preserve SYSTEM_ONLY denial propagation and generic unlock guidance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@yeilho yeilho changed the title Enforce cleanup lock reads and writes with recovery guidance Enforce SYSTEM_ONLY locks with action-type declarations Sep 18, 2026
yeilho and others added 3 commits September 21, 2026 11:19
Omit the header for ordinary requests and reject unsupported explicit values. Remove the unused USER constant and the requested catalog comments.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Forward-merge the updated client contract and reject explicit USER values only at the existing post-authorization SYSTEM_ONLY access check. Preserve raw declarations for auditing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant