VictoriaMetrics/app/vmauth
Aliaksandr Valialkin db85744e04
app/vmauth: follow-up for b155b20de4
- Use exact matching by default for the query arg value provided via arg=value syntax at src_query_args.
  Regex matching can be enabled by using =~ instead of = . For example, arg=~regex.
  This ensures that the exact matching works as expected without the need to escape special regex chars.

- Add helper functions for creating QueryArg, Header and Regex structs in tests.
  This improves maintainability of the tests.

- Remove url.QueryUnescape() call on the url in TestCreateTargetURLSuccess(), since this is bogus approach.
  The url.QueryUnescape() must be applied to individual query args, and it mustn't be applied to the whole url,
  since in this case it may perform invalid unescaping in the context of the url, or make the resulting url invalid.

While at it, properly marshal all the fields inside UserInfo config to yaml in tests.
Previously Header and QueryArg structs were improperly marshaled because the custom MarshalYAML
is called only on pointers to Header and QueryArg structs. This improves test coverage.

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6070
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6115
2024-04-17 14:27:52 +02:00
..
deployment app/vmauth: add initial version of vmauth. See https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/app/vmauth/README.md for details 2020-05-05 10:54:17 +03:00
multiarch all: run apk update && apk upgrade in base Alpine Docker image in order to get all the recent security fixes 2023-02-09 14:01:32 -08:00
auth_config.go app/vmauth: follow-up for b155b20de4 2024-04-17 14:27:52 +02:00
auth_config_test.go app/vmauth: follow-up for b155b20de4 2024-04-17 14:27:52 +02:00
example_config.yml app/vmauth: adds metric_labels and backend_errors counter (#5585) 2024-01-21 04:40:52 +02:00
example_config_ent.yml vmauth: add browser authorization request for http requests without… (#5234) 2023-11-01 20:59:46 +01:00
main.go app/vmauth: follow-up for b155b20de4 2024-04-17 14:27:52 +02:00
main_test.go app/vmauth: retry requests at other backends on 5xx response status codes 2023-09-08 00:46:37 +02:00
Makefile all: add makefile rules for GOARCH=s390x for all the VictoriaMetrics components 2023-02-26 12:36:51 -08:00
README.md docs: convert png images to webp in all the docs except of docs/operator/* 2023-11-22 19:21:00 +02:00
target_url.go app/vmauth: follow-up for b155b20de4 2024-04-17 14:27:52 +02:00
target_url_test.go app/vmauth: follow-up for b155b20de4 2024-04-17 14:27:52 +02:00

See vmauth docs here.

vmauth docs can be edited at docs/vmauth.md.