logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Wallet::ACL::Krb5::Regex - Regex wallet ACL verifier for Kerberos principals

Author

       Ian Durkacz

perl v5.40.0                                       2024-11-12                      Wallet::ACL::Krb5::Regex(3pm)

Description

       Wallet::ACL::Krb5::Regex is the wallet ACL verifier used to verify ACL lines of type "krb5-regex".  The
       value of such an ACL is a Perl regular expression, and the ACL grants access to a given Kerberos
       principal if and only if the regular expression matches that principal.

Diagnostics

       malformed krb5-regex ACL
           The ACL parameter to check() was a malformed Perl regular expression.

       no principal specified
           The PRINCIPAL parameter to check() was undefined or the empty string.

       no ACL specified
           The ACL parameter to check() was undefined or the empty string.

Methods

new()
           Creates a new ACL verifier.  For this verifier, there is no setup work.

       check(PRINCIPAL, ACL)
           Returns true if the Perl regular expression specified by the ACL matches the PRINCIPAL, false if not,
           and undef on an error (see "DIAGNOSTICS" below).

       error()
           Returns the error if check() returned undef.

Name

       Wallet::ACL::Krb5::Regex - Regex wallet ACL verifier for Kerberos principals

See Also

Wallet::ACL(3), Wallet::ACL::Base(3), Wallet::ACL::Krb5(3), wallet-backend(8)

       This   module   is   part   of   the   wallet   system.    The   current   version   is   available  from
       <https://www.eyrie.org/~eagle/software/wallet/>.

Synopsis

           my $verifier = Wallet::ACL::Krb5::Regex->new;
           my $status = $verifier->check ($principal, $acl);
           if (not defined $status) {
               die "Something failed: ", $verifier->error, "\n";
           } elsif ($status) {
               print "Access granted\n";
           } else {
               print "Access denied\n";
           }

See Also