Anchorage API reference
    Preparing search index...

    Configuration for RBACMiddleware.

    interface RBACMiddlewareOptions {
        allowedPrincipalKinds?: readonly PrincipalKind[];
        allowedRoles: readonly Role[];
        audit?: AuditLogger;
        getActor?: (args: ProcessInputArgs) => Actor | undefined;
        resource?: string;
    }
    Index

    Properties

    allowedPrincipalKinds?: readonly PrincipalKind[]

    Exact principal kinds authorized to call the agent. Defaults to ['human'], so an existing configuration denies every automated principal without changing a line — the caller must name the automation it wants.

    allowedRoles: readonly Role[]

    Exact roles authorized to call the agent. Consulted for humans only. A non-empty array of distinct ROLES members; construction copies it.

    audit?: AuditLogger

    Optional audit logger for authorization decisions and lookup failures. A present value must have a callable record.

    getActor?: (args: ProcessInputArgs) => Actor | undefined

    Override actor sourcing. Default reads ACTOR_CONTEXT_KEY from requestContext. A lookup that throws, or returns an actor whose kind is not a PRINCIPAL_KINDS member, is an audited denial.

    resource?: string

    Audit resource. Defaults to the stable processor identifier.