From dc066a642aa99525c421ad69ca9a162b723fc15e Mon Sep 17 00:00:00 2001 From: Andrei Burd Date: Sun, 15 Apr 2018 15:07:10 +0300 Subject: [PATCH] Nomad: updating max token length to 256 --- builtin/logical/nomad/path_creds_create.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/builtin/logical/nomad/path_creds_create.go b/builtin/logical/nomad/path_creds_create.go index 43922b45b006..1b864e87f84d 100644 --- a/builtin/logical/nomad/path_creds_create.go +++ b/builtin/logical/nomad/path_creds_create.go @@ -58,8 +58,9 @@ func (b *backend) pathTokenRead(ctx context.Context, req *logical.Request, d *fr // Handling nomad maximum token length // https://github.com/hashicorp/nomad/blob/d9276e22b3b74674996fb548cdb6bc4c70d5b0e4/nomad/structs/structs.go#L115 - if len(tokenName) > 64 { - tokenName = tokenName[0:63] + // size increased in https://github.com/hashicorp/nomad/pull/3888 + if len(tokenName) > 256 { + tokenName = tokenName[0:255] } // Create it