-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Microsoft_defender_endpoint] Add support for Oauth2 scopes #5014
Conversation
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
🌐 Coverage report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
packages/microsoft_defender_endpoint/data_stream/log/agent/stream/httpjson.yml.hbs
Outdated
Show resolved
Hide resolved
packages/microsoft_defender_endpoint/data_stream/log/agent/stream/httpjson.yml.hbs
Outdated
Show resolved
Hide resolved
…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 |
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.yml
file.