Wallet...ribute(3pm)
π Wallet::ACL::LDAP::Attribute β the manual, but make it cute π
okay bestie, so this is Wallet::ACL::LDAP::Attribute from the User Contributed Perl Documentation, section 3pm. she's a Perl module, she's part of the wallet system, and she is lowkey the bouncer at the LDAP club. let's get into it π
β¨ NAME β¨
Wallet::ACL::LDAP::Attribute β the Wallet ACL verifier that does LDAP attribute compares. no cap, that's literally her whole job π
πΈ SYNOPSIS πΈ
my $verifier = Wallet::ACL::LDAP::Attribute->new;
my $status = $verifier->check ($principal, "$attr=$value");
if (not defined $status) {
die "Something failed: ", $verifier->error, "\n";
} elsif ($status) {
print "Access granted\n";
} else {
print "Access denied\n";
}
π¦ DESCRIPTION π¦
so here's the vibe. Wallet::ACL::LDAP::Attribute checks whether the LDAP record for the entry that corresponds to a principal contains an attribute with a particular value. that's it, that's the whole personality.
she's the one you call to verify ACL lines of type ldap-attr. and the value of one of those ACLs? it's a valid LDAP filter. the ACL grants access to a given principal if and only if an LDAP search β using a filter built out of the principal filter AND the ACL filter β comes back with a single entry. one entry. not zero, not two. one. periodt π
not me stressing that it has to be exactly one entry. that part is not a suggestion bestie, it's the rule.
to actually use this object, a bunch of configuration parameters have to be set first. go read Wallet::Config for the deets on those parameters and for info on how to set wallet configuration. iykyk π
π METHODS π
new()β creates a brand new ACL verifier. she opens the connection to the LDAP server and binds it. like, she's not just saying hi, she's fully introducing herself β¨check(PRINCIPAL, ACL)β returns true ifPRINCIPALis granted access according toACL, false if not, andundefon an error (peep "DIAGNOSTICS" below).ACLmust be a valid LDAP filter. and the filter formed using thePRINCIPALplus theACLfilter must return a single entry for access to be granted. one. entry. π«Άerror()β returns the error ifcheck()came backundef. your emotional support error message π
π DIAGNOSTICS π
the new() method may fail with one of these exceptions, and bestie, if you see one of these, that's your sign:
LDAP attribute ACL support not available: %sβ trying to connect to or bind to the LDAP server? it failed. tragic. πLDAP attribute ACL support not configuredβ the required configuration parameters weren't set. go look atWallet::Config(3)for which configuration parameters are required and how to set them π
verifying an LDAP attribute ACL may fail with the following errors (these ones come back from the error() method):
search for %s failed in LDAP: %sβ the search for an ldap entry failed because of a configuration error in Wallet or in the LDAP server. for example, the Wallet configuration includes an invalid root DN π¬malformed ldap-attr LDAP filter, no equal sign presentβ the ACL filter stored asldap-attris not a valid LDAP filter. where's the=bestie πmalformed ldap-attr LDAP filter, parenthesis mismatchβ the ACL filter stored asldap-attris not a valid LDAP filter. the parentheses are not parenthesising πmapping principal to LDAP failed: %sβ there was anldap_map_principal()function defined in the wallet configuration, but calling it for thePRINCIPALargument failed πno ACL specifiedβ theACLparameter passed tocheck()was undefined or the empty string. she needs something to work with π§no principal specifiedβ thePRINCIPALparameter passed tocheck()was undefined or the empty string. same energy, different argument πΈ
π₯ SEE ALSO π₯
this module is part of the wallet system. the current version is available from <https://www.eyrie.org/~eagle/software/wallet/>. go get her π
π AUTHOR π
Russ Allbery <eagle@eyrie.org> β the icon who wrote this. we stan π«Ά
and that's the whole page, bestie!! this came to you courtesy of perl v5.40.0, dated 2024-11-12 β yeah she's been around, she's got seniority, she's still slaying πβ¨ππ¦
π¦ 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