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/10/26 16:23:35 UTC

[GitHub] [apisix] tzssangglass opened a new issue #2522: request help: jwt-auth plugin work on a route or a service

tzssangglass opened a new issue #2522:
URL: https://github.com/apache/apisix/issues/2522


   ### Issue description
   when i try like
   
   ```
   curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "methods": ["GET"],
       "uri": "/index.html",
       "plugins": {
           "jwt-auth": {
               "secret": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC50wrZORquQ1W6xS66Hvx9PA/Y\np1kL4GosLCDYCFFeuyHemdZCeDW+jzTfjdfDAExsZ4Z5/gNegOZC3nEIh/IDoEJH\nHMwziTz1jxh/7VXuFGvdZcIiaPpKS6EZ+dVx/NfYMcyY+1gf1ASxJghOD+9Np7Ie\npqKuAqxx1BVnk+rvmwIDAQAB\n-----END PUBLIC KEY-----\n"
           }
       },
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "39.97.63.215:80": 1
           }
       }
   }'
   ```
   
   I get 
   
   ```
   {
       "error_msg": "failed to check the configuration of plugin jwt-auth err: additional properties forbidden, found secret"
   }
   ```
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): master(latest version)
   * OS:macos
   


----------------------------------------------------------------
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 edited a comment on issue #2522: request help: jwt-auth plugin work on a route or a service

Posted by GitBox <gi...@apache.org>.
membphis edited a comment on issue #2522:
URL: https://github.com/apache/apisix/issues/2522#issuecomment-717996658


   > curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   > {
   >     "methods": ["GET"],
   >     "uri": "/index.html",
   >     "plugins": {
   >         "jwt-auth": {
   >             "secret": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC50wrZORquQ1W6xS66Hvx9PA/Y\np1kL4GosLCDYCFFeuyHemdZCeDW+jzTfjdfDAExsZ4Z5/gNegOZC3nEIh/IDoEJH\nHMwziTz1jxh/7VXuFGvdZcIiaPpKS6EZ+dVx/NfYMcyY+1gf1ASxJghOD+9Np7Ie\npqKuAqxx1BVnk+rvmwIDAQAB\n-----END PUBLIC KEY-----\n"
   >         }
   >     },
   >     "upstream": {
   >         "type": "roundrobin",
   >         "nodes": {
   >             "39.97.63.215:80": 1
   >         }
   >     }
   > }'
   
   this is wrong.
   
   please take a look at this doc of plugin: https://github.com/apache/apisix/blob/master/doc/plugins/jwt-auth.md
   
   I think you can find the right way to enable this plugin.
   
   please feel free to reopen this issue if you still have any problem.


----------------------------------------------------------------
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 closed issue #2522: request help: jwt-auth plugin work on a route or a service

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


   


----------------------------------------------------------------
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 #2522: request help: jwt-auth plugin work on a route or a service

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


   > curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   > {
   >     "methods": ["GET"],
   >     "uri": "/index.html",
   >     "plugins": {
   >         "jwt-auth": {
   >             "secret": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC50wrZORquQ1W6xS66Hvx9PA/Y\np1kL4GosLCDYCFFeuyHemdZCeDW+jzTfjdfDAExsZ4Z5/gNegOZC3nEIh/IDoEJH\nHMwziTz1jxh/7VXuFGvdZcIiaPpKS6EZ+dVx/NfYMcyY+1gf1ASxJghOD+9Np7Ie\npqKuAqxx1BVnk+rvmwIDAQAB\n-----END PUBLIC KEY-----\n"
   >         }
   >     },
   >     "upstream": {
   >         "type": "roundrobin",
   >         "nodes": {
   >             "39.97.63.215:80": 1
   >         }
   >     }
   > }'
   
   this is wrong.
   
   please take a look at this plugin: https://github.com/apache/apisix/blob/master/doc/plugins/jwt-auth.md
   
   I think you can find the right way to enable this plugin.
   
   please feel free to reopen this issue if you still have any problem.


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