Use basic/token auth when doing explicitly constructed requests#110
Use basic/token auth when doing explicitly constructed requests#110chrisberkhout wants to merge 2 commits intoelastic:devfrom
Conversation
efd6
left a comment
There was a problem hiding this comment.
Not LGTM.
This behaviour is intentional and this change would be a breaking change.
Yeah, I probably should have opened an issue rather than a PR for the discussion, but I think the current state of some types of authentication configuration only applying to subsets of requests is confusing for the user and something that adds effort to work around. If we're going to leave it as is, we should probably mention it in the CEL input's options documentation. I saw the We could add an option like |
If it's not there (it's not), then by all means. I'd suggest that there be some text here to indicate where it works, linking also to here where it is fully specified.
Knobs are bad; people use them. |
Use the basic/token auth configuration not just for direct requests
(e.g.
get('http://www.example.com/'), but also when doing explicitlyconstructed requests (e.g.
get_request(...).do_request()orrequest("GET", ...).do_request()).This matches the behavior of the
auth.oauth2configuration, which applies to all requests.It means that the choice of whether to apply basic/token auth automatically by configuration or explicitly in CEL is separate from the choice of how to construct requests in general.
Related:
Related in beats: