Skip to content

Comments

[9.3](backport #43933) x-pack/filebeat/input/salesforce: Add optional token_url support for JWT Bearer Flow authentication#48471

Open
mergify[bot] wants to merge 6 commits into9.3from
mergify/bp/9.3/pr-43933
Open

[9.3](backport #43933) x-pack/filebeat/input/salesforce: Add optional token_url support for JWT Bearer Flow authentication#48471
mergify[bot] wants to merge 6 commits into9.3from
mergify/bp/9.3/pr-43933

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Jan 19, 2026

Proposed commit message

This PR adds optional support for a separate token_url configuration in the Salesforce input's JWT Bearer Flow authentication.

Currently, when using JWT authentication in the Salesforce integration, the url configuration is used for both:

  1. The audience claim (aud) in the JWT
  2. The token endpoint to request the access token from

However, some users have custom Salesforce domains or have disabled logins for the default endpoints (https://login.salesforce.com or https://test.salesforce.com). In these cases, the audience URL and the token endpoint URL need to be different.

The new optional configuration is:

var.authentication:
  jwt_bearer_flow:
    enabled: true
    client.id: "my-client-id"
    client.username: "my.email@here.com"
    client.key_path: client_key.pem
    url: https://login.salesforce.com           # Audience URL for JWT claim
    token_url: "https://custom-domain.my.salesforce.com"  # Optional: Token endpoint URL**Behavior:**
- If `token_url` is **not provided**: The `url` value is used for both the JWT audience claim and the token endpoint (existing behavior)
- If `token_url` is **provided**: The `url` is used for the JWT audience claim, and `token_url` is used for the token endpoint

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works. Where relevant, I have used the stresstest.sh script to run them under stress conditions and race detector to verify their stability.
  • I have added an entry in ./changelog/fragments using the changelog tool.

Related issues

…r JWT Bearer Flow authentication (#43933)

(cherry picked from commit 00e189e)
@mergify mergify bot added the backport label Jan 19, 2026
@mergify mergify bot requested review from a team as code owners January 19, 2026 18:48
@mergify mergify bot assigned shmsr Jan 19, 2026
@mergify mergify bot requested review from AndersonQ and VihasMakwana and removed request for a team January 19, 2026 18:48
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jan 19, 2026
@github-actions
Copy link
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@github-actions github-actions bot added Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team Team:Obs-InfraObs Label for the Observability Infrastructure Monitoring team labels Jan 19, 2026
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jan 19, 2026
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@mergify
Copy link
Contributor Author

mergify bot commented Jan 25, 2026

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b mergify/bp/9.3/pr-43933 upstream/mergify/bp/9.3/pr-43933
git merge upstream/9.3
git push upstream mergify/bp/9.3/pr-43933

@mergify
Copy link
Contributor Author

mergify bot commented Jan 26, 2026

This pull request has not been merged yet. Could you please review and merge it @shmsr? 🙏

Resolve merge conflict in go.mod:
- Keep newer go-sfdc for token_url feature
- Keep mito v1.24.1 from 9.3 branch
@mergify
Copy link
Contributor Author

mergify bot commented Feb 2, 2026

This pull request has not been merged yet. Could you please review and merge it @shmsr? 🙏

@shmsr shmsr enabled auto-merge (squash) February 5, 2026 11:57
@mergify
Copy link
Contributor Author

mergify bot commented Feb 9, 2026

This pull request has not been merged yet. Could you please review and merge it @shmsr? 🙏

1 similar comment
@mergify
Copy link
Contributor Author

mergify bot commented Feb 16, 2026

This pull request has not been merged yet. Could you please review and merge it @shmsr? 🙏

@mergify
Copy link
Contributor Author

mergify bot commented Feb 23, 2026

This pull request has not been merged yet. Could you please review and merge it @shmsr? 🙏

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

Labels

backport Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team Team:Obs-InfraObs Label for the Observability Infrastructure Monitoring team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants