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

VMUser introduce an option for backend authorization. #669

Closed
f41gh7 opened this issue Jun 18, 2023 · 4 comments
Closed

VMUser introduce an option for backend authorization. #669

f41gh7 opened this issue Jun 18, 2023 · 4 comments
Labels
enhancement New feature or request TBD To Be Done

Comments

@f41gh7
Copy link
Collaborator

f41gh7 commented Jun 18, 2023

It would be great to have an option to define Bearer token or Basic Auth configuration for targets.

For instance:

kind: VMUser
  spec
    targetRefs:
     paths:
     - static:
       - ursl: [http://host1:8429,http://host2:8429,http://host3:8429]
       basicAuth:
        password:
          key: password
          name: secretname
        username:
          key: username
         name: secretname

Must produce following vmauth config with Authorization header:

users:
- username: "user"
  password: "***"
  headers:
  - Authorization: Basic BASE64_ENCODED_VALUE
  url_prefix:
  - "http://host1:8429/"
  - "http://host2:8429/"
  - "http://host3:8429/"

It's safe to store headers at configuration file, since it uses secure kubernetes secret.

For multiple, url_map headers should be used.

Related issue VictoriaMetrics/VictoriaMetrics#4361

@f41gh7 f41gh7 added the enhancement New feature or request label Jun 18, 2023
@hagen1778 hagen1778 added the TBD To Be Done label Jul 14, 2023
@mohammadkhavari
Copy link
Contributor

Can I send a pull request for this feature?

@Haleygo
Copy link
Contributor

Haleygo commented Jul 20, 2023

Can I send a pull request for this feature?

Feel free)

mohammadkhavari added a commit to mohammadkhavari/operator that referenced this issue Apr 16, 2024
…vmauth config generation

backend basic authentication support on vmuser to add them as header on vmauth configuration it will satisfy the basicauth authorization for bellow issue
VictoriaMetrics#669

* add docs

* add test
mohammadkhavari added a commit to mohammadkhavari/operator that referenced this issue Apr 16, 2024
…vmauth config generation

backend basic authentication support on vmuser to add them as header on vmauth configuration it will satisfy the basicauth authorization for bellow issue
VictoriaMetrics#669

* add docs

* add test
f41gh7 pushed a commit that referenced this issue Apr 17, 2024
…vmauth config generation (#714)

backend basic authentication support on vmuser to add them as header on vmauth configuration it will satisfy the basicauth authorization for bellow issue
#669

* add docs

* add test
@hagen1778
Copy link
Contributor

@Haleygo @f41gh7 I see this FR was implemented in operator repo. Should we close this ticket as done or follow-up in vmauth is required?

@Haleygo
Copy link
Contributor

Haleygo commented May 13, 2024

@Haleygo @f41gh7 I see this FR was implemented in operator repo. Should we close this ticket as done or follow-up in vmauth is required?

Yes, #714 provides field TargetRefBasicAuth in vmuser, it builds seperated header with authorization token for each target, close this issue as completed.
And according to this comment, no further move is needed in vmauth.

@Haleygo Haleygo closed this as completed May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request TBD To Be Done
Projects
None yet
Development

No branches or pull requests

4 participants