Wallet...ssword(3pm)

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

πŸ’– Wallet::Object::Password β€” the perl manual, but make it cute πŸ’–

okay bestie, pull up a chair πŸŽ€ this is Wallet::Object::Password(3pm), a perl module from the User Contributed Perl Documentation corner of the world, and it's literally the password-flavored glow-up of a wallet file object. let's get into it πŸ’…


✨ NAME ✨

Wallet::Object::Password β€” Password object implementation for wallet. that's the whole name, that's the whole job 🫢


🌸 SYNOPSIS 🌸

my @name = qw(file mysql-lsdb)
my @trace = ($user, $host, time);
my $object = Wallet::Object::Password->create (@name, $schema, @trace);
unless ($object->store ("the-password\n")) {
    die $object->error, "\n";
}
my $password = $object->get (@trace);
$object->destroy (@trace);

look at her go ✨ create it, store it, get it, destroy it β€” the full main character arc πŸ˜­πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

Wallet::Object::Password</purl> is an extension of Wallet::Object::File, and it's out here acting as a representation of simple file objects in the wallet. so far, so normal. but here's the plot twist: if there's no data stored in a password object when a user tries to get it for the first time, then a random string suited for a password gets generated and dropped straight into the object data. surprise!! you got a password 🎁✨

it implements the wallet object API and provides all the necessary glue to:

  • store a file on the wallet server,
  • retrieve it later,
  • and delete it when the password object is deleted.

to use this object, the configuration option specifying where on the wallet server to store password objects must be set. see Wallet::Config for the deets on that configuration parameter and for info about how to set wallet configuration 🫢


πŸ’… METHODS πŸ’…

this object mostly inherits from Wallet::Object::File. go read that class's documentation for all the generic methods, bestie β€” it's giving "required reading". below are only the methods that are overridden or that behave specially for this implementation πŸ‘‘

get(PRINCIPAL, HOSTNAME [, DATETIME])

retrieves the current contents of the file object, or undef on error 😭. store() must be called before get() will be successful β€” no shortcuts, no cap. the caller should call error() to grab the error message if get() returns undef πŸ™ˆ.

PRINCIPAL, HOSTNAME, and DATETIME are stored as history information πŸ“œ. PRINCIPAL should be the user who is downloading the keytab. if DATETIME isn't given, the current time is used ⏰.


πŸŽ€ FILES πŸŽ€

  • PWD_FILE_BUCKET/<hash>/<file> β€” password files are stored on the wallet server under the directory PWD_FILE_BUCKET as set in the wallet configuration. <hash> is the first two characters of the hex-encoded MD5 hash of the wallet password object name, used to not put too many files in the same directory (spreading them out, iconique 🌈). <file> is the name of the password object with all characters other than alphanumerics, underscores, and dashes replaced by "%" and the hex code of the character ✨

πŸ’€ LIMITATIONS πŸ’€

the wallet implementation itself can handle arbitrary password object names. however, due to limitations in the remctld server usually used to run wallet-backend, password object names containing nul characters (ASCII 0) may not be permitted 🚫. also the file system used for storing file objects may impose a length limitation on the password object name 😭

fr fr, watch out for those nul bytes and long names β€” the filesystem is not gonna be chill about it.

🌈 SEE ALSO 🌈

this module is part of the wallet system. the current version is available from <https://www.eyrie.org/~eagle/software/wallet/> πŸ’–


πŸ‘‘ AUTHORS πŸ‘‘

  • Jon Robertson <jonrober@stanford.edu>
  • Bill MacAllister <bill@ca-zephyr.org>

and that's the whole page, bestie 🫢 this lil writeup is from perl v5.40.0, dated 2024-11-12, and it lives in the Wallet...ssword(3pm) corner of the manual universe. go forth and password responsibly βœ¨πŸŽ€πŸ’…

πŸ“¦ where this page comes from