-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
Description
Overview
- Introduced in
v0.9.6, we're currently onv0.10.7 - Validators are disabled by default
- Scytale's code interprets configured validator failures as something to either
- log a info/warning message and continue with the request or
- log an error and return a
400
- Only cd has validator enabled machines (i.e. scytale)
Available validators:
- always_invalid
- doesn't validate anything about the message and always returns an error
- always_valid
- doesn't validate anything about the message and always returns nil
- utf8
- validates that it contains UTF-8 strings
- msg_type
- validates the message's Type
- source
- validates the message's Source
- destination
- validates the message's Destination
- simple_res_req
- validates the message's Type is of SimpleRequestResponseMessageType
- simple_event
- validates the message's Type is of SimpleEventMessageType
- spans
- validates the message's Spans
- `An array of arrays of timing values as a list in the format: "parent" (string), "name" (string), "start time" (int), "duration" (int), "status" (int)
- validates the message's Spans
Integration Details
Integration Details
WRP validators are configured with the following (regardless of the application code) yaml:
# wrpValidators defines the wrp validators used to validate incoming wrp messages.
# (Optional)
# Available validator types: always_invalid, always_valid, utf8, msg_type, source, destination, simple_res_req, simple_event, spans
# Available validator levels: info, warning, error
# Validators can be disabled with `disable: true`, it is false by default
wrpValidators:
- type: utf8
level: warning
disable: true
- type: source
level: errorKey points:
- no validator is included by default
- a level is assigned to a given validator (default value is
unknownand it's consider invalid): info, warning, error - during a validation failure, the application code determines how the validator level is interpret
Currently, only cd has validator enabled scytales . This is the validator config:
wrpValidators:
- type: utf8
level: error
- type: msg_type
level: error
- type: destination
level: warning
- type: source
level: warningutf8andmsg_typevalidation errors are logged as errors and scytale returns a400destinationandsourcevalidation errors are logged as warnings (scytale continues with the request)
Pending Questions
- For
destinationdo want to allow destinations without dns: identifiers to go through? - Which validators should scytale use?
- For the selected validators, what level should be used?
Reactions are currently unavailable