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

handle token id and secret in case of pure integer values #341

Closed
JensAc opened this issue Oct 19, 2022 · 5 comments
Closed

handle token id and secret in case of pure integer values #341

JensAc opened this issue Oct 19, 2022 · 5 comments

Comments

@JensAc
Copy link
Contributor

JensAc commented Oct 19, 2022

No description provided.

@JensAc
Copy link
Contributor Author

JensAc commented Oct 19, 2022

In case the token id or secret for the pre-gardenlet chart is a pure integer number, the deployment of the gardenlet fails.
This should be handled somehow.

@JensAc
Copy link
Contributor Author

JensAc commented Oct 19, 2022

Moreover, the secret id has to be 6 characters long and the length of the secret has to be 16 characters.
This should be checked somewhere.

@fynluk
Copy link
Contributor

fynluk commented Oct 26, 2022

Isn't it solved by #202:

export TOKEN_ID=ab$(openssl rand -hex 2)
export TOKEN_SECRET=cd$(openssl rand -hex 7)

The ab/cd prefix prevents pure int numbers

@JensAc
Copy link
Contributor Author

JensAc commented Oct 26, 2022

That prevents it in the ci scripts. However, in "real" environments that does not prevent the user to use a pure integer token.

@fynluk
Copy link
Contributor

fynluk commented Oct 26, 2022

A solution could be to limit the values file like I did here: gardener-community/pre-gardenlet@242326a

With a json-schema (https://json-schema.org/draft/2020-12/json-schema-validation.html) you can validate value files

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

No branches or pull requests

2 participants