-
Notifications
You must be signed in to change notification settings - Fork 715
feat(integrations): add support for cisco duo admin #5820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f7c5227
feat(integrations): add support for cisco duo admin
hassan254-prog 0d4fd7a
Merge branch 'master' into wari/add-support-for-cisco-duo
hassan254-prog 2f6e86d
fix after rebase
hassan254-prog 6cff177
improve
hassan254-prog b3682e0
improve
hassan254-prog e2d8871
Merge branch 'master' into wari/add-support-for-cisco-duo
hassan254-prog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| --- | ||
| title: 'Cisco Duo Admin API' | ||
| sidebarTitle: 'Cisco Duo Admin API' | ||
| description: 'Integrate your application with the Cisco Duo Admin API' | ||
| --- | ||
|
|
||
| ## 🚀 Quickstart | ||
|
|
||
| Connect to Cisco Duo Admin API with Nango and see data flow in 2 minutes. | ||
|
|
||
| <Steps> | ||
| <Step title="Create the integration"> | ||
| In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> _Configure New Integration_ -> _Cisco Duo Admin API_. | ||
| </Step> | ||
| <Step title="Authorize Cisco Duo Admin API"> | ||
| Go to [Connections](https://app.nango.dev/dev/connections) -> _Add Test Connection_ -> _Authorize_, then enter your Integration Key, Secret Key, and API Hostname. Later, you'll let your users do the same directly from your app. | ||
| </Step> | ||
| <Step title="Call the Cisco Duo Admin API"> | ||
| Let's make your first request to the Cisco Duo Admin API (list groups). Nango handles the Duo request signing automatically. Replace the placeholders below with your [Nango secret key](https://app.nango.dev/dev/environment-settings), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections): | ||
|
|
||
| <Tabs> | ||
| <Tab title="cURL"> | ||
|
|
||
| ```bash | ||
| curl "https://api.nango.dev/proxy/admin/v1/groups" \ | ||
| -H "Authorization: Bearer <NANGO-SECRET-KEY>" \ | ||
| -H "Provider-Config-Key: <INTEGRATION-ID>" \ | ||
| -H "Connection-Id: <CONNECTION-ID>" | ||
| ``` | ||
|
|
||
| </Tab> | ||
|
|
||
| <Tab title="Node"> | ||
|
|
||
| Install Nango's backend SDK with `npm i @nangohq/node`. Then run: | ||
|
|
||
| ```typescript | ||
| import { Nango } from '@nangohq/node'; | ||
|
|
||
| const nango = new Nango({ secretKey: '<NANGO-SECRET-KEY>' }); | ||
|
|
||
| const res = await nango.get({ | ||
| endpoint: '/admin/v1/groups', | ||
| providerConfigKey: '<INTEGRATION-ID>', | ||
| connectionId: '<CONNECTION-ID>' | ||
| }); | ||
|
|
||
| console.log(res.data); | ||
| ``` | ||
|
|
||
| </Tab> | ||
| </Tabs> | ||
|
|
||
| Or fetch credentials with the [Node SDK](/reference/sdks/node#get-a-connection-with-credentials) or [API](/reference/api/connection/get). | ||
|
|
||
| ✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests. | ||
| </Step> | ||
|
|
||
| <Step title="Implement Nango in your app"> | ||
| Follow our [Auth implementation guide](/implementation-guides/platform/auth/implement-api-auth) to integrate Nango in your app. | ||
|
|
||
| To obtain your own production credentials, follow the setup guide linked below. | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| ## 📚 Cisco Duo Admin API Integration Guides | ||
|
|
||
| Nango-maintained guides for common use cases. | ||
|
|
||
| - [How to connect your Cisco Duo Admin API application](/api-integrations/cisco-duo-admin/connect) | ||
| Get your Duo Integration Key, Secret Key, and API Hostname and connect them to Nango | ||
|
|
||
| Official docs: [Duo Admin API docs](https://duo.com/docs/adminapi) | ||
|
|
||
| ## 🧩 Pre-built syncs & actions for Cisco Duo Admin API | ||
|
|
||
| Enable them in your dashboard. [Extend and customize](/implementation-guides/platform/functions/customize-template) to fit your needs. | ||
|
|
||
| import PreBuiltUseCases from "/snippets/generated/cisco-duo-admin/PreBuiltUseCases.mdx" | ||
|
|
||
| <PreBuiltUseCases /> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| --- | ||
| title: 'Cisco Duo Admin API - How do I link my account?' | ||
| sidebarTitle: 'Cisco Duo Admin API' | ||
| description: 'Create a Duo Admin API application and connect it to Nango' | ||
| --- | ||
|
|
||
| # Overview | ||
|
|
||
| To authenticate with Cisco Duo Admin API, you need: | ||
| 1. **Integration Key** - The integration key for your Duo Admin API application. | ||
| 2. **Secret Key** - The secret key for your Duo Admin API application. | ||
| 3. **API Hostname** - The API hostname for your Duo Admin API application, for example `api-xxxxxxxx.duosecurity.com`. | ||
|
|
||
| This guide walks you through creating a Duo Admin API application and connecting it to Nango. | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| - You must be a Duo administrator with the **Owner** role to create or update an Admin API application. | ||
|
|
||
| ### Instructions | ||
|
|
||
| #### Step 1: Find your Integration Key, Secret Key, and API Hostname | ||
|
|
||
| 1. Log in to the [Duo Admin Panel](https://admin.duosecurity.com/). | ||
| 2. Go to **Applications** > **Application Catalog**. | ||
|
|
||
| <img src="/api-integrations/cisco-duo-admin/applications_catalog.png"/> | ||
|
|
||
|
|
||
| 3. Add **Admin API** or open your existing **Admin API** application. | ||
|
|
||
| <img src="/api-integrations/cisco-duo-admin/admin-api-catalog.png" alt="Duo application catalog with the Admin API application" /> | ||
|
|
||
| 4. Configure the permissions your integration needs. | ||
| 5. Copy the **Integration key**, **Secret key**, and **API hostname** from the application details page. | ||
|
|
||
| <img src="/api-integrations/cisco-duo-admin/app_settings.png" /> | ||
|
|
||
|
|
||
| #### Step 2: Enter credentials in the Connect UI | ||
|
|
||
| Once you have your Duo Admin API credentials: | ||
| 1. Open the form where you need to authenticate with Cisco Duo Admin API. | ||
| 2. Enter your **Integration Key**, **Secret Key**, and **API Hostname** in their respective fields. | ||
| 3. Submit the form, and you should be successfully authenticated. | ||
|
|
||
|
|
||
|
|
||
| You are now connected to Cisco Duo Admin API. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duo signs POST parameters from an
application/x-www-form-urlencodedbody, but this provider only definesdateandauthorizationheaders, so POST/PUT requests with objectdataare sent as JSON by default whilebuildCanonicalParamssigns them as URL-encoded key/value pairs. That mismatch causes signature validation failures (e.g., 40103) on write endpoints unless every caller manually overrides headers/body format. Add provider-level form encoding (header + serialization path) so signed bytes match transmitted bytes.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The body format
formis not needed at the provider level because the proxy passes through the request body as-is; callers are expected to set the correct Content-Type headers and serialize the body themselves.