Skip to content

Commit

Permalink
check in istio#5238 to 0.8 branch (istio#5261)
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue.

check in istio#5238 to 0.8 branch 

check in istio#5238 to 0.8 branch, which is required for jwt authn policy to work in v2.
  • Loading branch information
quanjielin authored and istio-merge-robot committed Apr 28, 2018
1 parent 02595b6 commit 66d5226
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 7 additions & 0 deletions pilot/pkg/model/jwks_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package model

import (
"crypto/tls"
"encoding/json"
"fmt"
"io/ioutil"
Expand Down Expand Up @@ -103,6 +104,12 @@ func newJwksResolver(expireDuration, evictionDuration, refreshInterval time.Dura
refreshInterval: refreshInterval,
client: &http.Client{
Timeout: jwksHTTPTimeOutInSec * time.Second,

// TODO: pilot needs to include a collection of root CAs to make external
// https web request(https://github.com/istio/istio/issues/1419).
Transport: &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
},
},
}

Expand Down
6 changes: 0 additions & 6 deletions tests/e2e/tests/pilot/authn_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ func TestAuthNPolicy(t *testing.T) {
}

func TestAuthNJwt(t *testing.T) {
// V1alpha3 == true implies envoyv2, jwt authn doesn't work for v2 so skip it now.
// TODO(quanlin): enable test for v2 API after https://github.com/istio/istio/pull/5061 is in.
if tc.V1alpha3 {
t.Skipf("Skipping %s: V1alpha3=true", t.Name())
}

// JWT token used is borrowed from https://github.com/istio/proxy/blob/master/src/envoy/http/jwt_auth/sample/correct_jwt.
// The Token expires in year 2132, issuer is 628645741881-noabiu23f5a8m8ovd8ucv698lj78vv0l@developer.gserviceaccount.com.
// Test will fail if this service account is deleted.
Expand Down

0 comments on commit 66d5226

Please sign in to comment.