Search by

Identity, RBAC/ABAC authorization, first-class AI Agent credentials, and persistent immutable audit logging module for PhrameCMS.

Package info

github.com/PhrameCMS/user

pkg:composer/phramecms/user

Statistics

Installs: 35

Dependents: 5

Suggesters: 2

Stars: 0

Open Issues: 0

v0.1.0 2026-12-04 21:07 UTC

This package is auto-updated.

Last update: 2026-12-04 21:38:18 UTC


README

Identity, RBAC/ABAC authorization, first-class AI Agent credentials, and persistent audit logging module for PhrameCMS.

Responsibilities

  • Human Users & Roles: Manage user accounts, password hashing (password_hash / Argon2id), roles, and granular permission grants (e.g., entity.content.article.create, entity.content.article.publish, config.write, schema.modify).
  • First-Class AI Agent Principals:
    • Dedicated Agent Tokens distinct from human user accounts (actor_type = 'agent'), stored hashed at rest with optional expiration (expires_at) and revocation.
    • Explicit capability scope allowlists (e.g., allow entity.content.article.create_draft and config.read while forbidding publish or delete).
    • Optional on_behalf_of human attribution and agent_session_id tracking.
  • Core Policy Enforcement: Implements PolicyEnforcerInterface from phramecms/core, automatically authorizing every Operation invoked via REST API, MCP, or CLI.
  • HTTP & MCP Auth Guards: Bearer token middleware for phramecms/routing and principal resolution for phramecms/mcp.
  • Immutable Audit Trail: Implements AuditLoggerInterface persisted via phramecms/database, capturing actor ID, actor type (human/agent), operation name, target resource, before/after state hashes, dry-run flag, correlation ID, and timestamp.

AI-First Design Role

Security for autonomous AI agents cannot rely on shared admin passwords or UI-only checks. By distinguishing agent principals, scoping capabilities per token, enforcing policies inside the Core Operation Pipeline, and persisting immutable audit logs, PhrameCMS lets teams grant AI agents precise, revocable, observable authority.

Dependencies

  • PHP ^8.5
  • phramecms/core
  • phramecms/database
  • phramecms/routing (optional — enables HTTP auth middleware when installed)

Ecosystem

Part of the PhrameCMS multi-repo suite. See PhrameCMS/cms for the starter distribution and architecture docs.