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 2020/01/18 07:47:19 UTC

[GitHub] [incubator-apisix] valpa opened a new issue #1079: bug:

valpa opened a new issue #1079: bug: 
URL: https://github.com/apache/incubator-apisix/issues/1079
 
 
   ### Issue description
   Attempt to get JWT token fail when run command
   curl -i -X GET http://localhost:9080/apisix/plugin/jwt/sign?key=1212121212
   if there is only one consumer
   
   ### Environment
   * apisix version (cmd: `apisix version`): 1.0
   * OS: docker version from https://github.com/apache/incubator-apisix-docker.git
   
   ### Minimal test code / Steps to reproduce the issue
   Ensure there is no consumer configured
   Run following commands:
   `curl -i -X PUT http://localhost:9080/apisix/admin/consumers -d '{"username":"1212121212","plugins":{"jwt-auth":{	"key":"1212121212"}}}'
   curl -i -X GET http://localhost:9080/apisix/plugin/jwt/sign?key=1212121212
   
   curl -i -X PUT http://localhost:9080/apisix/admin/consumers -d '
   {
       "username": "jack",
       "plugins": {
           "jwt-auth": {
               "key": "user-key",
               "secret": "my-secret-key"
           }
       }
   }'
   curl -i -X GET http://localhost:9080/apisix/plugin/jwt/sign?key=1212121212
   
   `
   
   ### What's the actual result? (including assertion message & call stack if applicable)
   The first curl command get 500 error
   The second curl command get 200 OK
   
   
   ### What's the expected result?
   The first curl command shall get 200 OK with a token

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [apisix] membphis closed issue #1079: bug: Attempt to get JWT token fail

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


   


----------------------------------------------------------------
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] membphis commented on issue #1079: bug: Attempt to get JWT token fail

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


   old issue. @valpa if you still have a problem, please let me know. we can reopen 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.

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



[GitHub] [incubator-apisix] membphis commented on issue #1079: bug: Attempt to get JWT token fail

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1079: bug: Attempt to get JWT token fail
URL: https://github.com/apache/incubator-apisix/issues/1079#issuecomment-575900853
 
 
   which APISIX version you are using? it works fine for commit https://github.com/apache/incubator-apisix/commit/5736a0327220ca1bbbb7fadc9a18cff33dfb7cbe.
   
   ![image](https://user-images.githubusercontent.com/6814606/72664866-be661a80-3a3d-11ea-98bf-22fc93ff5036.png)
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] valpa commented on issue #1079: bug: Attempt to get JWT token fail

Posted by GitBox <gi...@apache.org>.
valpa commented on issue #1079: bug: Attempt to get JWT token fail
URL: https://github.com/apache/incubator-apisix/issues/1079#issuecomment-575979762
 
 
   I was using docker version from https://github.com/apache/incubator-apisix-docker.git
   
   Rebuild today so I believe APISIX is the last update in master branch.
   
   Just tested again, still fail
   
   ```
   jerry@jerry:~/api_gateway/incubator-apisix-docker/example
   $ curl -i -X PUT http://localhost:9080/apisix/admin/consumers -d '{"username":"1212121212","plugins":{"jwt-auth":{"key":"1212121212"}}}'
   HTTP/1.1 201 Created
   Date: Sun, 19 Jan 2020 08:28:28 GMT
   Content-Type: text/plain
   Transfer-Encoding: chunked
   Connection: keep-alive
   Server: APISIX web server
   
   {"node":{"value":{"username":"1212121212","plugins":{"jwt-auth":{"algorithm":"HS256","key":"1212121212","secret":"5078d51b-dadd-40de-abbe-9704f16dc8cf","exp":86400}}},"createdIndex":305,"key":"\/apisix\/consumers\/1212121212","modifiedIndex":305},"action":"set"}
   jerry@jerry:~/api_gateway/incubator-apisix-docker/example
   $ curl -i -X GET http://localhost:9080/apisix/plugin/jwt/sign?key=1212121212
   HTTP/1.1 500 Internal Server Error
   Date: Sun, 19 Jan 2020 08:28:28 GMT
   Content-Type: text/html
   Content-Length: 174
   Connection: close
   Server: APISIX web server
   
   <html>
   <head><title>500 Internal Server Error</title></head>
   <body>
   <center><h1>500 Internal Server Error</h1></center>
   <hr><center>openresty</center>
   </body>
   </html>
   ```

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-apisix] membphis commented on issue #1079: bug: Attempt to get JWT token fail

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1079: bug: Attempt to get JWT token fail
URL: https://github.com/apache/incubator-apisix/issues/1079#issuecomment-576082735
 
 
   please provide the related error log.
   
   I cannot reproduce this problem. If you can provide a reproduction environment, please contact me.

----------------------------------------------------------------
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


With regards,
Apache Git Services