Skip to content
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

Fix PaloaltoArp to only show netloc part of URL in log messages #1

Open
wants to merge 6 commits into
base: rest-api-management-profile
Choose a base branch
from

Conversation

jorund1
Copy link
Owner

@jorund1 jorund1 commented Nov 29, 2024

Fixes Uninett#3251

Prior to this commit, the netboxes handled by the PaloaltoArp
ipdevpoll plugin used to be configured in the `ipdevpoll.conf`
configuration file, but since the netboxes the plugin wants to
handle (i.e. collect Arp information from) already should reside in
the NAV database, this configuration is now instead done through the
SeedDB tool by assigning a HTTP_API ManagementProfile (with `service`
set `Palo Alto ARP` and api_key set to some secret API key) to the
netboxes to be handled.

The prior way to configure the netboxes handled by the PaloAltoArp
plugin implicitly only allowed one API key per netbox (both enforced
in code but also by the configuration syntax). With
ManagementProfiles, it is perfectly possible to assign multiple
profiles (e.g. configurations) of the same type but with different
parameters (e.g. API keys) to the same netbox. Hence the new way to
configure the netboxes allow many API keys per netbox. Thus the
semantics of the plugin must change a little: For any given netbox,
the plugin now assumes there may be multiple API keys, and uses the
ARP results of first API key for which the _do_request method returns
a successful response.

IMPORTANT:
This commit removes the ability to configure the netboxes
handled by the PaloaltoArp plugin the NAV version 5.10 - 5.11 way
through the `[paloaltoarp]` section in the `ipdevpoll.conf`
configuration file.
...to make sure the logging granularity is per instance
Copy link

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 318 0 7.19s
✅ PYTHON ruff 317 0 0.06s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

Copy link

Test results

       9 files         9 suites   8m 17s ⏱️
2 157 tests 2 157 ✔️ 0 💤 0
4 053 runs  4 053 ✔️ 0 💤 0

Results for commit 7060888.

@jorund1 jorund1 force-pushed the rest-api-management-profile branch from c56ef5e to 05ec033 Compare December 6, 2024 08:44
@lunkwill42 lunkwill42 force-pushed the rest-api-management-profile branch from 05ec033 to c5ab32e Compare December 6, 2024 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant