{"action":"closed","issue":{"url":"https://api.github.com/repos/apigee/istio-mixer-adapter/issues/103","repository_url":"https://api.github.com/repos/apigee/istio-mixer-adapter","labels_url":"https://api.github.com/repos/apigee/istio-mixer-adapter/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/apigee/istio-mixer-adapter/issues/103/comments","events_url":"https://api.github.com/repos/apigee/istio-mixer-adapter/issues/103/events","html_url":"https://github.com/apigee/istio-mixer-adapter/issues/103","id":329830320,"node_id":"MDU6SXNzdWUzMjk4MzAzMjA=","number":103,"title":"JWT is token is not working ","user":{"login":"phanibalaji","id":8624852,"node_id":"MDQ6VXNlcjg2MjQ4NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/8624852?v=4","gravatar_id":"","url":"https://api.github.com/users/phanibalaji","html_url":"https://github.com/phanibalaji","followers_url":"https://api.github.com/users/phanibalaji/followers","following_url":"https://api.github.com/users/phanibalaji/following{/other_user}","gists_url":"https://api.github.com/users/phanibalaji/gists{/gist_id}","starred_url":"https://api.github.com/users/phanibalaji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phanibalaji/subscriptions","organizations_url":"https://api.github.com/users/phanibalaji/orgs","repos_url":"https://api.github.com/users/phanibalaji/repos","events_url":"https://api.github.com/users/phanibalaji/events{/privacy}","received_events_url":"https://api.github.com/users/phanibalaji/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-06T11:38:13Z","updated_at":"2018-06-12T19:49:06Z","closed_at":"2018-06-12T19:49:06Z","author_association":"NONE","body":"I installed istio-mixer-adapter -> https://github.com/apigee/istio-mixer-adapter on top of istio 0.8 which is on Kubernetes 1.9 cluster running in GKE\r\n\r\nI am able to install helloworld service and Configure Apigee Mixer in Istio and able to make calls to the service using ConsumerKey\r\n\r\n\r\n```\r\n$curl http://${GATEWAY_URL}/hello -H \"x-api-key: y9bgUPU9wj6QBPjqPr3YIpKalhZZVUJm\"\r\nHello version: v2, instance: helloworld-v2-6f7dd597bb-296mg\r\n\r\n```\r\n\r\nThen I tried to apply the JWT\r\n\r\n\r\n```\r\n$ cat authentication-policy.yaml\r\n---\r\napiVersion: \"authentication.istio.io/v1alpha1\"\r\nkind: Policy\r\nmetadata:\r\n  name: auth-spec\r\n  namespace: default\r\nspec:\r\n  targets:\r\n  - name: helloworld\r\n  peers:\r\n  - mtls:\r\n  origins:\r\n  - jwt:\r\n      issuer: https://phanim-trial-test.apigee.net/istio-auth/token\r\n      jwks_uri: https://phanim-trial-test.apigee.net/istio-auth/certs\r\n  principalBinding: USE_ORIGIN\r\n\r\n$ istioctl create -f authentication-policy.yaml\r\nCreated config policy/default/auth-spec at revision 25988\r\n```\r\n\r\nAble to get the Token\r\n\r\n```\r\ncurl http://phanim-trial-test.apigee.net/istio-auth/token -d '{ \"client_id\":\"y9bgUPU9wj6QBPjqPr3YIpKalhZZVUJm\", \"client_secret\":\"kPmsAWaoAgDlbhdO\", \"grant_type\":\"client_credentials\" }' -H \"Content-Type: application/json\"\r\n{\"token\":\"eyJraWQiOiIxIiwidwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJhY2Nlc3NfdG9rZW4iOiIyQVRDYTVrWktsV2lFcFo0eGlnR3N2Mm9jSFE3IiwiYXVkIjoiaXN0aW8iLCJuYmYiOjE1MjgyODQxOTYsImFwaV9wcm9kdWN0X2xpc3QiOlsiaHctaXN0aW8iXSwiYXBwbGljYXRpb25fbmFtZSI6Imh3LWFwcHMiLCJkZXZlbG9wZXJfZW1haWwiOiJoZWxsb3dvcmxkQGFwaWdlZS5jb20iLCJpc3MiOiJodHRwOi8vcGhhbmltLXRyaWFsLXRlc3QuYXBpZ2VlLm5ldC9pc3Rpby1hdXRoL3Rva2VuIiwiZXhwIjoxNTI4Mjg1MDk2LCJpYXQiOjE1MjgyODQxOTYsImp0aSI6IjNmZGYyNGVhLWQzZWYtNDQ4Yi1iOTRhLTg5ZGM3N2MwN2EzNiIsImNsaWVudF9pZCI6Ink5YmdVUFU5d2o2UUJQanFQcjNZSXBLYWxoWlpWVUptIn0.OYc9cAx1ZHX6vleiRu3ped0pj-eDPMv4AYGpyVtnEQtIoc_RCEBHfapXvMewiQ-kHa36ftBefQEgZrCkckTmOKM11NerCXosvdehpNMHaD1sj0TRBh0tHbScOgJuQUKtdlEKnQ9zKsAYQvVQ75dpBxdjpQWBfLo-fZg1rdMLgy2X18iYRCyJttlpE1YcQW1E6OdpsmwdynGFZdNidqPkxT47CaRMbjN4difJdv-o9XG_7RkTqdy8GGT2R6amORfJcvLVtoCUl0T1C78aCkyIhlhmvM34zHvcX4YDsU_8sHZQNRiOLPtvZDC2D06AKe3wdqg4XyDTbaHL1TQcDje8aw\"}\r\n\r\n```\r\n\r\nBut when I make a call with the token obtained I still get the error\r\n\r\n\r\n```\r\n$ curl http://${GATEWAY_URL}/hello -H \"Authorization: Bearer  eyJraWQiOiIxIiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJhY2Nlc3NfdG9rZW4iOiIyQVRDYTVrWktsV2lFcFo0eGlnR3N2Mm9jSFE3IiwiYXVkIjoiaXN0aW8iLCJuYmYiOjE1MjgyODQxOTYsImFwaV9wcm9kdWN0X2xpc3QiOlsiaHctaXN0aW8iXSwiYXBwbGljYXRpb25fbmFtZSI6Imh3LWFwcHMiLCJkZXZlbG9wZXJfZW1haWwiOiJoZWxsb3dvcmxkQGFwaWdlZS5jb20iLCJpc3MiOiJodHRwOi8vcGhhbmltLXRyaWFsLXRlc3QuYXBpZ2VlLm5ldC9pc3Rpby1hdXRoL3Rva2VuIiwiZXhwIjoxNTI4Mjg1MDk2LCJpYXQiOjE1MjgyODQxOTYsImp0aSI6IjNmZGYyNGVhLWQzZWYtNDQ4Yi1iOTRhLTg5ZGM3N2MwN2EzNiIsImNsaWVudF9pZCI6Ink5YmdVUFU5d2o2UUJQanFQcjNZSXBLYWxoWlpWVUptIn0.OYc9cAx1ZHX6vleiRu3ped0pj-eDPMv4AYGpyVtnEQtIoc_RCEBHfapXvMewiQ-kHa36ftBefQEgZrCkckTmOKM11NerCXosvdehpNMHaD1sj0TRBh0tHbScOgJuQUKtdlEKnQ9zKsAYQvVQ75dpBxdjpQWBfLo-fZg1rdMLgy2X18iYRCyJttlpE1YcQW1E6OdpsmwdynGFZdNidqPkxT47CaRMbjN4difJdv-o9XG_7RkTqdy8GGT2R6amORfJcvLVtoCUl0T1C78aCkyIhlhmvM34zHvcX4YDsU_8sHZQNRiOLPtvZDC2D06AKe3wdqg4XyDTbaHL1TQcDje8aw\"\r\n\r\nOrigin authentication failed.\r\n```\r\n\r\nWhen I remove the JWT conf and try with API key it works again fine\r\n\r\n\r\n```\r\n$ istioctl delete -f authentication-policy.yaml\r\nDeleted config: policy/default/auth-spec\r\n$ curl http://${GATEWAY_URL}/hello -H \"x-api-key: y9bgUPU9wj6QBPjqPr3YIpKalhZZVUJm\"\r\nHello version: v1, instance: helloworld-v1-7998854cdd-77wdp\r\n$ curl http://${GATEWAY_URL}/hello -H \"x-api-key: y9bgUPU9wj6QBPjqPr3YIpKalhZZVUJm\"\r\nHello version: v1, instance: helloworld-v1-7998854cdd-77wdp\r\n$\r\n```\r\n\r\nCan you check please?"}}
{"actor":{"display_login":"theganyo"}}