Wallet...ct::Duo(3pm)
β¨ Wallet::Object::Duo β the whole vibe β¨
okay bestie so this is a page from the User Contributed Perl Documentation for Wallet::Object::Duo, and it's genuinely iconic, iykyk. It lives in the Perl 3pm section, so if you were hunting for it: you found her. π
πΈ NAME πΈ
Wallet::Object::Duo β the Duo integration object implementation for wallet. that's the whole name, she's not complicated, she just works. π
π¦ SYNOPSIS π¦
here's the lil taste test, copy it exactly bestie, don't freestyle:
my @name = qw(duo host.example.com);
my @trace = ($user, $host, time);
my $object = Wallet::Object::Duo->create (@name, $schema, @trace);
my $config = $object->get (@trace);
$object->destroy (@trace);
π DESCRIPTION π
so Wallet::Object::Duo is the representation of Duo integrations inside the wallet. She implements the wallet object API and does all the glue work for you: creating a Duo integration, handing back a config file stuffed with the key and API info for that integration, and nuking the integration from Duo when the wallet object gets destroyed. main character energy, fr fr. π
lowkey though β usually you don't even want to talk to her directly. You want one of her subclasses, which override the output so you get a configuration fragment that's already shaped for a specific application type. That said, you can always use this module for generic integrations where you genuinely don't mind massaging the output into whatever config the Duo-using application needs. no gatekeeping. π«Ά
One thing that's highkey important: this object can be retrieved over and over again without changing the secret key, which matches Duo's own native behavior with integrations. So if you wanna change the keys of the integration? You delete it and recreate it. that's the move. periodt.
To actually use this object, at least one configuration parameter must be set. Go read Wallet::Config for the deets on which configuration parameters are supported and how to set your wallet configuration. it's giving "required reading." π
π METHODS π
She mostly inherits from Wallet::Object::Base β go read that class's documentation for all the generic methods, she's not re-explaining her family tree. Below are only the methods that are overridden or that behave specially for this implementation. β¨
π create(TYPE, NAME, DBH, PRINCIPAL, HOSTNAME [, DATETIME, INTEGRATION_TYPE])
This is a class method and you should call it on the Wallet::Object::Duo class. It creates a new object with the given TYPE and NAME β TYPE is normally "duo" and must be "duo" for the rest of the wallet system to pick up the right class, but this module doesn't actually check that, for ease of subclassing (she trusts you, kinda π). It uses DBH as the handle to the wallet metadata database.
PRINCIPAL, HOSTNAME, and DATETIME get stored as history information. PRINCIPAL should be the user who is creating the object. If DATETIME isn't given, the current time is used. slay.
When a new Duo integration object is created, a brand new integration gets created in the configured Duo account and the integration key gets stored in the wallet object. If the integration already exists, create() will fail. And if an integration type isn't given, the new integration's type is controlled by the DUO_TYPE configuration variable, which defaults to "unix". See Wallet::Config for more. π§
If create() fails, it throws an exception. no quiet failures here bestie, she's loud about it. π
π destroy(PRINCIPAL, HOSTNAME [, DATETIME])
Destroys a Duo integration object by removing it from the database and deleting the integration from Duo. If deleting the Duo integration fails, destroy() fails β no half-finished nonsense. Returns true on success and false on failure. After a failure, the caller should call error() to get the error message. π₯
PRINCIPAL, HOSTNAME, and DATETIME are stored as history information. PRINCIPAL should be the user who is destroying the object. If DATETIME isn't given, the current time is used.
π get(PRINCIPAL, HOSTNAME [, DATETIME])
Retrieves the configuration information for the Duo integration and returns it in the format expected by the configuration file for the Duo UNIX integration. Returns undef on failure β and yeah, the caller should call error() to get the error message if get() returns undef. π
The returned configuration look look like:
[duo]
ikey = <integration-key>
skey = <secret-key>
host = <api-hostname>
The "host" parameter will be taken from the configuration file pointed to by the DUO_KEY_FILE configuration variable. π«
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.
π LIMITATIONS π
Only one Duo account is supported for a given wallet implementation. that's it. that's the limit. don't come for her. π
π SEE ALSO π
This module is part of the wallet system. The current version is available from <https://www.eyrie.org/~eagle/software/wallet/>. π¦
π AUTHOR π
Russ Allbery <eagle@eyrie.org> β the icon, the legend, the one who wrote her. π
and that's the page bestie!! π this doc shipped with perl v5.40.0 and it's dated 2024-11-12, under the Wallet...ct::Duo(3pm) manual page. go forth and configure your Duo integrations, you absolute star. β¨π
π
π¦ 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