Add custom http destination handler for consolidated audit event destinations
There is 1 validation and 1 helper method pending for custom http destination handler:
- Validation for
secret_token
and generating it if not provided, it is a little bit different fromaws
andgcp
as in them, the user necessarily should provide asecret_token
but in case of http, secret_token is optional and if not provided, we generate it ourselves. Also, in case of aws and gcp, we do not returnsecret_token
in query api but since for http it is generated by us, so it should be returned in response of query api for the destination. Reference MR: !143914 (merged) - Http destinations also allows custom headers to be added for the destination. A method for getting the list of
headers
need to be added, some work has been done in !165160 (merged).
Verification Steps:
- Ability to create instance and group level external audit event streaming destinations: !147888 (merged)
- Check the validation: !143914 (comment 2162193641)
- Validate headers hash: !143914 (comment 2162193641)
Verify
- Config is validated per each destination (aws, gcp, http)
- Secret token is required for gcp and aws, but not http; if it is not passed, one is generated.
- Secret token, when queried for, is not returned for gcp and aws, and is for http.
- No two instance destinations can share the same url
- Two distinct groups can use the same url
- Secret token for http category is passed automatically by headers, and cannot be overwritten
- Only 'active' headers are returned
Edited by Andrew Jung