[Microsoft_defender_endpoint] Add support for Oauth2 scopes - #5014
Merged
Conversation
|
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
🌐 Coverage report
|
efd6
approved these changes
Jan 16, 2023
efd6
left a comment
Contributor
There was a problem hiding this comment.
It would be helpful if the commit message explains the rationale for making scopes != null v oauth2.provider = azure disjoint. I can see in httpjson why this is done, but it's otherwise sort of surprising. An explanation of the flow that's being used would do this.
…eam/httpjson.yml.hbs Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>
|
Package microsoft_defender_endpoint - 2.8.0 containing this change is available at https://epr.elastic.co/search?package=microsoft_defender_endpoint |
orestisfl
pushed a commit
to orestisfl/integrations
that referenced
this pull request
May 15, 2026
…5014) * [Microsoft_defender_endpoint] Add support for Oauth2 scopes * update changelog * removing unecessary argument from foreach loop * Update packages/microsoft_defender_endpoint/data_stream/log/agent/stream/httpjson.yml.hbs Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com> Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Some customers uses a different Oauth2 authentication flow, so I will keep the original Azure resource implementation while adding the optional support for Oauth2 scopes.
When a scope is defined, it will negate these two lines in httpjson:
The reason for this is the difference in Oauth2 flow, and the expected URL parameters and POST body format used. The earlier API versions was dependent on the concept of providing resources, and the provider parameter is simply used by the Golang Oauth2 library to provide certain Azure specific features.
Once the API changed, it now only requires Oauth2 scopes to provided instead of resources. We still want to support both for the people that are still using the old version, and if we can determine when/if the old way is deprecated, we can switch to scopes being the default option.
Checklist
changelog.ymlfile.