Skip to content

Doppel API V2 Support: Add Client Credentials Support - #1344

Open
siddharths1-metron wants to merge 40 commits into
chronicle:mainfrom
metron-labs:feature/google-secops-doppel-api-v2-support
Open

siddharths1-metron wants to merge 40 commits into
chronicle:mainfrom
metron-labs:feature/google-secops-doppel-api-v2-support

Conversation

@siddharths1-metron

@siddharths1-metron siddharths1-metron commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Doppel API V2 Support: Add Client Credentials Support

Description

This PR adds Doppel API V2 Support to existing Doppel Integration.

What problem does this PR solve?
Allows Doppel Customers to use client credentials to setup the integration.

How does this PR solve the problem?
Adds Client Id and Client Secret in Config UI for Doppel Integration with supporting backend logic.


Checklist:

Please ensure you have completed the following items before submitting your PR.
This helps us review your contribution faster and more efficiently.

General Checks:

  • I have read and followed the project's contributing.md guide.
  • My code follows the project's coding style guidelines.
  • I have performed a self-review of my own code.
  • My changes do not introduce any new warnings.
  • My changes pass all existing tests.
  • I have added new tests where appropriate to cover my changes. (If applicable)
  • I have updated the documentation where necessary (e.g., README, API docs). (If applicable)

Open-Source Specific Checks:

  • My changes do not introduce any Personally Identifiable Information (PII) or sensitive customer data.
  • My changes do not expose any internal-only code examples, configurations, or URLs.
  • All code examples, comments, and messages are generic and suitable for a public repository.
  • I understand that any internal context or sensitive details related to this work are handled separately in internal systems (Buganizer for Google team members).

For Google Team Members and Reviewers Only:

  • I have included the Buganizer ID in the PR title or description (e.g., "Internal Buganizer ID: 123456789" or "Related Buganizer: go/buganizer/123456789").
  • I have ensured that all internal discussions and PII related to this work remain in Buganizer.
  • I have tagged the PR with one or more labels that reflect the pull request purpose.

Screenshots (If Applicable)

If your changes involve UI or visual elements, please include screenshots or GIFs here.
Ensure any sensitive data is redacted or generalized.


Further Comments / Questions

Any additional comments, questions, or areas where you'd like specific feedback.

@siddharths1-metron
siddharths1-metron requested review from a team and adarshtwy as code owners October 13, 2026 15:01
@google-cla

google-cla Bot commented Oct 13, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@siddharths1-metron

Copy link
Copy Markdown
Contributor Author

Hello @adarshtwy Just following up on the PR. Did you get a chance to take a look?

Thanks!

@github-actions
github-actions Bot requested a review from a team as a code owner October 19, 2026 14:26
@siddharths1-metron

Copy link
Copy Markdown
Contributor Author

Hi @adarshtwy, just checking in on the PR. Have you had a chance to review it? We have a number of mutual customers eagerly waiting for this release. Any ETA you could share based on your current bandwidth would be greatly appreciated.

Thanks!

Comment thread .python-version Outdated
@@ -0,0 +1 @@
3.11

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you please remove .python-version from the repository root so this PR stays scoped strictly to content/response_integrations/third_party/partner/doppel_vision/?

while preserving v1 API-key compatibility. Added Get Alerts page-size support,
improved Ping and configuration handling, and removed the deprecated Create Abuse
Alert action because its Doppel endpoint is no longer available.'
version: 8.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's prefix the release note description with the component name (Integration - ...) so it follows the standard {Component Name} - {Description} convention:

Suggested change
version: 8.0
description: "Integration - Added support for Doppel API v2 OAuth authentication (Client ID and Client Secret) while retaining backward compatibility with v1 API keys."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Committing this single-line suggestion in the GitHub UI replaced version: 8.0 on line 50 with a second description: key, leaving duplicate description keys and removing version: 8.0. Let's restore version: 8.0 and update the single description block on lines 44–49 to start with Integration - ....

param_name="Page Size",
input_type=str,
default_value="30",
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can collapse this call onto a single line (106 chars <= 120) and add an explicit type annotation on page_size since extract_action_param returns Any. Also, please add Page Size to the Get Alerts parameters table in resources/ai/actions_ai_description.yaml so the AI metadata stays in sync with GetAlerts.yaml.

Suggested change
)
page_size: str = siemplify.extract_action_param("Page Size", print_value=True, default_value="") or ""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Applying the suggestion directly on line 49 replaced only the closing ) while leaving lines 45–48 (page_size = siemplify.extract_action_param(...)) open, resulting in a SyntaxError. Please replace the full multi-line call (lines 45–49) with the single-line statement.

siemplify.end(
f"Failed to connect to the Doppel Vision server: {e}",
False,
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: this siemplify.end(...) call fits comfortably on a single line (83 chars <= 120):

Suggested change
)
siemplify.end(output_message, True, EXECUTION_STATE_COMPLETED)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Because this comment was anchored on the closing ) (line 27), committing the suggestion in the UI left the opening siemplify.end( on lines 24–26 unclosed (SyntaxError). Let's replace the entire siemplify.end(...) call (lines 24–27) with a single-line call.

siemplify.end(
f"Failed to connect to the Doppel Vision server: {e!s}",
False,
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: we can also keep this siemplify.end(...) call on a single line (85 chars <= 120):

Suggested change
)
siemplify.end(output_message, False, EXECUTION_STATE_FAILED)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Similarly here, committing the suggestion on line 32 replaced only the closing ) of siemplify.end( from lines 29–31 (SyntaxError). Please replace the entire multi-line call on lines 29–32.

api_key="org-key",
user_api_key="user-key",
org_code="ACM",
).get_auth_headers()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: this AuthProviderV1(...) call fits on a single line (108 chars <= 120) (and similarly for AuthProviderV2(...) on lines 45–47 at 105 chars):

Suggested change
).get_auth_headers()
provider = AuthProviderV1(api_key="org-key", user_api_key="user-key")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Applying the suggestion on line 19 replaced only the closing ).get_auth_headers() of headers = AuthProviderV1( from lines 15–18 (SyntaxError). Please replace the entire multi-line call on lines 15–19.

def test_existing_v1_config_without_new_fields_still_loads() -> None:
siemplify = MagicMock()

def extract(provider_name: str, param_name: str, **_kwargs):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add type annotations for **_kwargs and the return type on extract here (and on line 78):

Suggested change
def extract(provider_name: str, param_name: str, **_kwargs):
def extract(param_name: str, **_kwargs: object) -> str | None:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Removing provider_name: str from def extract(...) on line 54 causes del provider_name on line 55 to fail with F821 Undefined name provider_name (and siemplify.extract_configuration_param passes provider_name as its first positional argument). Let's keep provider_name: str in the signature: def extract(provider_name: str, param_name: str, **_kwargs: object) -> str | None:.

self.ok = 200 <= status_code < 300

def json(self):
return self._payload

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's parameterize payload: dict[str, object] | None = None on line 15 and add a return type annotation def json(self) -> dict[str, object]: on line 22.

self.ok = 200 <= status_code < 300

def json(self):
return self._payload

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Similarly here, let's parameterize payload: dict[str, object] on line 11 and annotate def json(self) -> dict[str, object]: on line 18.

return self.store.get((context_type, identifier, property_key))

def try_set_context_property(self, context_type, identifier, property_key, property_value):
self.store[(context_type, identifier, property_key)] = property_value

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add parameter and return type annotations to the helper methods on ContextStore (lines 19 and 22) and SetOnlyContextStore (lines 31 and 34), and collapse the single-line calls on lines 41–43 (113 chars) and 139–141 (102 chars).

siddharths1-metron and others added 7 commits November 3, 2026 17:57
…n/release_notes.yaml

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/actions/GetAlerts.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/actions/Ping.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/actions/Ping.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/actions/UpdateAlert.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/tests/test_core/test_auth.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/tests/test_core/test_config.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
siddharths1-metron and others added 18 commits November 3, 2026 18:00
…n/actions/UpdateAlert.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/actions/UpdateAlert.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/core/DoppelManager.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/core/DoppelManager.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/core/DoppelManager.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/core/DoppelManager.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/core/DoppelManager.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/core/alert_models.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/core/alert_models.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/core/auth_provider_v2.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/core/auth_provider_v2.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/core/config.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/core/config.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/core/config.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/core/config.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/core/config.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/core/token_cache.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
…n/core/http_client.py

Co-authored-by: Adarsh Tiwary <61533527+adarshtwy@users.noreply.github.com>
Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
Tighten types, docstrings, and IntegrationConfig construction so the Doppel v2 changes stay scoped and review-clean.

Signed-off-by: Siddharth Sabale <siddharth.sabale@metronlabs.com>
@siddharths1-metron

Copy link
Copy Markdown
Contributor Author

Hi @adarshtwy I have made the requested changes. Can you PTAL? Thanks!

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.

4 participants