Skip to content

[P2] Allow explicit empty policies to reset access-key restrictions #78

Closed

Description

@Vonng

The shared accessKeyEditOpts rejects {}, {"Statement":[]} and {"Version":"2012-10-17","Statement":[]} with “empty policies are not allowed”. These documents express an explicit reset of a service-account restriction in SILO. The check affects admin accesskey edit, idp ldap accesskey edit and idp openid accesskey edit; the legacy admin user svcacct edit path already accepts the reset.

Reproduced against ce94c3baf49f; the relevant code is unchanged from the server-pinned client e1d4cc5abfe0. The rejection was inherited in 54268c480; this is a missed alignment with the coordinated server contract.

Use strict parsing while allowing an explicitly empty session policy through this edit path. Preserve omission as no policy change and retain the rejection of empty named policies and malformed policy input.

Acceptance:

  • CLI subprocess tests cover all three document forms and every command using the helper.
  • Requests carry an explicit empty document; an edit without --policy does not supply a reset.
  • Integration with the corrected SILO server verifies the resulting inherited policy state.
  • Keep ordinary named-policy validation intact.

Estimate: 0.25–0.5 day including CLI and integration checks. Private report reference: P0-3 client case.

Server contract and integration dependency: SILO #339. Console counterpart: #89.

Activity

  1. Vonng commented on Nov 11, 2026

    @Vonng
    MemberAuthor

    Fixed on main in d7262c2a5, coordinated with SILO #339.

    The shared access-key edit path accepts {}, {"Statement":[]} and {"Version":"2012-10-17","Statement":[]} as explicit restriction resets. This applies to the built-in, LDAP and OpenID command families. Omitting --policy leaves the policy update absent.

    Parsing remains strict: missing/unreadable files, empty input, null, unknown fields, trailing JSON, unsupported versions and invalid statements are rejected before an API write. Empty named policies remain invalid.

    The trade-off is that policy-write input previously tolerated through ignored fields now produces an actionable error. This prevents a typo from becoming an unintended reset while preserving the distinct contracts for session-policy edits and named policies. Stored-policy read compatibility is unchanged.

    Validation passed for 67 CLI subprocess scenarios across the three edit command families and named-policy writes, plus parser tests. These inspect the actual encrypted admin request payloads. Local integration with the corrected SILO server verified omission, all three reset forms, effective S3 permissions, rejection without state change, and persistence across restart. The focused CLI/parser tests were rerun on main and passed. External LDAP/OpenID deployments were not part of the live integration run.

    Closing as fixed on main. The coordinated release must include the corrected server contract.

  2. added
    bug
    on Nov 11, 2026
  3. added this to the 20261115 milestone on Nov 11, 2026
  4. added a commit that references this issue on Nov 11, 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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions