Wallet::Admin(3pm)
π Wallet::Admin π
okay bestie, so Wallet::Admin is literally the administrative interface to the wallet server and database, like the backstage pass of the whole operation π. It's part of the wallet system, and it usually gets instantiated and used by wallet-admin, which is a thin little wrapper around this object that gives you a command-line interface to all its actions. So yeah β Wallet::Admin is the icon, wallet-admin is her publicist π
.
β¨ SYNOPSIS β¨
use Wallet::Admin;
my $admin = Wallet::Admin->new;
unless ($admin->initialize ('user/admin@EXAMPLE.COM')) {
die $admin->error;
}
look at her go, no cap πΈ
π DESCRIPTION π
Wallet::Admin implements the administrative interface to the wallet server and database, fr fr. It is normally instantiated and used by wallet-admin, a thin wrapper around this object that provides a command-line interface to its actions.
To use this object, several configuration variables must be set (at least the database configuration, bestie, don't skip that one π). For information on those variables and how to set them, see Wallet::Config. And for more info on the normal user interface to the wallet server, see Wallet::Server. Different vibe, different module π.
π CLASS METHODS π
new()β Creates a new wallet administrative object and connects to the database. On any error, this method throws an exception. So like, if it's mad, you'll know immediately π.
π¦ INSTANCE METHODS π¦
For all methods that can fail, the caller should call error() after a failure to get the error message. That's the rule, bestie, always check the error π.
destroy ()β Destroys the database, deleting all of its data and all of the tables used by the wallet server. Returns true on success and false on failure. Like, this is the nuclear option, it's giving scorched earth π«£π₯.error ()β Returns the error of the last failing operation orundefif no operations have failed. Callers should call this function to get the error message after anundefreturn from any other instance method. She's your receipts, keep her close π§Ύβ¨.initialize(PRINCIPAL)β Initializes the database as configured inWallet::Configand loads the wallet database schema. Then it creates an ACL with the nameADMINand adds an ACL entry of scheme"krb5"and instance PRINCIPAL to that ACL. This bootstraps the authorization system and lets that Kerberos identity make further changes to theADMINACL and the rest of the wallet database. Returns true on success and false on failure.
Also, initialize() uses "localhost" as the hostname and PRINCIPAL as the user when logging the history of the ADMIN ACL creation and for any subsequent actions on the object it returns. The lore is documented, iykyk π.
register_object (TYPE, CLASS)β Register in the database a mapping from the object type TYPE to the class CLASS. Returns true on success and false on failure (including when the verifier is already registered). One per type, she does not do duplicates π ββοΈ.register_verifier (SCHEME, CLASS)β Register in the database a mapping from the ACL scheme SCHEME to the class CLASS. Returns true on success and false on failure (including when the verifier is already registered). Same energy, different registry π«.reinitialize (PRINCIPAL)β Performs the same actions asinitialize(), but first drops any existing wallet database tables from the database, allowing this function to be called on a prior wallet database. All data stored in the database will be deleted and a fresh set of wallet database tables will be created. This method is equivalent to callingdestroy()followed byinitialize(). Returns true on success and false on failure.
bestie. ALL THE DATA. GONE. It's a full reset, not a glow-up, so be so serious before you run this one ππ
upgrade ()β Upgrades the database to the latest schema version, preserving data as much as possible. Returns true on success and false on failure. Gentle queen behaviour, she keeps your stuff π·.
π₯ 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, the legend, the main character π
okay that's the whole page, bestie, and here's the cute little sign-off: this is perl v5.40.0, dated 2024-11-12, filed under User Contributed Perl Documentation, and yes, Wallet::Admin(3pm) ate and left no crumbs π
πβ¨
π¦ 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