SSCT Tokens Feature [OSS] (#14109)

* port SSCT OSS

* port header hmac key to ent and generate token proto without make command

* remove extra nil check in request handling

* add changelog

* add comment to router.go

* change test var to use length constants

* remove local index is 0 check and extra defer which can be removed after use of ExternalID
This commit is contained in:
Hridoy Roy
2022-02-17 11:43:07 -08:00
committed by GitHub
parent ee1e5bec5b
commit 27f15edd9f
36 changed files with 1094 additions and 101 deletions

View File

@@ -435,7 +435,7 @@ func TestOperatorGenerateRootCommand_Run(t *testing.T) {
t.Fatal(err)
}
if l, exp := len(token), vault.TokenLength+2; l != exp {
if l, exp := len(token), vault.TokenLength+vault.TokenPrefixLength; l != exp {
t.Errorf("expected %d to be %d: %s", l, exp, token)
}
})
@@ -521,7 +521,7 @@ func TestOperatorGenerateRootCommand_Run(t *testing.T) {
t.Fatal(err)
}
if l, exp := len(token), vault.TokenLength+2; l != exp {
if l, exp := len(token), vault.TokenLength+vault.TokenPrefixLength; l != exp {
t.Errorf("expected %d to be %d: %s", l, exp, token)
}
})