Stores only the client_granted term of the permission equation. More...
#include <control_grants.hpp>
Public Types | |
| using | Clock = std::function<std::chrono::steady_clock::time_point()> |
Public Member Functions | |
| ControlGrantStore (ControlIdentityRegistry &identities, std::shared_ptr< ControlSecurityAuditLog > audit_log, ControlGrantStoreConfig config={}, Clock clock=[] { return std::chrono::steady_clock::now();}) | |
| ~ControlGrantStore () | |
| ControlGrantStore (const ControlGrantStore &)=delete | |
| ControlGrantStore & | operator= (const ControlGrantStore &)=delete |
| ControlGrantResult | issue (ControlGrantRequest request, ControlConsentDecision consent) |
| Internal broker call. | |
| ControlGrantStatus | revoke (const ControlGrantId &grant_id, std::string_view decision_id) |
| std::size_t | revoke_client (const ControlClientId &client_id, std::string_view decision_id) |
| std::size_t | revoke_registration (const ControlRegistrationId ®istration_id, std::string_view decision_id) |
| bool | is_granted (const ControlGrantId &grant_id, const ControlClientId &client_id, const ControlRegistrationId ®istration_id, InspectorCapability capability) |
| std::optional< ControlOperationAuthorization > | authorize_operation (const ControlGrantId &grant_id, const ControlClientId &client_id, const ControlRegistrationId ®istration_id, InspectorCapability capability, std::string_view operation_identity) |
| Atomically reserves the GPU-health capability of an interactive-consent grant for its first durable idempotency identity. | |
| bool | commit_operation_authorization (const ControlGrantId &grant_id, std::string_view operation_identity, std::uint64_t reservation_token) |
| Commits a provisional one-shot reservation after the durable operation receipt exists. | |
| bool | release_operation_authorization (const ControlGrantId &grant_id, std::string_view operation_identity, std::uint64_t reservation_token) |
| Releases only the caller's still-provisional reservation. | |
| std::optional< ControlGrant > | grant (const ControlGrantId &grant_id) |
| std::vector< ControlGrant > | sweep_expired () |
Stores only the client_granted term of the permission equation.
A true result does not activate or route an operation; every other term remains independently required at dispatch.
| using pulp::inspect::ControlGrantStore::Clock = std::function<std::chrono::steady_clock::time_point()> |
| pulp::inspect::ControlGrantStore::ControlGrantStore | ( | ControlIdentityRegistry & | identities, |
| std::shared_ptr< ControlSecurityAuditLog > | audit_log, | ||
| ControlGrantStoreConfig | config = {}, | ||
| Clock | clock = [] { return std::chrono::steady_clock::now();} ) |
| pulp::inspect::ControlGrantStore::~ControlGrantStore | ( | ) |
|
delete |
| std::optional< ControlOperationAuthorization > pulp::inspect::ControlGrantStore::authorize_operation | ( | const ControlGrantId & | grant_id, |
| const ControlClientId & | client_id, | ||
| const ControlRegistrationId & | registration_id, | ||
| InspectorCapability | capability, | ||
| std::string_view | operation_identity ) |
Atomically reserves the GPU-health capability of an interactive-consent grant for its first durable idempotency identity.
Other capabilities on the same grant remain reusable. Once selected, a failed provisional admission may retry only that identity; once committed, only operation-store replay is eligible. The durable store remains the replay authority.
| bool pulp::inspect::ControlGrantStore::commit_operation_authorization | ( | const ControlGrantId & | grant_id, |
| std::string_view | operation_identity, | ||
| std::uint64_t | reservation_token ) |
Commits a provisional one-shot reservation after the durable operation receipt exists.
Once committed, no release can reopen the grant.
| std::optional< ControlGrant > pulp::inspect::ControlGrantStore::grant | ( | const ControlGrantId & | grant_id | ) |
| bool pulp::inspect::ControlGrantStore::is_granted | ( | const ControlGrantId & | grant_id, |
| const ControlClientId & | client_id, | ||
| const ControlRegistrationId & | registration_id, | ||
| InspectorCapability | capability ) |
| ControlGrantResult pulp::inspect::ControlGrantStore::issue | ( | ControlGrantRequest | request, |
| ControlConsentDecision | consent ) |
Internal broker call.
consent.authority is trusted composition-root input and must never be populated from request payload fields.
|
delete |
| bool pulp::inspect::ControlGrantStore::release_operation_authorization | ( | const ControlGrantId & | grant_id, |
| std::string_view | operation_identity, | ||
| std::uint64_t | reservation_token ) |
Releases only the caller's still-provisional reservation.
Concurrent reservations, the selected operation identity, and committed grants are preserved.
| ControlGrantStatus pulp::inspect::ControlGrantStore::revoke | ( | const ControlGrantId & | grant_id, |
| std::string_view | decision_id ) |
| std::size_t pulp::inspect::ControlGrantStore::revoke_client | ( | const ControlClientId & | client_id, |
| std::string_view | decision_id ) |
| std::size_t pulp::inspect::ControlGrantStore::revoke_registration | ( | const ControlRegistrationId & | registration_id, |
| std::string_view | decision_id ) |
| std::vector< ControlGrant > pulp::inspect::ControlGrantStore::sweep_expired | ( | ) |