diff --git a/builder/azure/common/client/config.go b/builder/azure/common/client/config.go index f4329b4f..532b74a3 100644 --- a/builder/azure/common/client/config.go +++ b/builder/azure/common/client/config.go @@ -211,15 +211,10 @@ func (c Config) Validate(errs *packersdk.MultiError) { c.ClientJWT != "" { p := jwt.Parser{} claims := jwt.StandardClaims{} - token, _, err := p.ParseUnverified(c.ClientJWT, &claims) + _, _, err := p.ParseUnverified(c.ClientJWT, &claims) if err != nil { errs = packersdk.MultiErrorAppend(errs, fmt.Errorf("client_jwt is not a JWT: %v", err)) - } else { - if t, ok := token.Header["x5t"]; !ok || t == "" { - errs = packersdk.MultiErrorAppend(errs, fmt.Errorf("client_jwt is missing the x5t header value, which is required for bearer JWT client authentication to Azure")) - } } - return } diff --git a/builder/azure/common/client/config_test.go b/builder/azure/common/client/config_test.go index 3d102ca7..699711d3 100644 --- a/builder/azure/common/client/config_test.go +++ b/builder/azure/common/client/config_test.go @@ -304,16 +304,6 @@ func Test_ClientConfig_CannotUseBothClientJWTAndSecret(t *testing.T) { assertInvalid(t, cfg) } -func Test_ClientConfig_ClientJWTShouldHaveThumbprint(t *testing.T) { - cfg := Config{ - SubscriptionID: "12345", - ClientID: "12345", - ClientJWT: getJWT(10*time.Minute, false), - } - - assertInvalid(t, cfg) -} - func Test_getJWT(t *testing.T) { if getJWT(time.Minute, true) == "" { t.Fatalf("getJWT is broken")