Skip to content

Commit

Permalink
Add check on <no value> config option value for the azure input `re…
Browse files Browse the repository at this point in the history
…source_manager_endpoint` (#18890) (#19352)

* change

* update changelog

(cherry picked from commit 8dda6e1)
  • Loading branch information
narph authored Jun 25, 2020
1 parent 1374deb commit eaa4725
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ happened. {issue}13920[13920] {pull}18223[18223]
- With the default configuration the cef and panw modules will no longer send the `host`
field. You can revert this change by configuring tags for the module and omitting
`forwarded` from the list. {issue}13920[13920] {pull}18223[18223]
- Adds check on `<no value>` config option value for the azure input `resource_manager_endpoint`. {pull}18890[18890]
- Okta module now requires objects instead of JSON strings for the `http_headers`, `http_request_body`, `pagination`, `rate_limit`, and `ssl` variables. {pull}18953[18953]
- Adds oauth support for httpjson input. {issue}18415[18415] {pull}18892[18892]

Expand Down
2 changes: 1 addition & 1 deletion x-pack/filebeat/input/azureeventhub/eph.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (a *azureInput) runWithEPH() error {

func getAzureEnvironment(overrideResManager string) (azure.Environment, error) {
// if no overrride is set then the azure public cloud is used
if overrideResManager == "" {
if overrideResManager == "" || overrideResManager == "<no value>" {
return azure.PublicCloud, nil
}
if env, ok := environments[overrideResManager]; ok {
Expand Down
4 changes: 4 additions & 0 deletions x-pack/filebeat/input/azureeventhub/eph_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,8 @@ func TestGetAzureEnvironment(t *testing.T) {
resMan = "http://management.invalidhybrid.com/"
env, err = getAzureEnvironment(resMan)
assert.Errorf(t, err, "invalid character 'F' looking for beginning of value")
resMan = "<no value>"
env, err = getAzureEnvironment(resMan)
assert.NoError(t, err)
assert.Equal(t, env, azure.PublicCloud)
}

0 comments on commit eaa4725

Please sign in to comment.