Skip to content
This repository was archived by the owner on Aug 27, 2026. It is now read-only.
This repository was archived by the owner on Aug 27, 2026. It is now read-only.

동료가 에이전트와 함께 만들어준 크리틱 #14

Description

@spilist

Ceal Architecture Critique

Executive verdict

Ceal addresses a real operational problem: an AI agent needs to act through a
provider such as Slack without receiving a broad provider credential, guessing
provider object identifiers, duplicating an uncertain write, or treating a
successful process exit as proof of provider state. Ceal's current interface
addresses that problem with policy-filtered operation discovery, opaque target
references, Gateway-side validation and execution, per-capability idempotency
policy, and receipt/readback evidence
(Ceal capability contract,
write contract,
unknown-outcome handling).

The critical finding is that most of the underlying security and reliability
problems have mature models or candidate mechanisms: RBAC and ABAC cover role-
and attribute-based policy
(NIST RBAC,
NIST SP 800-162); OAuth Rich
Authorization Requests carries fine-grained authorization data, and OAuth Token
Exchange defines a protocol for exchanging delegated or impersonated credentials
(RFC 9396,
RFC 8693); OpenAPI describes API
operations (OpenAPI 3.2.0);
and HTTP defines safety, idempotency, and retry constraints
(RFC 9110 §9.2). Ceal
should reuse or align with these mechanisms where their semantics match, and
reserve Ceal-specific design for the agent control loop: translating
natural-language requests into policy-permitted structured actions, treating
tool metadata as untrusted data, controlling the agent's retries, representing
delegated actors, and limiting the agent's completion claims to what the
evidence establishes.

The recommended product boundary is therefore:

Ceal should be an agent-safe projection and orchestration layer that reuses or
aligns with established identity, authorization, API-contract, credential,
and distributed-systems mechanisms where their semantics match.

Scope

This report evaluates the ceal-cli interface. The canonical protocol and
operator implementation are owned outside this repository, so this report
treats concerns about underlying Gateway mechanisms as interface risks rather
than implementation findings
(repository ownership).

Example used below: post an approved incident update to an authorized Slack
channel, then verify the result without exposing a Slack credential to the
agent.

Assessment matrix

Ceal surface Mature foundation Assessment Recommended treatment
Profile, Membership, Session RBAC defines users, roles, permissions, operations, objects, role hierarchies, and constraints; ABAC evaluates subject, object, operation, and environment attributes against policy (NIST RBAC, NIST SP 800-162). A Profile can be a useful agent-facing authorization context, but it risks combining role, tenant, environment, provider account, and connector scope into one opaque concept. The Ceal handshake exposes Profile and Membership as distinct references but does not expose their policy semantics (handshake types). Keep Profile as a projection. Define how it derives from principal, role or relationship assignments, attributes, tenant, and resource scope. Do not make Profile a second policy language.
Capability RBAC permissions associate operations with objects. OAuth Rich Authorization Requests can carry structured authorization details, but each protected API defines their semantics (NIST RBAC, RFC 9396). Ceal discovery describes an operation with an ID, effect, target requirement, input contract, and evidence requirement, while target access carries a separate grant reference and revision (discovery types, target grants). Possessing a capability_id is therefore not sufficient authority. Define Capability as a policy-filtered operation contract, not a bearer capability. Map its action, resource, constraints, and grant to standard authorization concepts; use RAR only if its transport semantics fit the deployment.
Target Reference Relationship-based systems such as Zanzibar model authorization over digital objects. OAuth Resource Indicators instead identify the service or resource server where a token will be used (Zanzibar paper, RFC 8707). Ceal returns bounded opaque target references and directs agents not to substitute guessed or raw provider identifiers; access and capability-specific grants are evaluated separately from the reference (target-selection guidance, target grants). Keep the opaque resource handle and bind it to Profile, operation, and grant context. Do not map an individual target object directly to an OAuth Resource Indicator; use that mechanism only for service/API audience restriction where applicable.
Gateway and provider Adapter Zero-trust architecture authorizes access to resources rather than trusting network location. OAuth Token Exchange is a possible mechanism for delegated, impersonated, or narrower downstream credentials, but it does not define the deployment trust model (NIST SP 800-207, RFC 8693). Keeping provider credentials behind a Gateway-controlled private execution boundary is sound, but it is an application of established least-privilege, proxy, policy-enforcement, and credential-broker patterns. Ceal says the Gateway authorizes Profile membership and connector scope before the private adapter executes (Gateway boundary). Preserve this architecture. Treat Token Exchange as an optional implementation mechanism, not as evidence of the current Gateway design. Differentiate through the agent-safe contract and evidence model.
Discovery and input contract OpenAPI provides a language-neutral description of HTTP API operations; JSON Schema describes and validates JSON structures (OpenAPI 3.2.0, JSON Schema Core). Live, policy-filtered discovery is valuable for agents, but Ceal does not need to define a separate schema language for operation inputs and their validation rules. The TypeScript interface exposes input_contract as Record<string, unknown>; the decoder requires a ceal.* schema version and safe JSON but identifies no standard dialect (discovery types, input-contract decoder). If adopting JSON Schema, fix the dialect and meta-schema URI and define a Ceal vocabulary for custom keywords and format assertion. If using OpenAPI, identify the exact Schema Object dialect rather than referring to OpenAPI generally. Derive the agent projection mechanically and keep agent-specific metadata as explicit extensions.
Client Session renewal OAuth security guidance covers refresh-token resource binding, replay detection, rotation, revocation, and expiration; DPoP provides sender-constrained access and refresh tokens (RFC 9700 §4.14, RFC 9449). Ceal uses custom /refresh and /revoke requests with Ceal-specific JSON schemas. The worker treats the refresh credential as a one-time rotation input, but the public interface does not identify an OAuth endpoint, grant, or token profile (session client, rotation handling). Describe this as a custom Ceal bearer/refresh Session and compare its threat controls with RFC 9700. Call it an OAuth profile only if the implementation adopts and documents matching OAuth endpoint, grant, and token semantics. Consider sender-constrained, audience-restricted, short-lived credentials where deployment permits.
Replay Identity and write contract HTTP distinguishes safe and idempotent methods and warns against automatically retrying a non-idempotent request without a way to know whether it was applied (RFC 9110 §9.2). Ceal's protocol uses idempotency_key and declares whether idempotency is required, optional, or unnecessary. The guide separately mentions a stable idempotency value and a declared replay identity, without defining whether replay identity is the key alone or a wider tuple (write contract, leased call input, agent write guidance). Define replay identity precisely: idempotency key, request reference, normalized mutation, lease/event identity, or a specified tuple. Use idempotency key alone only if the two concepts are proven equivalent.
Request Reference, Receipt, Readback HTTP explicitly recognizes that a request may have been applied even when its response is lost and limits automatic retry accordingly (RFC 9110 §9.2.2). Ceal associates that ambiguity with the original request reference and emits a receipt lookup instruction before repeating a possible write (unknown-outcome handling). The cited worker output documents this machine-readable recovery guidance, but it does not establish a system invariant that rejects an equivalent mutation from another caller or under a new idempotency key. Keep the workflow and expose explicit terminal and nonterminal states. If replay prevention is a required security guarantee, enforce and test it at the host or Gateway rather than relying only on agent instructions.
Proof Level Audit evidence can establish different facts: admission, authorization, execution, and provider-state verification are not equivalent. Ceal itself distinguishes a Gateway host_decision from nonclaims that provider execution or production audit was reached (handshake evidence); write receipts separately classify provider state and readback as unknown or verified (write receipt). “Proof” can imply stronger assurance than a host decision provides. The underlying distinction is valuable, especially for agents that must decide what they may claim. Prefer evidence level or verification state unless a level is backed by a defined verifier and integrity mechanism. Name concrete states such as gateway_authorized, provider_accepted, and provider_readback_verified.
Route Effect HTTP treats safety and idempotency as separate, overlapping properties because they support different automation decisions: safe methods are idempotent, while some unsafe methods are also idempotent (RFC 9110 §9.2). Ceal assigns remote_write both to a provider call and to discovery or receipt lookup that may only rotate a session credential (command definitions). The field conservatively combines provider and session mutation while omitting independent safety, idempotency, and retry properties. Use orthogonal provider, session, and local effects; represent semantic safety and idempotency separately; and derive a conservative summary for simple guards.
Machine-readable recovery Problem Details defines one standard extensible representation for machine-readable HTTP errors and identifiers for problem types and occurrences; it is not the only valid HTTP error representation (RFC 9457). Ceal returns a structured error code, message, and optional next action (error shape). Consider application/problem+json for Gateway HTTP errors or define an explicit mapping. Preserve Ceal error codes, recovery actions, and request/evidence correlation; keep transport-independent CLI recovery as a documented bounded extension.

Highest-priority design issues

1. Make the standards mapping part of the contract

The interface currently exposes Ceal nouns—Profile, Membership, Capability,
Grant, Target Reference, Session, and Proof Level—without a normative mapping
to standard IAM and protocol concepts. The result is ambiguity about which
concepts are projections and which are independent security mechanisms. For
example, discovery returns both a Capability identifier and a separate Grant
reference, while the handshake returns both Profile and Membership references
(protocol types).

Publish a machine-readable and prose definition such as:

Ceal term Precise interpretation
Profile Selected authorization context derived from principal assignments, attributes, tenant, and environment
Membership Assignment or relationship connecting a principal to that context
Capability Policy-filtered operation contract
Grant Entitlement or policy-grant snapshot reference and revision for an operation-resource pair
Target Reference Opaque resource handle, not bearer authority
Session Custom Ceal client authentication state whose threat controls are declared explicitly and compared with applicable OAuth guidance
Receipt Correlated operation-status and audit evidence
Proof Level Evidence or verification state with an identified verifier

Do not treat a Grant reference or revision as an authorization decision. Model
the Grant snapshot separately from host_decision, auth_decision, and
policy_decision, because the protocol exposes these as distinct fields
(grant snapshot and decisions).

2. Split effect classification into independent dimensions

An approval system needs to distinguish “read Slack,” “post to Slack,” “rotate a
Gateway refresh token,” and “write a local cache.” The current Route Effect
cannot express those differences because it intentionally reports the widest
possible effect of a command
(Route Effect definition).

At minimum, define the following underlying dimensions:

Dimension Example values
Provider effect read or mutation
Session effect none, renewal, or revocation
Local effect none or mutation
Semantic safety safe or unsafe
Idempotency semantics idempotent or non-idempotent
Retry prerequisite none, stable key, state readback, or prohibition

Approval and evidence policy can derive from these dimensions and the
Capability contract. The existing remote_write value can remain as a
mechanically derived warning when the provider effect is mutation or the
session effect is renewal or revocation.

3. Treat purpose as an assertion unless it is independently bound

The public call envelope carries purpose as a string
(call request).
The CLI generates a fixed sentence rather than accepting purpose text from its
command line
(CLI-generated purpose);
other protocol callers can populate the field.
The receipt carries purpose_sha256, which lets a verifier compare candidate
purpose text with the recorded digest. That field alone does not establish
authorship, approval, or semantic truth
(write receipt).
OAuth Token Exchange can represent the current actor and a nested history of
prior actors, but prior actors are informational and must not be used for access
control decisions
(RFC 8693 §4.1).

For security decisions, bind the asserted purpose to provenance whose identity,
integrity, and authority the deployment verifies—for example, a verified
approval record, user request, workflow event, lease, or signed task envelope.
Preserve subject, current actor, and prior-actor history as distinct
provenance. Enforce attenuation through current policy and top-level
authorization claims, not by
assuming the history chain grants or limits authority. Display unverified
purpose as an assertion, not as authorization evidence.

4. Define evidence by verifier and fact

The protocol's existing distinction between host_decision, unknown provider
state, and verified provider readback is stronger than a generic success flag
(Gateway evidence types, write receipt).
Make that distinction the model itself:

State Claim it supports
request_validated The request matched the accepted schema.
gateway_authorized The Gateway allowed the action under a named policy/grant revision.
provider_dispatch_attempted The Gateway or Adapter attempted to send the provider request; provider receipt is not established.
provider_response_received A response was observed at the provider boundary; its application-level meaning is classified separately.
provider_operation_accepted The provider explicitly accepted the operation under a defined synchronous or asynchronous contract; committed state is not implied.
provider_state_readback_verified A subsequent provider read confirmed the expected object or state.
outcome_unknown No completion or non-completion claim is justified.

Each state should identify the observation point, verifier, correlation
reference, integrity protection, and nonclaims. This makes the evidence useful
without calling every Gateway assertion “proof.”

Where Ceal should differentiate

Ceal's agent-specific value lies in controls at the boundary between
probabilistic planning and deterministic systems:

  1. Untrusted discovery metadata. The agent guide already says catalog and
    help text are descriptive data, not higher-priority instructions
    (agent guide).
    This is an agent-specific interpretation rule: the agent must treat
    discovered descriptions as data that cannot override the caller's
    instructions or policy.

  2. Natural-language intent resolution. The agent searches a bounded,
    policy-filtered target catalog and receives opaque references rather than
    inventing provider identifiers
    (capability discovery,
    target response types).
    Ceal can own the conversion from a user's request to an exact permitted
    action, target reference, and structured input.

  3. Autonomous retry control. Ambiguous outcomes are a mature distributed-
    systems problem, but an agent can turn ambiguity into duplicate side effects
    without human intervention. Ceal documents a machine-readable recovery
    workflow: preserve the declared replay identity, inspect the original
    request's receipt, and do not invent another write
    (agent write guidance).
    This is guidance, not proof that the host or Gateway blocks an equivalent
    mutation submitted with a new identity.

  4. Evidence-aware completion. An agent must translate machine evidence into
    a natural-language claim without upgrading “Gateway accepted” into “Slack now
    contains the message.” Ceal's explicit unknown and verified readback states
    provide a sound basis for that control
    (write receipt states).

Prioritized recommendations

  1. Publish normative concept definitions and standards mappings. Mark every
    comparison as an exact mapping, compatible implementation option, analogy,
    extension, or intentionally independent mechanism.
  2. Review the Session protocol against OAuth security guidance. Document
    token audience, sender constraint, rotation, replay response, revocation,
    expiry, and storage assumptions. Describe it as OAuth only if matching OAuth
    endpoint, grant, and token semantics are adopted.
  3. Define Replay Identity before consolidating terminology. Specify whether
    it is an idempotency key, another identifier, or a tuple; use the established
    term only if the semantics are equivalent.
  4. Split Route Effect into independent dimensions. Represent provider,
    session, and local effects separately; keep semantic safety, idempotency, and
    retry prerequisites on independent axes.
  5. Qualify Capability and Proof Level, and define the input-contract dialect.
    Avoid implying bearer authority or cryptographic proof. Specify a fixed JSON
    Schema dialect, meta-schema URI, Ceal vocabulary, and format assertion
    policy—or the exact OpenAPI Schema Object dialect used.
  6. Bind purpose to trusted provenance and make verification states
    normative.
    Preserve subject, actor, approval, and task identity separately;
    define the fact, verifier, integrity boundary, correlation reference, and
    nonclaims for each evidence state.

Conclusion

Ceal's strongest potential contribution is a disciplined agent execution loop:
resolve an exact permitted action, execute without exposing provider
credentials, direct the agent not to repeat an ambiguous write, and report only
what the evidence supports. Each prevention or standards-conformance claim
needs its own testable invariant.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions