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

Increase token size to 32 bytes #4486

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scripts/wrappers/add_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def print_short(token, check):
parser.add_argument(
"--token",
"-t",
help="Specify the bootstrap token to add, must be 32 characters long. "
help="Specify the bootstrap token to add, must be 32 bytes long. "
"Auto generates when empty.",
)
parser.add_argument(
Expand All @@ -163,10 +163,10 @@ def print_short(token, check):
if args.token is not None:
token = args.token
else:
token = token_hex(16)
token = token_hex(32)

if len(token) < TOKEN_ΜΙΝ_LEN:
print("Invalid token size. It must be 32 characters long.")
print("Invalid token size. It must be 32 bytes long.")
exit(1)

add_token_with_expiry(token, cluster_tokens_file, ttl)
Expand Down