The patch actually had a different name on my webserver, I've fixed that now, sorry 😞 Also, for the latest (as of sept) splunk app, the update functions and changes are the same if you want to add "fixed/static" proxy entries. I'm currently testing to make sure is actually correct but I'm hopeful 🙂 In the function validate_arguments def validate_arguments(ikey: str, skey: str, host: str, interval: int, offset_seconds: int=-140):
"""
Ensures that the provided credentials have access to different log types
Also check that the interval is >= 120 seconds to avoid rate limiting.
:param ikey: Integration key of Admin Panel API
:param skey: Secret key of Admin Panel API
:param host: Host of Admin Panel API
:param interval: How often Splunk runs this input script, in seconds.
:param offset_seconds: Number of seconds to subtract from current time, for the validation
request
"""
if interval < 120:
LOGGER.error("The interval must be greater than or equal to 120 seconds")
print_error('The interval must be greater than or equal to 120 seconds')
raise ValueError("The interval must be greater than or equal to 120 seconds")
admin = duo_client.admin.Admin(ikey=ikey, skey=skey, host=host)
if host == LOCAL_API_HOST:
admin.ca_certs = "DISABLE"
# Update the bellow to set a fixed proxy server
admin.set_proxy("proxyserver","proxyport")
current_unix_ts = int(time.time())
and then in the function run_script a little further down def run_script():
"""
Method will instantiate a duo_client.Admin object with the configured
ikey/skey/api_host. In addition, it will call each log collector class to
poll the Duo adminapi for JSON encoded data that gets written to stdout.
"""
LOGGER.info("Getting input configuration.")
config, splunk_session_key = get_config()
LOGGER.info("Configuration processing completed. Setting LOGGER level for %s to %s",
config['name'], config['logging_level'])
LOGGER.setLevel(config['logging_level'])
splunk_session_args = {
'token': splunk_session_key,
'user': 'nobody',
'app': 'duo_splunkapp'
}
local_mode: bool = config['api_host'] == LOCAL_API_HOST
admin_api = duo_client.Admin(
ikey=config['ikey'],
skey=config['skey'],
host=config['api_host'],
ca_certs="DISABLE" if local_mode else None,
digestmod=hashlib.sha512
)
# Update the bellow to set a fixed proxy server
admin_api.set_proxy("proxyserver","proxyport")
Once this is done I will attempt to make a patch file that allows you to specify a proxy server and port via the UI. Hopefully this is enough to get anyone rolling with the new version.
... View more