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

Add basic auth generator function #873

Merged
merged 6 commits into from
Nov 19, 2022

Conversation

MatteoVoges
Copy link
Contributor

Proposed Changes

  • Added a generator function for basic auth secrets

Usage

The generator function has two optional arguments: ?{ref:path/to/secret||basicauth:username:password}
If the arguments are not specified, a text-string containing 8 characters will be generated.

Examples

  • ||basicauth could generate something like dddkfrgl:DDwlFByq as username:password - token
    NOTE: The secret itself is base64 encoded so it will look like ZGRka2ZyZ2w6RER3bEZCeXE=
  • |basicauth:user123:key123 would exactly generate user123:key123 as token, so the secret (base64) would be dXNlcjEyMzprZXkxMjM=

Testing and docs

Added test for basic auth generator function.
Updated secret.md as well.

@ramaro
Copy link
Member

ramaro commented Nov 10, 2022

lgtm @MatteoVoges ! Can you please rebase before we can merge?

@ramaro
Copy link
Member

ramaro commented Nov 19, 2022

merging! 👍🏼

@ramaro ramaro merged commit 1e2afe5 into kapicorp:master Nov 19, 2022
@MatteoVoges MatteoVoges deleted the basic-auth-generator branch December 2, 2022 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants