Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Add a validateConfig() API #183

Closed
mandarjog opened this issue Sep 11, 2019 · 2 comments
Closed

Add a validateConfig() API #183

mandarjog opened this issue Sep 11, 2019 · 2 comments

Comments

@mandarjog
Copy link
Contributor

A wasm extension implements onConfigure(std::unique_ptr<WasmData> configuration)
If configuration fails, there is no indication that something has gone wrong except a WARN message from the extension itself.

  1. onConfigure() should return a bool
  2. Add a validateConfig(std::unique_ptr<WasmData> configuration) API which is similar to onConfigure
    • It must do structural validation of the input configuration.
    • It must be stateless, must be a pure function and must not use the HOST api.

A WASM extension that supports validateConfig can be used outside the proxy as a config validator.

@mandarjog
Copy link
Contributor Author

@kyessenov @douglas-reid

@kyessenov
Copy link
Contributor

What happens if config is invalid? Should we reject LDS?

jplevyak added a commit to jplevyak/envoy-wasm that referenced this issue Sep 13, 2019
jplevyak added a commit that referenced this issue Sep 18, 2019
…#190)

* Add a bool return from onConfigure and add onValidateConfiguration().
#183

Signed-off-by: John Plevyak <jplevyak@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants