Skip to content

Sanchaga/pr 37 reviewbottest - #40

Open
sanchaga-splunk wants to merge 3 commits into
mainfrom
sanchaga/pr-37-reviewbottest
Open

Sanchaga/pr 37 reviewbottest#40
sanchaga-splunk wants to merge 3 commits into
mainfrom
sanchaga/pr-37-reviewbottest

Conversation

@sanchaga-splunk

Copy link
Copy Markdown

Features

List any features you're adding to this app (e.g. new actions, parameters, auth methods, etc.)

Bug Fixes

Describe any bugs you've fixed in this app, and how they were fixed

Manual Documentation

Have you made any changes that should be documented in manual_readme_content.md?

The following changes require documentation in manual_readme_content.md:

  • New, updated, or removed REST handlers
  • New, updated, or removed authentication methods, especially complex methods like OAuth
  • Compatibility considerations with respect to deployment types (e.g. actions that cannot be run on cloud or an automation broker)
  • I have verified that manual documentation has been updated where appropriate

Other information


Please refer to our Contribution Guide for any questions on submitting a pull request.

Thanks for contributing!

Comment thread zscaler_connector.py
@@ -298,27 +307,121 @@ def _obfuscate_api_key(self, api_key):
return now, key

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue: _init_session() is called from initialize(), which is invoked before every action including test_connectivity.

Suggested fix: In the test_connectivity handler, after _init_session succeeds with OAuth, make at least one authenticated API call (e.g.

Comment thread zscaler_connector.py

self._sandbox_base_url = config.get("sandbox_base_url", None)
if self._sandbox_base_url:
self._sandbox_base_url = self._sandbox_base_url.rstrip("/")

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue: self._use_oauth = self._oauth_token_url is not None and self._oauth_client_id is not None and self._oauth_client_secret is not None — if only one or two OAuth fields are set, _use_oauth is False and the connector silently falls back to API-key auth.

Suggested fix: In initialize(), after computing _use_oauth, add an explicit check: if not _use_oauth and any of (self._username, self._password, self._api_key) is None, call set_status(APP_ERROR, 'No complete authentication method configured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant