Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmauth cannot start with empty configuration. #6467

Open
f41gh7 opened this issue Jun 12, 2024 · 1 comment
Open

vmauth cannot start with empty configuration. #6467

f41gh7 opened this issue Jun 12, 2024 · 1 comment
Assignees
Labels
bug Something isn't working vmauth

Comments

@f41gh7
Copy link
Contributor

f41gh7 commented Jun 12, 2024

Describe the bug

vmauth reports error if configuration file is empty. It makes impossible to start vmauth if it's needed to deploy it now and any configuration later.
Real world examples:

  • helm charts
  • victoria-metrics-operator

Current workaround for it:

  • provide "fake" config section record with random local port. Which potentially a security risk and may confuse users.
  • launch nginx server with vmauth and return static stab error.

It'd be great to accept empty configuration file and return UnAuthorized error for any request.

To Reproduce

Try to start vmauth with exists, but empty configuration file.

Version

Any version of vmauth.

Logs

No response

Screenshots

No response

Used command-line flags

No response

Additional information

No response

@f41gh7 f41gh7 added the bug Something isn't working label Jun 12, 2024
@hagen1778
Copy link
Collaborator

hagen1778 commented Jun 17, 2024

@f41gh7 would you mind describing scenario where this behavior will be essential?

I get it when vmalert or vmagent can be started without rules config or scrape config - they will just sit there, waiting to be utilized.

But with auth/reverse proxy it is different, from my perspective. Auth/reverse proxy supposed to be the only access point to resources, and without config it is not different to being just turned off. Even worse, it may confuse the user about wrong credentials when, in fact, there are no right credentials.

@f41gh7 f41gh7 self-assigned this Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vmauth
Projects
None yet
Development

No branches or pull requests

2 participants