NAME
DBIO::AccessBroker::HostBound - One credential identity pinned to one host
VERSION
version 0.900000
SYNOPSIS
my $broker = DBIO::AccessBroker::Vault->new(...); # one Vault lease
my $primary = $broker->for_host('db-primary');
my $replica = $broker->for_host({ host => 'db-replica', port => 5433 });
# $primary and $replica share one credential lease; only the host differs.
DESCRIPTION
A HostBound view pairs one CredentialSource (a wrapped DBIO::AccessBroker) with one host. It is how a single credential can serve many servers: DBIO::Replicated owns the host list and asks the broker for a host-bound view per backend via $broker->for_host($host), while the broker itself never learns the host list.
The view holds no credentials of its own. Every credential operation — needs_refresh, refresh, has_rotating_credentials, is_transaction_safe — delegates to the wrapped broker, so all views built from one broker share a single lease and a single rotation schedule. The view adds exactly one thing: it injects its host (and optional port) into the connect info the broker returns, handling both the hashref form ({host,port,dbname,...}) and the DBI-arrayref/DSN form.
AUTHOR
DBIO & DBIx::Class Authors
COPYRIGHT AND LICENSE
Copyright (C) 2026 DBIO Authors Portions Copyright (C) 2005-2025 DBIx::Class Authors Based on DBIx::Class, heavily modified.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.