You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/05/13 09:09:00 UTC

[GitHub] [apisix] StephenYjw opened a new issue #4241: request help: when add jwt-auth plugin to a service/route,jwt token must contain "key" claim。

StephenYjw opened a new issue #4241:
URL: https://github.com/apache/apisix/issues/4241


   ### Issue description
   添加 jwt 插件时,希望可以添加一个属性,指定 jwt payload 中的claim name,对应 consumer 中的 key。
   比如 jwt payload 如下:
   ```
   {
     "iss":"http://127.0.0.1",
     "client_id":"application1",
     "sub": "1234567890",
     "iat": 1516239022
   }
   ```
   ## 添加 jwt 插件 :
   ![image](https://user-images.githubusercontent.com/20896662/118103914-09632880-b40d-11eb-9589-619a68b99fd2.png)
   
   ## consumer 配置:
   ![image](https://user-images.githubusercontent.com/20896662/118103781-dfaa0180-b40c-11eb-8906-88a0404bb745.png)
   
   
   ### Environment
   
   Request help without environment information will be ignored or closed.
   
   * apisix version (cmd: `apisix version`):2.5
   * OS (cmd: `uname -a`):
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   * apisix-dashboard version, if have:
   * luarocks version, if the issue is about installation (cmd: `luarocks --version`):
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4241: request help: when add jwt-auth plugin to a service/route,jwt token must contain "key" claim。

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4241:
URL: https://github.com/apache/apisix/issues/4241#issuecomment-958959822






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tzssangglass commented on issue #4241: request help: when add jwt-auth plugin to a service/route,jwt token must contain "key" claim。

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #4241:
URL: https://github.com/apache/apisix/issues/4241#issuecomment-841643540


   hi @LiuYuHui, you can start here https://apisix.apache.org/docs/general/contributor-guide/, have a good trip


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4241: request help: when add jwt-auth plugin to a service/route,jwt token must contain "key" claim。

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4241:
URL: https://github.com/apache/apisix/issues/4241#issuecomment-949264921


   @StephenYjw 
   Could you confirm it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4241: request help: when add jwt-auth plugin to a service/route,jwt token must contain "key" claim。

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4241:
URL: https://github.com/apache/apisix/issues/4241#issuecomment-958959822


   Closed as lack of response. Feel free to reopen it if need.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander closed issue #4241: request help: when add jwt-auth plugin to a service/route,jwt token must contain "key" claim。

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #4241:
URL: https://github.com/apache/apisix/issues/4241


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4241: request help: when add jwt-auth plugin to a service/route,jwt token must contain "key" claim。

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4241:
URL: https://github.com/apache/apisix/issues/4241#issuecomment-840437101


   PR is welcome!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4241: request help: when add jwt-auth plugin to a service/route,jwt token must contain "key" claim。

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4241:
URL: https://github.com/apache/apisix/issues/4241#issuecomment-958959822


   Closed as lack of response. Feel free to reopen it if need.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander closed issue #4241: request help: when add jwt-auth plugin to a service/route,jwt token must contain "key" claim。

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #4241:
URL: https://github.com/apache/apisix/issues/4241






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander closed issue #4241: request help: when add jwt-auth plugin to a service/route,jwt token must contain "key" claim。

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #4241:
URL: https://github.com/apache/apisix/issues/4241


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] LiuYuHui commented on issue #4241: request help: when add jwt-auth plugin to a service/route,jwt token must contain "key" claim。

Posted by GitBox <gi...@apache.org>.
LiuYuHui commented on issue #4241:
URL: https://github.com/apache/apisix/issues/4241#issuecomment-841607361


   Hi @spacewander, I want to help solve this issue, but I am not familar with apisix, could you provide some points about where to start?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4241: request help: when add jwt-auth plugin to a service/route,jwt token must contain "key" claim。

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4241:
URL: https://github.com/apache/apisix/issues/4241#issuecomment-841683824


   @LiuYuHui 
   Read it: https://github.com/apache/apisix/blob/master/apisix/plugins/jwt-auth.lua
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] bisakhmondal commented on issue #4241: request help: when add jwt-auth plugin to a service/route,jwt token must contain "key" claim。

Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on issue #4241:
URL: https://github.com/apache/apisix/issues/4241#issuecomment-948947962


   Hi @spacewander, could you please summarize the requirements here?
   I created a consumer with the following config;
   ```json
   {   
       "username":"test",
       "plugins": {
           "jwt-auth": {
               "key": "application1",
               "algorithm": "HS256",
               "secret": "my-secret-key"
           }
       }
   }
   ```
   But the jwt I got from the following route (/apisix/plugin/jwt/sign?key=application1) without any external data extension has already a key claim.
   jwt: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MzQ5MzE3ODAsImtleSI6ImFwcGxpY2F0aW9uMSJ9.XC5vuHIajGtB-GRHi-AweHYKRIeYiY-_FBMtGR8eOUY


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org