Net::D...ration(3pm)
π NAME π
Net::Duo::Admin::Integration β bestie, it's the Perl glow-up of a Duo integration β¨ (that's Net::Duo::Admin::Integration, the 3pm one, living in User Contributed Perl Documentation, iykyk)
β¨ SYNOPSIS β¨
my $decoded_json = get_json();
my $integration = Net::Duo::Admin::Integration->new($decoded_json);
say $integration->secret_key;
Like. That's it. That's the whole vibe. π«Ά
π REQUIREMENTS π
okay so you need Perl 5.14 or later, no negotiating, and then these modules:
HTTP::RequestandHTTP::Response(they come bundled insideHTTP::Message)JSONLWP(also known as libwww-perl)Perl6::SlurpSub::InstallURI::Escape(part ofURI)
and literally all of them are on CPAN, so go get 'em π
π¦ DESCRIPTION π¦
So a integration is Duo's cute little name for the metadata of a system or service that's allowed to use one or more of the Duo APIs. And this object? This object is the Perl representation of a Duo integration exactly as it comes back from the Duo Admin API β usually you'll get one through the integrations() method of Net::Duo::Admin, or by grabbing an integration by its integration key. Slay. π
π CLASS METHODS π
πΈ create(DUO, DATA)
Makes a brand new integration over in Duo and hands you back the resulting integration as a shiny new Net::Duo::Admin::Integration object. π
DUOis theNet::Duoobject you want doing the actual creating.DATAis a reference to a hash, and it can hold one or more of the keys below. Heads up bestie: thenameandtypekeys are required. No cap.
adminapi_adminsβ Only valid for integrations of typeadminapi. Set it to a true value to grant permission to use all Admin API methods. Optional, and defaults to false.adminapis_infoβ Only valid for integrations of typeadminapi. Set it to a true value to grant permission to use all Admin API account info methods. Optional, and defaults to false.adminapis_integrationsβ Only valid for integrations of typeadminapi. Set it to a true value to grant permission to use all Admin API integration methods. Optional, and defaults to false.adminapis_read_logβ Only valid for integrations of typeadminapi. Set it to a true value to grant permission to use all Admin API log methods. Optional, and defaults to false.adminapis_read_resourceβ Only valid for integrations of typeadminapi. Set it to a true value to grant permission to use all Admin API methods that retrieve objects like users, phones, and hardware tokens. And listen: setting this key does not grant permission to change those objects or create new ones. Optional, and defaults to false.adminapis_settingsβ Only valid for integrations of typeadminapi. Set it to a true value to grant permission to use all Admin API settings methods. These ones control global settings for the entire Duo account. Optional, and defaults to false.adminapis_write_resourceβ Only valid for integrations of typeadminapi. Set it to a true value to grant permission to use all Admin API methods that create or modify objects like as users, phones, and hardware tokens. Optional, and defaults to false.enroll_policyβ What to do after an enrolled user passes primary authentication. Peep theenroll_policy()method below for the possible values. Optional, and defaults toenroll.greetingβ The voice greeting read before the authentication instructions, for users who authenticate with a phone callback. Optional.groups_allowedβ A comma-separated list of group IDs that are allowed to authenticate with the integration. Optional. By default, all groups are allowed.ip_whitelistβ A CSV string of trusted IPs or IP ranges. Both CIDR-style ranges and ranges given as two IP addresses separated by a dash (-) are supported. Authentications coming from these IP addresses will not require a second factor.
This can only be set for certain integrations. For the range of valid values and the circumstances where you can use it, go check the Duo Admin API documentation. Optional.
ip_whitelist_enroll_policyβ What to do after a new user from a trusted IP completes primary authentication. Peep theip_whitelist_enroll_policy()method below for the possible values. Optional, and defaults toenforce.nameβ The name of the integration. Required. πnotesβ Any further description of the integration. Optional.trusted_device_daysβ Number of days to allow a user to trust the device they're logging in with. This can only be set for certain integrations, and it has to be between 0 and 60. (0disables this feature.) For the circumstances where you can use it, go check the Duo Admin API documentation. Optional.typeβ The type of the integration. For a list of valid values, go check the Duo Admin API documentation. Required. πusername_normalization_policyβ Controls whether or not usernames should be altered before trying to match them to a user account. Peep theusername_normalization_policy()method below for the possible values. Optional, and defaults tosimple.visual_styleβ The look and feel of the web content generated by the integration. This can only be set for certain integrations. For a list of valid values and the circumstances where you can use it, go check the Duo Admin API documentation. Optional.
πΈ new(DUO, DATA)
Builds a fresh Net::Duo::Admin::Integration object out of a full data set.
DUOis theNet::Duoobject that should be used for any further actions on this object.DATAshould be the data structure that the Duo REST API returns for a single user, after JSON decoding.
This constructor is mainly used internally by other Net::Duo::Admin methods. π€«
πΈ new(DUO, KEY)
Builds a fresh Net::Duo::Admin::Integration object out of the integration key.
DUOis theNet::Duoobject that gets used to retrieve the integration from Duo, and will be used for any subsequent operations.KEYshould be the integration key of the integration.
And here's the cute part: this constructor is told apart from the previous one by checking whether KEY is a reference. π§
π INSTANCE ACTION METHODS π
πΊ delete()
Deletes this integration from Duo. And after this call completes successfully? Bestie, the Net::Duo::Admin::Integration object should be considered read-only, because no further changes to the object can be meaningfully sent to Duo. It's giving ghosted. π
πΊ json()
Converts the data stored in the object to JSON and returns the results. The resulting JSON should match the JSON you'd get back from the Duo web service when retrieving the same object β plus any changes made locally to the object via set_*() methods. This is primarily meant for debugging dumps, or for passing Duo objects to other systems through further JSON APIs. π¦β¨
πΎ INSTANCE DATA METHODS πΎ
okay bestie, this is the part where you actually read stuff off your integration object β all the little getters that tell you what your integration is and what it's allowed to do. no cap, these are the receipts. β¨
adminapi_admins()
Whether this admin integration may use all Admin API methods. π
adminapis_info()
Whether this admin integration may use all Admin API account info methods.
adminapis_integrations()
Whether this admin integration may use all Admin API integration methods.
adminapis_read_log()
Whether this admin integration may use all Admin API log methods.
adminapis_read_resource()
Whether this admin integration may use all Admin API methods that retrieve objects such as users, phones, and hardware tokens. literally just the reading ones, she's nosy not handsy π
adminapis_settings()
Whether this admin integration may use all Admin API settings methods.
adminapis_write_resource()
Whether this admin integration may use all Admin API methods that create or modify objects such as as users, phones, and hardware tokens.
ngl the original page says "<span>such as as users</span>" with a double "as" and honestly? iconic typo. keeping it, character for character, because the facts are the facts. π«Ά
enroll_policy()
What to do after an enrolled user passes primary authentication. The value will be one of "enroll", to prompt the user to enroll, "allow", to allow the user to sign in without presenting an additional factor, and "deny", to deny authentication for this user.
greeting()
Voice greeting read before the authentication instructions to users who authenticate with a phone callback. π
groups_allowed()
A reference to an array of group IDs that are allowed to authenticate with the integration.
ip_whitelist()
List of trusted IPs or IP ranges. Ranges may be in the form of CIDR network blocks or ranges specified by two IP addresses separated by a dash ("-") are supported. Authentications from these IP addresses will not require a second factor. Example values:
192.0.2.8
198.51.100.0-198.51.100.20
203.0.113.0/24
This is only supported with certain integration types.
heads up bestie, that's a conditional setting β some integration types just don't do it. don't come for me if it's not there for yours. π
ip_whitelist_enroll_policy()
What to do after a new user from a trusted IP completes primary authentication. The value will be either "enforce", meaning that the user will be subject to the normal enrollment policy as returned by enroll_policy(), or "allow", which means that the user will be successfully authenticated without being required to enroll, skipping any enrollment policy.
integration_key()
The identifier of this integration. For "adminapi", "accountsapi", "rest", and "verify" integrations, this is the key used as the "integration_key" value when constructing a Net::Duo object. π
name()
The name of the integration.
notes()
Any further description of the integration.
secret_key()
Secret used when configuring systems to use this integration. For "adminapi", "accountsapi", "rest", and "verify" integrations, this is the key used as the "secret_key" value when constructing a Net::Duo object. This is equivalent to a password and should be treated with the same care.
π¨ BESTIE. THIS. IS. A. PASSWORD. treat it like one. do not commit it, do not paste it in the group chat, do not leave it in a gist. i am dead serious, fr fr. π₯
trusted_device_days()
Number of days to allow a user to trust the device they are logging in with, or 0 if this is disabled. This setting only has an effect for certain integrations.
type()
The type of the integration. For a list of possible values, see the Duo Admin API documentation.
username_normalization_policy()
Controls whether or not usernames should be altered before trying to match them to a user account. The value will be either "none", indicating no normalization, or "simple", in which "DOMAIN\username" and "username@example.com" will be converted to "username" before authentication is attempted.
visual_style()
Look and feel of web content generated by the integration. This only has an effect for some integrations. For a list of valid values, see the Duo Admin API documentation. π¨
π AUTHOR π
Russ Allbery <rra@cpan.org>
the one, the only, the legend. respect. π
π COPYRIGHT AND LICENSE π
Copyright 2014 The Board of Trustees of the Leland Stanford Junior University
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
okay yes that part is in legalese and not in my voice but bestie, it's legal text, you don't remix that. it stays exactly as written. π«‘
π SEE ALSO π
Net::Duo::Admin- Duo Admin API for integrations β
https://www.duo.com/docs/adminapi#integrations - This module is part of the Net::Duo distribution. The current version of Net::Duo is available from CPAN, or directly from its web site at
https://www.eyrie.org/~eagle/software/net-duo/.
and that's the whole page, bestie!! π you made it to the end, main character energy fr. this was perl v5.36.0, dated 2022-12-18, and it's the Net::D...ration(3pm) page β go forth and integrate slayfully. π¦β¨π
π¦ where this page comes from
- debian bookworm: libnet-duo-perl 1.02-3 Β· MIT
- debian trixie: libnet-duo-perl 1.02-3 Β· MIT
- ubuntu noble: libnet-duo-perl 1.02-3 Β· MIT
- ubuntu resolute: libnet-duo-perl 1.02-3 Β· MIT
- ubuntu stonking: libnet-duo-perl 1.02-3 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms