Merge pull request #901 from smallstep/fix/admin-token

Drop any query string from the admin tokens
This commit is contained in:
Mariano Cano 2022-04-18 15:30:42 -07:00 committed by GitHub
commit b99692fdaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,6 +90,13 @@ func (c *AdminClient) generateAdminToken(aud *url.URL) (string, error) {
return "", err return "", err
} }
// Drop any query string parameter from the token audience
aud = &url.URL{
Scheme: aud.Scheme,
Host: aud.Host,
Path: aud.Path,
}
now := time.Now() now := time.Now()
tokOptions := []token.Options{ tokOptions := []token.Options{
token.WithJWTID(jwtID), token.WithJWTID(jwtID),