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 2022/01/07 03:48:09 UTC

[GitHub] [apisix] nimohunter opened a new pull request #6040: Dev/key auth customize error msg

nimohunter opened a new pull request #6040:
URL: https://github.com/apache/apisix/pull/6040


   #6025 


-- 
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] github-actions[bot] commented on pull request #6040: Dev/key auth customize error msg

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #6040:
URL: https://github.com/apache/apisix/pull/6040#issuecomment-1065855153


   This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
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] nimohunter commented on pull request #6040: Dev/key auth customize error msg

Posted by GitBox <gi...@apache.org>.
nimohunter commented on pull request #6040:
URL: https://github.com/apache/apisix/pull/6040#issuecomment-1007122897


   > Hello there, the title and description need to be updated to make the PR more reviewer friendly.
   
   Sorry about 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] nimohunter commented on pull request #6040: Dev/key auth customize error msg

Posted by GitBox <gi...@apache.org>.
nimohunter commented on pull request #6040:
URL: https://github.com/apache/apisix/pull/6040#issuecomment-1007266895


   by the way, I think authentication into two types:
   
   1. Personal authentication, such as QQ. in this way, the gateway should to access the other permission system to determine whether it has authority. This kind of authentication will not use the gateway auth.
   
   2. Calls between services. For example, I have an API that I want to provide to colleagues in other departments. This logic is really suitable for key-auth and consumers.
   
   so i think key-auth is actually a completely underestimated plugin. 


-- 
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] nimohunter commented on pull request #6040: Dev/key auth customize error msg

Posted by GitBox <gi...@apache.org>.
nimohunter commented on pull request #6040:
URL: https://github.com/apache/apisix/pull/6040#issuecomment-1007310108


   I agree with you, error code may not be customized. But how about the reject error msg? 
   
   Error msg can be more friendly


-- 
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] membphis commented on pull request #6040: Dev/key auth customize error msg

Posted by GitBox <gi...@apache.org>.
membphis commented on pull request #6040:
URL: https://github.com/apache/apisix/pull/6040#issuecomment-1007279288


   Personally, I think it’s not good to customize the rejection code. 
   But I also found that some friends in the community have different opinions on this.
   
   @nimohunter, if you are very interested in this feature, I think we can discuss it on the Apache mailing list.


-- 
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] nimohunter commented on pull request #6040: Dev/key auth customize error msg

Posted by GitBox <gi...@apache.org>.
nimohunter commented on pull request #6040:
URL: https://github.com/apache/apisix/pull/6040#issuecomment-1008685925


   OK, i have send a mail about this MR...
   and then?


-- 
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 pull request #6040: Dev/key auth customize error msg

Posted by GitBox <gi...@apache.org>.
spacewander commented on pull request #6040:
URL: https://github.com/apache/apisix/pull/6040#issuecomment-1007205704


   If you want to customize each error msg to a different value, my suggestion is to fork and modify this plugin by yourself. It's inconvenient to maintain such an API interface. We may introduce refactor in the future and change the number of "return xxx".
   
   How many `return xxx` in a function is an implementation detail and we can't / should not maintain a public API based on 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] leslie-tsang commented on pull request #6040: Dev/key auth customize error msg

Posted by GitBox <gi...@apache.org>.
leslie-tsang commented on pull request #6040:
URL: https://github.com/apache/apisix/pull/6040#issuecomment-1007120611


   Hello there, the title and description need to be updated to make the PR more reviewer friendly.


-- 
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] nimohunter commented on pull request #6040: Dev/key auth customize error msg

Posted by GitBox <gi...@apache.org>.
nimohunter commented on pull request #6040:
URL: https://github.com/apache/apisix/pull/6040#issuecomment-1007181623


   But I don't think the common error return code and message was conflicted with the plugin's customize return error code.
   
   plugin doesn't return only one error message, maybe return kinds of error messages.
   
   for example: key-auth should customize three kinds of error message : 
      1. Missing API key found in request
      2. Missing related consumer
      3. Invalid API key in request
    
   so i think there is no conflict between  common error msg and plugin's customized error msg 


-- 
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] membphis commented on pull request #6040: Dev/key auth customize error msg

Posted by GitBox <gi...@apache.org>.
membphis commented on pull request #6040:
URL: https://github.com/apache/apisix/pull/6040#issuecomment-1007279288






-- 
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] membphis edited a comment on pull request #6040: Dev/key auth customize error msg

Posted by GitBox <gi...@apache.org>.
membphis edited a comment on pull request #6040:
URL: https://github.com/apache/apisix/pull/6040#issuecomment-1008752048


   > OK, i have send a mail about this MR... and then?
   
   we can discuss the idea in mail list. If we can reach a consensus, we can do things according to the consensus.


-- 
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] nimohunter commented on pull request #6040: Dev/key auth customize error msg

Posted by GitBox <gi...@apache.org>.
nimohunter commented on pull request #6040:
URL: https://github.com/apache/apisix/pull/6040#issuecomment-1007181623






-- 
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 pull request #6040: Dev/key auth customize error msg

Posted by GitBox <gi...@apache.org>.
spacewander commented on pull request #6040:
URL: https://github.com/apache/apisix/pull/6040#issuecomment-1007205704


   If you want to customize each error msg to a different value, my suggestion is to fork and modify this plugin by yourself. It's inconvenient to maintain such an API interface. We may introduce refactor in the future and change the number of "return xxx".
   
   How many `return xxx` in a function is an implementation detail and we can't / should not maintain a public API based on 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] nimohunter commented on pull request #6040: Dev/key auth customize error msg

Posted by GitBox <gi...@apache.org>.
nimohunter commented on pull request #6040:
URL: https://github.com/apache/apisix/pull/6040#issuecomment-1007252758


   @leslie-tsang @spacewander  how about we walk in two steps
    first, support this function about key-auth return customized error msg 
    then, we open a new MR to fix all  plugin return error msg


-- 
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] membphis commented on pull request #6040: Dev/key auth customize error msg

Posted by GitBox <gi...@apache.org>.
membphis commented on pull request #6040:
URL: https://github.com/apache/apisix/pull/6040#issuecomment-1008752048


   > OK, i have send a mail about this MR... and then?
   
   we can discuss the idea. If we can reach a consensus, we can do things according to the consensus.


-- 
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] membphis commented on pull request #6040: Dev/key auth customize error msg

Posted by GitBox <gi...@apache.org>.
membphis commented on pull request #6040:
URL: https://github.com/apache/apisix/pull/6040#issuecomment-1007327661


   > I agree with you, error code may not be customized. But how about the reject error msg?
   > 
   > Error msg can be more friendly
   
   we can discuss it in Apache mail list, follow the Apache Way. 
     
   https://lists.apache.org/list.html?dev@apisix.apache.org
   
   This seems to be a meaningful change.


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