-
Notifications
You must be signed in to change notification settings - Fork 25k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Watcher: Fix chain input toXcontent serialization (#31721)
The xcontent parameters were not passed to the xcontent serialization of the chain input for each chain. This could lead to wrongly stored watches, which did not contain passwords but only their redacted counterparts, when an input inside of a chain input contained a password.
- Loading branch information
Showing
3 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
...ck/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/30_with_chain_input.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
"Test get watch api with chained input and basic auth": | ||
- do: | ||
cluster.health: | ||
wait_for_status: yellow | ||
|
||
- do: | ||
xpack.watcher.put_watch: | ||
id: "my_watch" | ||
body: > | ||
{ | ||
"trigger": { | ||
"schedule": { | ||
"cron": "0 0 0 1 * ? 2099" | ||
} | ||
}, | ||
"input": { | ||
"chain": { | ||
"inputs": [ | ||
{ | ||
"http": { | ||
"http": { | ||
"request": { | ||
"url" : "http://localhost/", | ||
"auth": { | ||
"basic": { | ||
"username": "Username123", | ||
"password": "Password123" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"actions": { | ||
"logging": { | ||
"logging": { | ||
"text": "logging statement here" | ||
} | ||
} | ||
} | ||
} | ||
- do: | ||
xpack.watcher.get_watch: | ||
id: "my_watch" | ||
- match: { found : true} | ||
- match: { _id: "my_watch" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters