Dormant composition root for the local capability-control broker. More...
#include <control_broker.hpp>
Public Types | |
| using | Clock = ControlIdentityRegistry::Clock |
Public Member Functions | |
| ControlBroker (ControlBrokerConfig config={}, std::shared_ptr< ControlSecurityAuditLog > audit_log={}, Clock clock=[] { return std::chrono::steady_clock::now();}) | |
| The steady clock has the same trusted callback contract as ControlBrokerConfig::wall_clock. | |
| ~ControlBroker () | |
| ControlBroker (const ControlBroker &)=delete | |
| ControlBroker & | operator= (const ControlBroker &)=delete |
| const ControlBrokerId & | broker_id () const |
| bool | is_listening () const |
| ControlBootstrapResult | issue_bootstrap (const VerifiedControlPeerIdentity &client_peer) |
| ControlClientResult | redeem_bootstrap (std::string_view ticket_id, std::span< const std::uint8_t > secret, const VerifiedControlPeerIdentity &client_peer, std::string_view durable_principal={}, ControlDurableClientLifetime durable_lifetime=ControlDurableClientLifetime::Broker) |
| bool | refresh_client (const ControlClientId &client_id, const VerifiedControlPeerIdentity &client_peer) |
| ControlBrokerLifecycleResult | disconnect_client (const ControlClientId &client_id, const VerifiedControlPeerIdentity &client_peer, std::string_view decision_id) |
| ControlRegistrationResult | register_instance (const VerifiedControlPeerIdentity &host_peer, ControlRegistrationRequest request, bool publish=true) |
| bool | publish_instance (const ControlRegistrationId ®istration_id, const VerifiedControlPeerIdentity &host_peer) |
| bool | heartbeat (const ControlRegistrationId ®istration_id, const VerifiedControlPeerIdentity &host_peer) |
| ControlBrokerLifecycleResult | unregister_instance (const ControlRegistrationId ®istration_id, const VerifiedControlPeerIdentity &host_peer, std::string_view decision_id) |
| ControlGrantResult | issue_grant (const VerifiedControlPeerIdentity &client_peer, ControlGrantRequest request, ControlConsentDecision consent) |
| ControlGrantStatus | revoke_grant (const ControlGrantId &grant_id, std::string_view decision_id) |
| bool | is_granted (const ControlGrantId &grant_id, const ControlClientId &client_id, const ControlRegistrationId ®istration_id, InspectorCapability capability) |
| ControlAdmissionResult | admit_operation (const VerifiedControlPeerIdentity &client_peer, const ControlRequestEnvelope &request) |
| Atomically resolves every permission term from broker-owned state. | |
| ControlAdmissionResult | replay_operation (const VerifiedControlPeerIdentity &client_peer, const ControlRequestEnvelope &request) |
| Reauthorizes and resolves an existing idempotent receipt without creating a fresh admission. | |
| bool | revalidate_operation (const VerifiedControlPeerIdentity &client_peer, const ControlAdmissionPlan &plan) |
| bool | operation_store_ready () const |
| bool | artifact_store_ready () const |
| ControlOperationStoreResult | begin_operation (const VerifiedControlPeerIdentity &client_peer, const ControlAdmissionPlan &plan) |
| ControlOperationStoreResult | finish_operation (const VerifiedControlPeerIdentity &client_peer, const ControlAdmissionPlan &plan, ControlReceiptState terminal_state, ControlOperationResult result={}) |
| ControlOperationStoreResult | cancel_operation (const VerifiedControlPeerIdentity &client_peer, const ControlClientId &client_id, std::string_view request_id, std::string_view reason) |
| bool | operation_cancellation_requested (const VerifiedControlPeerIdentity &client_peer, const ControlAdmissionPlan &plan) const |
| ControlExecutionCheckpoint | execution_checkpoint (const VerifiedControlPeerIdentity &client_peer, const ControlAdmissionPlan &plan) |
| std::optional< ControlOperationReceipt > | operation_receipt (const ControlReceiptId &receipt_id) const |
| ControlArtifactStoreResult | store_operation_artifact (const VerifiedControlPeerIdentity &client_peer, const ControlAdmissionPlan &plan, std::span< const std::uint8_t > bytes, ControlArtifactProperties properties) |
| Publishes blob and immutable lineage metadata while the producer receipt is Running. | |
| ControlArtifactStoreResult | store_operation_artifact (const VerifiedControlPeerIdentity &client_peer, const ControlAdmissionPlan &plan, std::span< const std::uint8_t > bytes, std::string content_type, ControlArtifactSensitivity sensitivity, ControlArtifactRedactionState redaction_state, std::chrono::milliseconds lifetime) |
| Broker-timestamped publication used by trusted operation adapters. | |
| std::size_t | artifact_maximum_blob_bytes () const noexcept |
| ControlArtifactReadResult | read_artifact (const VerifiedControlPeerIdentity &client_peer, const ControlClientId &requesting_client_id, std::string_view artifact_id, std::uint64_t offset, std::size_t maximum_bytes) |
| Retrieves an artifact by opaque ID after broker-side reauthorization of its original producer grant, exact receipt lineage, and exact producing client. | |
| std::optional< ControlClientIdentity > | client (const ControlClientId &client_id) const |
| std::optional< ControlRegistration > | registration (const ControlRegistrationId ®istration_id) const |
| std::vector< ControlRegistration > | registrations () const |
| std::optional< ControlGrant > | grant (const ControlGrantId &grant_id) |
| void | sweep_expired () |
Dormant composition root for the local capability-control broker.
This object owns identity and grant state, but deliberately owns no listener, service-manager integration, dispatch loop, or runtime activation. Callers must first obtain VerifiedControlPeerIdentity from the credential-bearing local carrier; request payloads cannot construct that type.
|
explicit |
The steady clock has the same trusted callback contract as ControlBrokerConfig::wall_clock.
It may run inside broker coordination and must not call this broker or any of its owned stores.
| pulp::inspect::ControlBroker::~ControlBroker | ( | ) |
|
delete |
| ControlAdmissionResult pulp::inspect::ControlBroker::admit_operation | ( | const VerifiedControlPeerIdentity & | client_peer, |
| const ControlRequestEnvelope & | request ) |
Atomically resolves every permission term from broker-owned state.
Artifact reads use their producer-lineage reauthorization path instead and can never be admitted by minting an ArtifactRead grant.
|
noexcept |
| bool pulp::inspect::ControlBroker::artifact_store_ready | ( | ) | const |
| ControlOperationStoreResult pulp::inspect::ControlBroker::begin_operation | ( | const VerifiedControlPeerIdentity & | client_peer, |
| const ControlAdmissionPlan & | plan ) |
| const ControlBrokerId & pulp::inspect::ControlBroker::broker_id | ( | ) | const |
| ControlOperationStoreResult pulp::inspect::ControlBroker::cancel_operation | ( | const VerifiedControlPeerIdentity & | client_peer, |
| const ControlClientId & | client_id, | ||
| std::string_view | request_id, | ||
| std::string_view | reason ) |
| std::optional< ControlClientIdentity > pulp::inspect::ControlBroker::client | ( | const ControlClientId & | client_id | ) | const |
| ControlBrokerLifecycleResult pulp::inspect::ControlBroker::disconnect_client | ( | const ControlClientId & | client_id, |
| const VerifiedControlPeerIdentity & | client_peer, | ||
| std::string_view | decision_id ) |
| ControlExecutionCheckpoint pulp::inspect::ControlBroker::execution_checkpoint | ( | const VerifiedControlPeerIdentity & | client_peer, |
| const ControlAdmissionPlan & | plan ) |
| ControlOperationStoreResult pulp::inspect::ControlBroker::finish_operation | ( | const VerifiedControlPeerIdentity & | client_peer, |
| const ControlAdmissionPlan & | plan, | ||
| ControlReceiptState | terminal_state, | ||
| ControlOperationResult | result = {} ) |
| std::optional< ControlGrant > pulp::inspect::ControlBroker::grant | ( | const ControlGrantId & | grant_id | ) |
| bool pulp::inspect::ControlBroker::heartbeat | ( | const ControlRegistrationId & | registration_id, |
| const VerifiedControlPeerIdentity & | host_peer ) |
| bool pulp::inspect::ControlBroker::is_granted | ( | const ControlGrantId & | grant_id, |
| const ControlClientId & | client_id, | ||
| const ControlRegistrationId & | registration_id, | ||
| InspectorCapability | capability ) |
|
inline |
| ControlBootstrapResult pulp::inspect::ControlBroker::issue_bootstrap | ( | const VerifiedControlPeerIdentity & | client_peer | ) |
| ControlGrantResult pulp::inspect::ControlBroker::issue_grant | ( | const VerifiedControlPeerIdentity & | client_peer, |
| ControlGrantRequest | request, | ||
| ControlConsentDecision | consent ) |
| bool pulp::inspect::ControlBroker::operation_cancellation_requested | ( | const VerifiedControlPeerIdentity & | client_peer, |
| const ControlAdmissionPlan & | plan ) const |
| std::optional< ControlOperationReceipt > pulp::inspect::ControlBroker::operation_receipt | ( | const ControlReceiptId & | receipt_id | ) | const |
| bool pulp::inspect::ControlBroker::operation_store_ready | ( | ) | const |
|
delete |
| bool pulp::inspect::ControlBroker::publish_instance | ( | const ControlRegistrationId & | registration_id, |
| const VerifiedControlPeerIdentity & | host_peer ) |
| ControlArtifactReadResult pulp::inspect::ControlBroker::read_artifact | ( | const VerifiedControlPeerIdentity & | client_peer, |
| const ControlClientId & | requesting_client_id, | ||
| std::string_view | artifact_id, | ||
| std::uint64_t | offset, | ||
| std::size_t | maximum_bytes ) |
Retrieves an artifact by opaque ID after broker-side reauthorization of its original producer grant, exact receipt lineage, and exact producing client.
Peer identity alone is insufficient because one peer may own multiple client identities.
| ControlClientResult pulp::inspect::ControlBroker::redeem_bootstrap | ( | std::string_view | ticket_id, |
| std::span< const std::uint8_t > | secret, | ||
| const VerifiedControlPeerIdentity & | client_peer, | ||
| std::string_view | durable_principal = {}, | ||
| ControlDurableClientLifetime | durable_lifetime = ControlDurableClientLifetime::Broker ) |
| bool pulp::inspect::ControlBroker::refresh_client | ( | const ControlClientId & | client_id, |
| const VerifiedControlPeerIdentity & | client_peer ) |
| ControlRegistrationResult pulp::inspect::ControlBroker::register_instance | ( | const VerifiedControlPeerIdentity & | host_peer, |
| ControlRegistrationRequest | request, | ||
| bool | publish = true ) |
| std::optional< ControlRegistration > pulp::inspect::ControlBroker::registration | ( | const ControlRegistrationId & | registration_id | ) | const |
| std::vector< ControlRegistration > pulp::inspect::ControlBroker::registrations | ( | ) | const |
| ControlAdmissionResult pulp::inspect::ControlBroker::replay_operation | ( | const VerifiedControlPeerIdentity & | client_peer, |
| const ControlRequestEnvelope & | request ) |
Reauthorizes and resolves an existing idempotent receipt without creating a fresh admission.
| bool pulp::inspect::ControlBroker::revalidate_operation | ( | const VerifiedControlPeerIdentity & | client_peer, |
| const ControlAdmissionPlan & | plan ) |
| ControlGrantStatus pulp::inspect::ControlBroker::revoke_grant | ( | const ControlGrantId & | grant_id, |
| std::string_view | decision_id ) |
| ControlArtifactStoreResult pulp::inspect::ControlBroker::store_operation_artifact | ( | const VerifiedControlPeerIdentity & | client_peer, |
| const ControlAdmissionPlan & | plan, | ||
| std::span< const std::uint8_t > | bytes, | ||
| ControlArtifactProperties | properties ) |
Publishes blob and immutable lineage metadata while the producer receipt is Running.
finish_operation rejects every artifact handle that was not published through this store first.
| ControlArtifactStoreResult pulp::inspect::ControlBroker::store_operation_artifact | ( | const VerifiedControlPeerIdentity & | client_peer, |
| const ControlAdmissionPlan & | plan, | ||
| std::span< const std::uint8_t > | bytes, | ||
| std::string | content_type, | ||
| ControlArtifactSensitivity | sensitivity, | ||
| ControlArtifactRedactionState | redaction_state, | ||
| std::chrono::milliseconds | lifetime ) |
Broker-timestamped publication used by trusted operation adapters.
| void pulp::inspect::ControlBroker::sweep_expired | ( | ) |
| ControlBrokerLifecycleResult pulp::inspect::ControlBroker::unregister_instance | ( | const ControlRegistrationId & | registration_id, |
| const VerifiedControlPeerIdentity & | host_peer, | ||
| std::string_view | decision_id ) |