You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The option is missing that the credentials going to be passed as header params as well or even better to use the automatic function from the oauth2 package. (oauth2 package - golang.org/x/oauth2 - Go Packages)
x-pack->filebeat->input->httpjson->config_auth.go
LINE 25:
// authStyleInParams sends the "client_id" and "client_secret" in the POST body as application/x-www-form-urlencoded parameters.
const authStyleInParams = 1
Change to Auto Detection
// authStyleAutoDetect sets the autodetection either the client credentials are send as BODY params or HEADER params
const authStyleAutoDetect = 0
The passing of the required client credentials is to strict, because the param validator checks the client secret as well. But the client secret can be empty too and even still valid for oauth2 access process.
x-pack->filebeat->input->httpjson->config_auth.go
LINE 216:
Exclude client secret from validator [ o.ClientSecret == "" ] and adjust error message
case oAuth2ProviderDefault:
if o.TokenURL == "" || o.ClientID == "" {
return errors.New("both token_url and client.id credentials must be provided")
}
if (o.User != "" && o.Password == "") || (o.User == "" && o.Password != "") {
return errors.New("both user and password credentials must be provided")
}
...
Describe a specific use case for the enhancement or feature:
We have an oauth2 service which supports passing the parameter by header only and not by params in the body.
Furthermore the required credentials for the client contains a id and an empty secret.
The text was updated successfully, but these errors were encountered:
Describe the enhancement:
x-pack->filebeat->input->httpjson->config_auth.go
LINE 25:
Change to Auto Detection
x-pack->filebeat->input->httpjson->config_auth.go
LINE 216:
Exclude client secret from validator [
o.ClientSecret == ""
] and adjust error messageDescribe a specific use case for the enhancement or feature:
We have an oauth2 service which supports passing the parameter by header only and not by params in the body.
Furthermore the required credentials for the client contains a id and an empty secret.
The text was updated successfully, but these errors were encountered: