| Wallet::Object::Duo(3pm) | User Contributed Perl Documentation | Wallet::Object::Duo(3pm) |
Wallet::Object::Duo - Duo integration object implementation for wallet
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);
Wallet::Object::Duo is a representation of Duo integrations the wallet. It implements the wallet object API and provides the necessary glue to create a Duo integration, return a configuration file containing the key and API information for that integration, and delete the integration from Duo when the wallet object is destroyed.
Usually you will want to use one of the subclasses of this module, which override the output to give you a configuration fragment suited for a specific application type. However, you can always use this module for generic integrations where you don't mind massaging the output into the configuration for the application using Duo.
This object can be retrieved repeatedly without changing the secret key, matching Duo's native behavior with integrations. To change the keys of the integration, delete it and recreate it.
To use this object, at least one configuration parameter must be set. See Wallet::Config for details on supported configuration parameters and information about how to set wallet configuration.
This object mostly inherits from Wallet::Object::Base. See the documentation for that class for all generic methods. Below are only those methods that are overridden or behave specially for this implementation.
When a new Duo integration object is created, a new integration will be created in the configured Duo account and the integration key will be stored in the wallet object. If the integration already exists, create() will fail. 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 information.
If create() fails, it throws an exception.
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.
Only one Duo account is supported for a given wallet implementation.
Net::Duo(3), Wallet::Config(3), Wallet::Object::Base(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/>.
Russ Allbery <eagle@eyrie.org>
| 2024-11-12 | perl v5.40.0 |