This repository was archived by the owner on Dec 14, 2024. It is now read-only.
Fix common.py get_firewall_credentials#261
Open
connellyt wants to merge 1 commit intoPaloAltoNetworks:developfrom
Open
Fix common.py get_firewall_credentials#261connellyt wants to merge 1 commit intoPaloAltoNetworks:developfrom
connellyt wants to merge 1 commit intoPaloAltoNetworks:developfrom
Conversation
common.py was throwing several errors. The first was a local variable 'password' referenced before assignment. To resolve this, I defined the password variable before the get_firewall_credentials and added the global password statement. Once this was resolved, I received the message that no user or password were defined for the searchcommand. This wasn't accurate, but I found that the function was looking for 'Firewall``splunk_cred_sep``1' but should have been looking for: 'firewall``splunk_cred_sep``1'
|
🎉 Thanks for opening this pull request! We really appreciate contributors like you! 🙌 |
|
I ran into a similar issue. The problem turns out to be hardcoded assumptions. The script in common.py works IFF the "Account Name" in Splunk_TA_paloalto configuration page is set to "Firewall". This is case sensitive, just using "firewall" will cause it to fail. The documentation should be updated to specify that the "Account Name" cannot be arbitrarily chosen, but must be "Firewall in all cases." |
de4dfdc to
d7bd687
Compare
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
common.py was throwing several errors. The first was a local variable 'password' referenced before assignment. To resolve this, I defined the password variable before the get_firewall_credentials and added the global password statement.
Once this was resolved, I received the message that no user or password were defined for the searchcommand. This wasn't accurate, but I found that the function was looking for
'Firewall
splunk_cred_sep1'but should have been looking for:
'firewall
splunk_cred_sep1'Motivation and Context
Advanced features of the Palo Alto Networks App for Splunk will not work without these changes, as the features require authentication to the firewall with an API key. The current implementation cannot get that API.
How Has This Been Tested?
I tested this by running the commands found in the example for pantag and pancontentpack in our lab environment. This is on a Splunk 8.2.7.1 instance running on RHEL 7.9.
Types of changes
Checklist