Broker-owned identity state. More...
#include <control_identity.hpp>
Public Types | |
| using | Clock = std::function<std::chrono::steady_clock::time_point()> |
Public Member Functions | |
| ControlIdentityRegistry (ControlIdentityRegistryConfig config={}, std::shared_ptr< ControlSecurityAuditLog > audit_log={}, Clock clock=[] { return std::chrono::steady_clock::now();}) | |
| ~ControlIdentityRegistry () | |
| ControlIdentityRegistry (const ControlIdentityRegistry &)=delete | |
| ControlIdentityRegistry & | operator= (const ControlIdentityRegistry &)=delete |
| const ControlBrokerId & | broker_id () const |
| ControlBootstrapResult | issue_bootstrap (const VerifiedControlPeerIdentity &expected_peer) |
| ControlClientResult | redeem_bootstrap (std::string_view ticket_id, std::span< const std::uint8_t > secret, const VerifiedControlPeerIdentity &observed_peer, std::string_view durable_principal={}, ControlDurableClientLifetime durable_lifetime=ControlDurableClientLifetime::Broker) |
| std::vector< ControlClientId > | reclaim_process_clients (const std::function< ControlProcessLiveness(const ControlPeerEvidence &)> &process_liveness) |
| Removes process-scoped clients whose kernel process is gone or whose reconnect lease expired. | |
| bool | refresh_client (const ControlClientId &client_id, const VerifiedControlPeerIdentity &peer) |
| bool | disconnect_client (const ControlClientId &client_id) |
| std::optional< ControlClientIdentity > | client (const ControlClientId &client_id) const |
| ControlRegistrationResult | register_instance (const VerifiedControlPeerIdentity &peer, ControlRegistrationRequest request, bool publish=true) |
| bool | publish_instance (const ControlRegistrationId ®istration_id, const VerifiedControlPeerIdentity &peer) |
| bool | heartbeat (const ControlRegistrationId ®istration_id, const VerifiedControlPeerIdentity &peer) |
| bool | unregister_instance (const ControlRegistrationId ®istration_id, const VerifiedControlPeerIdentity &peer) |
| std::optional< ControlRegistration > | registration (std::string_view session_id, std::string_view instance_id, std::string_view publication_id) const |
| std::optional< ControlRegistration > | registration (const ControlRegistrationId ®istration_id) const |
| std::vector< ControlRegistration > | registrations () const |
| Snapshot of every currently-live exact registration. | |
| void | sweep_expired () |
Broker-owned identity state.
It contains no listener and accepts only verified peers supplied by the future OS-authenticated IPC composition root.
| using pulp::inspect::ControlIdentityRegistry::Clock = std::function<std::chrono::steady_clock::time_point()> |
|
explicit |
| pulp::inspect::ControlIdentityRegistry::~ControlIdentityRegistry | ( | ) |
|
delete |
| const ControlBrokerId & pulp::inspect::ControlIdentityRegistry::broker_id | ( | ) | const |
| std::optional< ControlClientIdentity > pulp::inspect::ControlIdentityRegistry::client | ( | const ControlClientId & | client_id | ) | const |
| bool pulp::inspect::ControlIdentityRegistry::disconnect_client | ( | const ControlClientId & | client_id | ) |
| bool pulp::inspect::ControlIdentityRegistry::heartbeat | ( | const ControlRegistrationId & | registration_id, |
| const VerifiedControlPeerIdentity & | peer ) |
| ControlBootstrapResult pulp::inspect::ControlIdentityRegistry::issue_bootstrap | ( | const VerifiedControlPeerIdentity & | expected_peer | ) |
|
delete |
| bool pulp::inspect::ControlIdentityRegistry::publish_instance | ( | const ControlRegistrationId & | registration_id, |
| const VerifiedControlPeerIdentity & | peer ) |
| std::vector< ControlClientId > pulp::inspect::ControlIdentityRegistry::reclaim_process_clients | ( | const std::function< ControlProcessLiveness(const ControlPeerEvidence &)> & | process_liveness | ) |
Removes process-scoped clients whose kernel process is gone or whose reconnect lease expired.
The broker owns grant/cancellation cleanup for every returned identity.
| ControlClientResult pulp::inspect::ControlIdentityRegistry::redeem_bootstrap | ( | std::string_view | ticket_id, |
| std::span< const std::uint8_t > | secret, | ||
| const VerifiedControlPeerIdentity & | observed_peer, | ||
| std::string_view | durable_principal = {}, | ||
| ControlDurableClientLifetime | durable_lifetime = ControlDurableClientLifetime::Broker ) |
| bool pulp::inspect::ControlIdentityRegistry::refresh_client | ( | const ControlClientId & | client_id, |
| const VerifiedControlPeerIdentity & | peer ) |
| ControlRegistrationResult pulp::inspect::ControlIdentityRegistry::register_instance | ( | const VerifiedControlPeerIdentity & | peer, |
| ControlRegistrationRequest | request, | ||
| bool | publish = true ) |
| std::optional< ControlRegistration > pulp::inspect::ControlIdentityRegistry::registration | ( | const ControlRegistrationId & | registration_id | ) | const |
| std::optional< ControlRegistration > pulp::inspect::ControlIdentityRegistry::registration | ( | std::string_view | session_id, |
| std::string_view | instance_id, | ||
| std::string_view | publication_id ) const |
| std::vector< ControlRegistration > pulp::inspect::ControlIdentityRegistry::registrations | ( | ) | const |
Snapshot of every currently-live exact registration.
Human labels are metadata only; callers must select by instance_id and reject ambiguity.
| void pulp::inspect::ControlIdentityRegistry::sweep_expired | ( | ) |
| bool pulp::inspect::ControlIdentityRegistry::unregister_instance | ( | const ControlRegistrationId & | registration_id, |
| const VerifiedControlPeerIdentity & | peer ) |