Skip to content
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

Cherry-pick #18890 to 7.x: Add check on <no value> config option value for the azure input resource_manager_endpoint #19352

Merged
merged 1 commit into from
Jun 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add check on <no value> config option value for the azure input `re…
…source_manager_endpoint` (#18890)

* change

* update changelog

(cherry picked from commit 8dda6e1)
  • Loading branch information
narph committed Jun 24, 2020
commit 7b1d13b9c176dcb5c1ba9ec02745be014a7611a0
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)
}