Wallet...::Root(3pm)

πŸ“¦ version 1.7, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– Wallet::ACL::NetDB::Root β€” the perl manual page, bestie edition πŸ’–

okay so you're reading the 3pm manual for Wallet::ACL::NetDB::Root, and honestly? it's giving "small module, big responsibility." it's an ACL verifier for NetDB roles, specifically the root instances. let's get into it πŸŽ€


✨ NAME ✨

Wallet::ACL::NetDB::Root β€” a Wallet ACL verifier for NetDB roles (root instances). yes that's the whole name, no notes πŸ’…


🌸 SYNOPSIS 🌸

like, here's the whole vibe in code:

my $verifier = Wallet::ACL::NetDB::Root->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";
}

three outcomes, three moods: undef = it broke 😭, true = access granted πŸ‘‘, false = access denied πŸ’€


πŸ¦‹ DESCRIPTION πŸ¦‹

so Wallet::ACL::NetDB::Root does exactly what Wallet::ACL::NetDB does, literally identical, except it's picky about one thing: the principal has to be a root instance. like, it must be in the form <principal>/root@<realm>. and then β€” plot twist β€” it strips that "/root" portion off the principal before it goes and checks against the NetDB roles. iconic behavior, honestly ✨

and same as the base NetDB ACL verifier: the value of a "netdb-root" ACL is a node, and the ACL grants access to a given principal if and only if that principal (with "/root" stripped, obvi) has one of the roles user, admin, or team for that node. that's the whole deal 🫢

to actually use this object, you have to set the same configuration parameters as you would for Wallet::ACL::NetDB. wanna know what those are and how to set wallet configuration at all? go read Wallet::Config(3), it has all the details. i'm not gonna gatekeep, but i'm also not gonna retype it πŸ’–


πŸ’… METHODS πŸ’…

  • check(PRINCIPAL, ACL) β€” returns true if PRINCIPAL is granted access according to ACL, false if not, and undef on an error (scroll down to DIAGNOSTICS for that one). ACL is a node, and PRINCIPAL gets access if it has an instance of "root" and if β€” with "/root" stripped off, and the realm stripped off too if that's configured β€” it has the user, admin, or team role for that node. two conditions, no shortcuts, periodt πŸ”₯

😭 DIAGNOSTICS 😭

same as for Wallet::ACL::NetDB. that's it, that's the section. go look there 🧚


⚠️ CAVEATS ⚠️

  • the instance to strip is not currently configurable. so, yeah, root it is, no customization era for you πŸ™ˆ
  • the list of possible NetDB roles that should be considered sufficient to grant access is not currently configurable either. user, admin, team β€” take it or leave it πŸ’€

🌈 SEE ALSO 🌈

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/>. go get it bestie πŸ’œ


πŸ‘‘ AUTHOR πŸ‘‘

Russ Allbery <eagle@eyrie.org>


and that's the whole page!! ✨ this beauty shipped as part of perl v5.40.0, dated 2024-11-12, and the manual name is Wallet...::Root(3pm) β€” so yeah, that's the lore, love you, bye πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from