ソースを参照

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

Drop any query string from the admin tokens
Mariano Cano 4 年 前
親
コミット
b99692fdaa
1 ファイル変更、7 行追加、0 行削除
  1. 7 0
      ca/adminClient.go

+ 7 - 0
ca/adminClient.go

@@ -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),