Skip to content

feat(ops): create action request API with audit trail #66

Description

@05F3759DF

Context

Operators need to trigger pre-registered robot-side actions from Keystone, but Keystone must not accept arbitrary commands or bypass auditability. Action requests should reference an allowlisted action ID and validated arguments only.

Scope

  • Add an action request model with request_id, robot_id, action_id, args, status, requested_by, requested_at, expires_at, and audit metadata.
  • Create an API for operators or services to submit action requests against a robot action catalog entry.
  • Validate arguments against the catalog-provided schema before accepting a request.
  • Enforce RBAC and approval requirements for high-risk actions.
  • Write audit events for request creation, approval, cancellation, and status changes.
  • Prevent arbitrary shell commands or unmanaged script paths from being submitted.

Acceptance Criteria

  • Valid action requests are persisted with a stable request ID.
  • Unknown action IDs, invalid arguments, unauthorized users, and expired approval flows are rejected clearly.
  • All request lifecycle changes are auditable with the requesting user and robot identity.
  • The API never accepts raw shell commands as request payload.
  • Tests cover successful creation, schema validation failure, RBAC denial, approval-required actions, and audit log creation.

Depends On

Related

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

    area:devicesRobot/device inventory, health, and lifecyclearea:opsOperations, recovery, incidents, and site workflowscross-repo:axonRequires coordination with archebase/axonenhancementNew feature or requestpriority:p1High priority for production operationssecuritySecurity related

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions