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 generated secrets for templates #135

Closed
bohdan-shulha opened this issue Aug 22, 2024 · 0 comments
Closed

Support generated secrets for templates #135

bohdan-shulha opened this issue Aug 22, 2024 · 0 comments
Labels
feat New feature or request
Milestone

Comments

@bohdan-shulha
Copy link
Contributor

bohdan-shulha commented Aug 22, 2024

For example, APP_KEY for laravel.

It has the next format:

APP_KEY=base64:Z7CI/ANMYiIBKT+KQFAFC+AuMZ2dwWhwzwaRNFJ/CBE=

The proposed format (an example):

                        {
                            "name": "APP_KEY",
                            "value": "base64:{-randomBytes:32|base64-}"
                        },

(for APP_KEY are following requirements)

 Unsupported cipher or incorrect key length. Supported ciphers are: aes-128-cbc, aes-256-cbc, aes-128-gcm, aes-256-gcm. 

The syntax {- ... -} has been selected to distinguish the dynamic expressions with the static vars embeddings (i.e. {{user}})

In the scope of this ticket, need to add the following expressions:

  1. {-username-}: should be generated from the common words (see the Service slug generation example), words separated with underscore _
  2. {-password-}: random string of 32 chars containing ascii symbols (A-z0-9 and special chars)
  3. {-randomBytes:32|base64-}: expression from the example; self-descriptive.

These expressions have to be processed server-side to enable their use not only in app templates, but also in custom services defined in-place by customers.

The "use template" form should allow users to toggle between "simple" and "advanced" views. When displaying a simple view, only the fields which require user's input should be displayed. The advanced form should be displaying all fields, including those with the expressions.

TBD: mb instead of username would be better to create some generic equivalent like phrase:words,2|slug (but usernames are so common, so I'd prefer having the shortcut).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant