Skip to content

[Buganizer ID: 529765313] Azure Security Center: Make endpoint roots configurable for sovereign clouds - #1180

Open
patilgp-oss wants to merge 4 commits into
mainfrom
fix-529765313-azure-security-center
Open

[Buganizer ID: 529765313] Azure Security Center: Make endpoint roots configurable for sovereign clouds#1180
patilgp-oss wants to merge 4 commits into
mainfrom
fix-529765313-azure-security-center

Conversation

@patilgp-oss

Copy link
Copy Markdown

Description

What problem does this PR solve?

Resolves b/529765313: The Azure Security Center integration previously used hardcoded commercial Microsoft URLs (login.microsoftonline.com, management.azure.com, graph.microsoft.com), preventing customers in Azure sovereign/government clouds (such as Azure US Government, Azure China) or behind enterprise forward proxy gateways from using the integration.

How does this PR solve the problem?

  1. Exposes three configurable, optional-with-defaults root parameters across definition.yaml, connector, actions, and job definitions:
    • Login API Root (Default: https://login.microsoftonline.com)
    • API Root (Default: https://management.azure.com)
    • Graph API Root (Default: https://graph.microsoft.com)
  2. Updates AzureSecurityCenterManager, action entrypoints, connector execution, and token renewal background job to dynamically calculate authentication scopes ({api_root}/.default and {graph_api_root}/.default) and construct endpoints dynamically.
  3. Adds comprehensive unit test suite in tests/test_manager.py covering default endpoints, custom sovereign cloud endpoints, and token generation.
  4. Bumps integration version to 18.0 with updated release_notes.yaml and pyproject.toml.

Any other relevant information:

  • Tested on local Chronicle SOAR instance against default commercial endpoints and custom sovereign routes.
  • Fully backward compatible with existing installations.

Checklist:

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.
  • I have updated the documentation where necessary (release_notes.yaml, definition.yaml).

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.

For Google Team Members and Reviewers Only:

  • I have included the Buganizer ID in the PR title or description (Related Buganizer: b/529765313).
  • I have ensured that all internal discussions and PII related to this work remain in Buganizer.

@patilgp-oss
patilgp-oss requested a review from a team as a code owner August 25, 2026 08:00
@github-actions

Copy link
Copy Markdown

Marketplace Validation Failed

Click to view the full report

Validation Report

🧩 Integrations

azure_security_center

Validation Name Details
⚠️ Uv Lock Error happened while executing a command: uv lock --check: Using CPython 3.11.16 interpreter at: /opt/hostedtoolcache/Python/3.11.16/x64/bin/python Resolved 57 packages in 386ms error: The lockfile at uv.lock needs to be updated, but --check was provided. hint: To update the lockfile, run uv lock.
⚠️ SSL Connectors Validation - The default value of the 'Verify SSL' param in Azure Security Center - Security Alerts Connector must be a boolean true
⚠️ JSON Result Example Validation Actions with JSON results missing example files in resources/: GetOAuthRefreshToken, ListRegulatoryStandardControls, ListRegulatoryStandards
⚠️ Test Config Validation 'azure_security_center' is missing tests/config.json

@github-actions

Copy link
Copy Markdown

Marketplace Validation Failed

Click to view the full report

Validation Report

🧩 Integrations

azure_security_center

Validation Name Details
⚠️ Uv Lock Error happened while executing a command: uv lock --check: Using CPython 3.11.16 interpreter at: /opt/hostedtoolcache/Python/3.11.16/x64/bin/python Resolved 57 packages in 229ms error: The lockfile at uv.lock needs to be updated, but --check was provided. hint: To update the lockfile, run uv lock.
⚠️ SSL Connectors Validation - The default value of the 'Verify SSL' param in Azure Security Center - Security Alerts Connector must be a boolean true
⚠️ JSON Result Example Validation Actions with JSON results missing example files in resources/: GetOAuthRefreshToken, ListRegulatoryStandardControls, ListRegulatoryStandards
⚠️ Test Config Validation 'azure_security_center' is missing tests/config.json

- Added 'Login API Root', 'API Root', and 'Graph API Root' configuration parameters.
- Replaced hardcoded Microsoft endpoints with configurable parameters across actions, connector, background job, and manager.
- Added unit tests covering default and custom endpoints.
- Bumped integration version to 18.0.
…nter

- Updated Verify SSL default value in connector and definition YAML to true.
- Standardized JsonResult example file names and paths in actions and resources.
- Added GetOAuthRefreshToken JsonResult example.
- Added tests/config.json configuration file.
- Updated uv.lock for version 18.0.
- Added type hints and docstrings in tests/test_manager.py.
@patilgp-oss
patilgp-oss force-pushed the fix-529765313-azure-security-center branch from 61b6b46 to c41281a Compare August 26, 2026 07:33
- Wrapped long lines in ENDPOINTS dict in consts.py.
- Fixed imports, type annotations, and ruff directives in tests/test_manager.py.

@nitishgangal-ind nitishgangal-ind left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@patilgp-oss - Added few minor comments. Could you please take a look ? Thank you!

- Update verify_ssl fallback to True in RefreshTokenRenewalJob._build_manager_for_instance to align with definition.yaml default.
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.

2 participants