Comments (6)
You can trigger Jobs via API: https://nautobot.readthedocs.io/en/stable/additional-features/jobs/#via-the-api
is it good enough?
from nautobot-app-ssot.
Unfortunately no as IP Fabric does not let you send custom responses. The endpoint receiving the webhooks must parse the data and then do automation against it.
https://ipfabric.atlassian.net/wiki/spaces/ND/pages/1456537601/Webhooks
from nautobot-app-ssot.
So, if don't understand it wrong, the problem is that you can't add "data" or custom authorization to the request.
Actually, "data" is optional, we could create a Job that assumes the defaults, but authorization is mandatory, for any API endpoint in Nautobot.
Isn't any way to add it in the webhook?
from nautobot-app-ssot.
Nautobot will need to process the webhook IP Fabric sends because it sends a message for every discovery action and status:
"action": "discover" | "clone" | "delete" | "download" | "load" | "unload", "status": "started" | "completed" | "failed" | "resumed" | "resumed (stopping)" | "stopped",
This will then possibly kick off an SSOT job for example when a snapshot action:delete/status:started which is incorrect. It needs to only kick off an SSOT job when action:discover, status:completed, requester:cron.
There is no way to add any authorization to the webhook. Nautobot will need to accept the event and verify the message:
The secret code is used to calculate the SHA256 HMAC payload hash which is sent inx-ipf-signature header. Using x-ipf-signature you can validate that request comes from correct server.
Full IP Fabric webhook message:
{ "type": "snapshot", "action": "discover" | "clone" | "delete" | "download" | "load" | "unload", "status": "started" | "completed" | "failed" | "resumed" | "resumed (stopping)" | "stopped", "reason"?: string, "requester": "cron" | "user:<id>", "snapshot"?: { "id": string, "name"?: string, "cloneId"?: string, "file"?: string, } "timestamp": number, "test"?: boolean }
from nautobot-app-ssot.
Just for kicks, worth exploring the roadmap of webhooks in IPF too. For example, being able to template the JSON body as in Nautobot make it very flexible! :)
https://nautobot.readthedocs.io/en/latest/models/extras/webhook/#jinja2-template-support
https://blog.networktocode.com/post/nautobot-webhooks/
from nautobot-app-ssot.
At this time changes to IP Fabric webhooks is not on the roadmap as our highest priorities is adding new vendor functionality.
from nautobot-app-ssot.
Related Issues (20)
- Add Documentation Around Job.run() Function HOT 2
- AttributeError: Manager isn't accessible via ContentType instances HOT 2
- Cannot install 2.4.0 ipfabric dependency in coordination with chatops and golden-config HOT 4
- relocate and/or add SSoT to Extensibility navbar item HOT 7
- Migrate Zero reversibility failures
- Contrib support for Custom Relationships one-to-many HOT 1
- Add a hook after loading but before adding to diffsync store for `NautobotAdapter`
- Allow for customization of `NautobotAdapter` loading on a per-model basis
- App Setting 'hide_example_jobs' when set to False does not show the example jobs
- [Infoblox] Tags and custom fields are not applied to Nautobot objects synced to/from Infoblox
- Installing SSoT App to existing Nautobot 2.1.5 installation fails migrations HOT 1
- `test_contrib_adapter.TestNestedRelationships` creates invalid data, fails upstream CI HOT 1
- Fresh install with all integrations disabled still creates every integrations custom fields from signals HOT 2
- pinning of drf-spectacular=0.26.3 incompatible with nautobot core
- VLAN locations are not synchronized HOT 5
- VLANs not properly associated with Prefixes HOT 4
- Improve Infoblox client peformance by replacing requests.request with requests.Session HOT 1
- Loading the IPAddress if Object Already Exists
- Log Diff Summary as JSON HOT 1
- ServiceNow 2.X fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nautobot-app-ssot.