Search by

kumwe / access-control

llewellyn

Portable authorization decisions, owner-bound policy registries, scopes and explicit authority ports.

Package info

github.com/kumwe/access-control

pkg:composer/kumwe/access-control

Statistics

Installs: 60

Dependents: 7

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.2 2026-09-08 15:58 UTC

This package is auto-updated.

Last update: 2026-09-12 15:02:58 UTC


README

Packagist version Access CI PHP requirement License

Portable authorization decisions, owner-bound capability/resource-policy registries, scope models and explicit host authority ports. Canonical PHP namespace: Kumwe\Access\. Requires PHP 8.5, exact Access Context 0.1.2 and PSR Container 2. No native extension is required.

Installation and use

Install the published package with an exact pre-1.0 pin:

composer require kumwe/access-control:0.1.2
<?php

require 'vendor/autoload.php';

use Kumwe\Access\AuthorizationDecision;
use Kumwe\Access\DecisionCombiner;
use Kumwe\Access\DecisionState;

$result = (new DecisionCombiner())->combine([
    new AuthorizationDecision(DecisionState::Allow, 'example.grants.v1', 'matching_grant'),
    new AuthorizationDecision(DecisionState::StepUp, 'example.assurance.v1', 'fresh_proof_required'),
]);
assert(!$result->allowed);

Deny overrides step-up, step-up overrides allow, and abstention grants nothing. Equal-state decisions select policy then reason in byte order. Empty input explicitly abstains. The host evaluates rules and enforces the resulting authority; this package has no authentication or audit implementation.

Registries require explicit MembershipRequirement and ownership rules require an explicit reserved host table. Unknown ownership categories default to site-only. Extension capabilities obey their owner namespace, cannot bind another owner's capability or declare system identities, and collide regardless of lifecycle. Removing capability ownership makes orphan policy lookups inert.

Core integration

Register ConfigProvider in Core's composition root with explicit membership targets, reserved ownership rules and reference inspectors. Core supplies authority, membership resolution, persistence, transactions and audit adapters. See the Core contract and integration guide for service lifetimes, configuration and retained integration tests.

Public API, architecture, charter, release record and security policy describe supported boundaries. Published versions and CI status are linked above; Core integration is validated in the consuming repository.

Development and releases

composer install
composer check
composer examples

CI installs the built ZIP as a no-development, authoritative-classmap dependency and exercises every export, example and configured service. Testing explains package and Core ownership. Release guidance and dependency verification distinguish publication identity checks from independent consumer evidence. Licensed under Apache-2.0.