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

Support authenticating to targeted URLs #206

Open
ITler opened this issue Dec 14, 2022 · 0 comments
Open

Support authenticating to targeted URLs #206

ITler opened this issue Dec 14, 2022 · 0 comments
Labels

Comments

@ITler
Copy link

ITler commented Dec 14, 2022

Is your feature request related to a problem? Please describe.
I would want to check pages that can only respond with a 200 after authentication.
It would need to be ensured that tokens are sent only to the sites they belong to.
Also, credentials shouldn't be stored as plain text in a configuration file.

Describe the solution you'd like
I would like to see the possibility to provide a configuration like that:

auth:
  - site: <some site URL pattern>
    authType: basic
    userByEnvvar: <some envvar holding a user name>
    tokenByEnvvar: <some envvar holding a token>
  - site: <some other site URL pattern>
    authType: oauth2
    userByShellCommand: /path/to/my/script/retrieve-user.sh
    tokenByShellCommand: /path/to/my/script/retrieve-token.sh

Describe alternatives you've considered
There could be dozens of secret sources or auth types, but starting with reading credentials via envvars and allow basic and oauth2 authentication should provide a valuable first iteration.

Maybe in addition something like this might be suitable:

echo "github.com:oauth2:username:token;mysite.com:basic:username:password" | htmltest --auth - 

Additional context
Add any other context or screenshots about the feature request here.

@ITler ITler added the feature label Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant