Wallet...:NetDB(3pm)
π Wallet::ACL::NetDB β the NetDB ACL verifier π
okay bestie, gather round, because this one is the Wallet::ACL::NetDB page from the User Contributed Perl Documentation, and it's literally the thing that checks whether somebody's allowed in based on their NetDB roles. no cap. let's get into it π«Ά
β¨ NAME β¨
Wallet::ACL::NetDB β the Wallet ACL verifier for NetDB roles. that's the whole vibe. π
β¨ SYNOPSIS β¨
my $verifier = Wallet::ACL::NetDB->new;
my $status = $verifier->check ($principal, $node);
if (not defined $status) {
die "Something failed: ", $verifier->error, "\n";
} elsif ($status) {
print "Access granted\n";
} else {
print "Access denied\n";
}
look at her go. three outcomes, three branches, no drama. π
β¨ DESCRIPTION β¨
so Wallet::ACL::NetDB takes a principal and checks it against the NetDB roles for a given host. that's it, that's the job.
it's used to verify ACL lines of type netdb. and here's the tea: the value of such an ACL is a node, and the ACL grants access to a given principal if and only if that principal has one of the roles user, admin, or team for that node. all three. those exact three. don't get creative. π
now, to use this object, several configuration parameters must be set. like, must. go read Wallet::Config for the details on those configuration parameters and for info on how to set wallet configuration. it's giving "required reading", because it is. π
β¨ METHODS β¨
new()β creates a new ACL verifier. it opens the remctl connection to the NetDB server and authenticates. that's the whole method. she connects, she says hi, she's in. π¦check(PRINCIPAL, ACL)β returns true if PRINCIPAL is granted access according to ACL, false if not, andundefon an error (peep "DIAGNOSTICS" below, bestie). ACL is a node, and PRINCIPAL will be granted access if it β with the realm stripped off if configured β has theuser,admin, orteamrole for that node. β¨error()β returns the error ifcheck()returnedundef. that's your "what went wrong" receipt. π§Ύ
β¨ DIAGNOSTICS β¨
new() can fail with these exceptions
NetDB ACL support not available: %sβ theNet::RemctlPerl module, which is required for NetDB ACL support, could not be loaded. no module, no service. πNetDB ACL support not configuredβ the required configuration parameters were not set. go seeWallet::Config(3)for the required configuration parameters and how to set them. she can't work with nothing, bestie. πcannot connect to NetDB remctl interface: %sβ connecting to the NetDB remctl interface failed, with the given error message. the connection said no. π
check() / error() errors
verifying a NetDB ACL may fail with the following errors, which come back from the error() method:
cannot check NetDB ACL: %sβ issuing the remctl command to get the roles for the given principal failed or returned an error.error checking NetDB ACL: %sβ the NetDB remctl interface that returns the roles for a user returned an error message or otherwise returned failure.malformed netdb ACLβ the ACL parameter tocheck()was malformed. right now, this error is only given if ACL isundefor the empty string.malformed NetDB remctl token: %sβ theNet::RemctlPerl library returned a malformed token. this should never happen and indicates a bug inNet::Remctl. fr fr, that's a bug, not a you problem. πno principal specifiedβ the PRINCIPAL parameter tocheck()wasundefor the empty string.
β¨ CAVEATS β¨
the list of possible NetDB roles that should be considered sufficient to grant access is not currently configurable. so the three roles are the three roles. periodt. π
β¨ SEE ALSO β¨
Net::Remctl(3), Wallet::ACL(3), Wallet::ACL::Base(3), Wallet::Config(3), wallet-backend(8)
NetDB is a free software system for managing DNS, DHCP, and related machine information for large organizations. for more info on NetDB, see https://web.stanford.edu/group/networking/netdb/ π
this module is part of the wallet system. the current version is available from https://www.eyrie.org/~eagle/software/wallet/ π«Ά
β¨ AUTHOR β¨
Russ Allbery <eagle@eyrie.org> β the icon, the legend, the author. π
and that's the whole page, bestie!! this doc is from perl v5.40.0, dated 2024-11-12, and it's the Wallet...:NetDB(3pm) page β the User Contributed Perl Documentation version, to be exact. slay, go configure your wallet, and stay iconic πβ¨π
π¦ where this page comes from
- debian trixie: krb5-wallet-server 1.7 Β· MIT
- ubuntu resolute: krb5-wallet-server 1.7 Β· MIT
- ubuntu stonking: krb5-wallet-server 1.7 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms