Skip to content

feat(identity): Add Datadog identity provider (OAuth2 + PKCE)#117035

Draft
srest2021 wants to merge 7 commits into
srest2021/CW-1467from
srest2021/CW-1469
Draft

feat(identity): Add Datadog identity provider (OAuth2 + PKCE)#117035
srest2021 wants to merge 7 commits into
srest2021/CW-1467from
srest2021/CW-1469

Conversation

@srest2021

@srest2021 srest2021 commented Jun 5, 2026

Copy link
Copy Markdown
Member

Depends on #117026

  • Adds DatadogIdentityProvider, an OAuth2 identity provider for Datadog using PKCE
  • Credentials (client_id, client_secret) sourced from sentry-options (datadog.client-id, datadog.client-secret), registered as a Developer Platform OAuth app in Datadog

@linear-code

linear-code Bot commented Jun 5, 2026

Copy link
Copy Markdown

CW-1469

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 5, 2026
@srest2021 srest2021 changed the title add datadog identity provider feat(identity): Add Datadog identity provider (OAuth2 + PKCE) Jun 5, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Backend Test Failures

Failures on 7cac1d3 in this run:

tests/sentry/identity/datadog/test_provider.py::DatadogOAuth2CallbackViewTest::test_exchange_token_successlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/identity/datadog/test_provider.py:105: in test_exchange_token_success
    assert result["access_token"] == "pkce-token"
           ^^^^^^^^^^^^^^^^^^^^^^
E   KeyError: 'access_token'
tests/sentry/identity/datadog/test_provider.py::DatadogOAuth2CallbackViewTest::test_exchange_token_no_code_verifierlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/identity/datadog/test_provider.py:120: in test_exchange_token_no_code_verifier
    assert result["error"] == "pkce_missing"
E   AssertionError: assert 'Missing pipeline state' == 'pkce_missing'
E     
E     �[0m�[91m- pkce_missing�[39;49;00m�[90m�[39;49;00m
E     �[92m+ Missing pipeline state�[39;49;00m�[90m�[39;49;00m
tests/sentry/identity/datadog/test_provider.py::DatadogOAuth2LoginViewTest::test_preserves_standard_oauth_paramslog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/identity/datadog/test_provider.py:55: in test_preserves_standard_oauth_params
    response = self.view.dispatch(self.request, pipeline)
               ^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/functools.py:1039: in __get__
    val = self.func(instance)
          ^^^^^^^^^^^^^^^^^^^
tests/sentry/identity/datadog/test_provider.py:38: in view
    return DatadogOAuth2LoginView(
E   TypeError: DatadogOAuth2LoginView.__init__() got an unexpected keyword argument 'client_id'
tests/sentry/identity/datadog/test_provider.py::DatadogOAuth2CallbackViewTest::test_login_to_callback_preserves_code_verifierlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/identity/datadog/test_provider.py:135: in test_login_to_callback_preserves_code_verifier
    login_view = DatadogOAuth2LoginView(
E   TypeError: DatadogOAuth2LoginView.__init__() got an unexpected keyword argument 'client_id'
tests/sentry/identity/datadog/test_provider.py::DatadogOAuth2LoginViewTest::test_includes_pkce_paramslog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/identity/datadog/test_provider.py:44: in test_includes_pkce_params
    response = self.view.dispatch(self.request, pipeline)
               ^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/functools.py:1039: in __get__
    val = self.func(instance)
          ^^^^^^^^^^^^^^^^^^^
tests/sentry/identity/datadog/test_provider.py:38: in view
    return DatadogOAuth2LoginView(
E   TypeError: DatadogOAuth2LoginView.__init__() got an unexpected keyword argument 'client_id'

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

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant