"No credentials found for given 'iss'

I create JWT in spring application and I check JWT by kong jwt plugin

JWT is well maded.
But when I request with JWT, the error is shown.
ERROR : {“message”:“No credentials found for given ‘iss’”}

I checked JWT in jwt.io there is “iss” key
“iss”: “a36c3049b36249a3c9f8891cb127243c”

Where is my mistake? How to fix it? please help me

I use this configuration

[ENV ]
kong : 1.2, kubernetes with stable chart and dbless

[request]
curl -X GET http://10.10.10.10/test -H “Authorization: Bearer XXXXX”

[Chart]
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: jwt
labels:
global: “false”
enabled: true
config:
claims_to_verify:

  • exp
  • nbf
    key_claim_name: iss
    plugin: jwt

apiVersion: configuration.konghq.com/v1
kind: KongConsumer
metadata:
name: global-consumer
username: GlobalConsumer
custom_id: GlobalConsumer


apiVersion: configuration.konghq.com/v1
kind: KongCredential
metadata:
name: global-consumer-credentials
consumerRef: global-consumer
type: jwt
config:
key: urn:yourdomain.com
rsa_public_key: |
-----BEGIN PUBLIC KEY-----
Key. in. here
-----END PUBLIC KEY-----
algorithm: RS256

Could you solve this? I’m having a similar issue

Please check your consumers.
If your results like this, your configuration is wrong

[root]# curl -k https://xx.xx.xx.xx:8444/consumers
{“next”:null,“data”:[]}

Are you using a custom ingress class?
If so, you need to add ingress class annotation on kong consumer and kong credential

I could fix it. My issue was that my jwt credential wasn’t getting created because of a validation with RS256. Now that I created properly using k8 secrets it’s working fine. Thanks for the reply!


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ