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/10/25 02:24:01 UTC

[GitHub] [apisix] starsz opened a new issue, #8164: feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema

starsz opened a new issue, #8164:
URL: https://github.com/apache/apisix/issues/8164

   ### Description
   
   Hello, I find that we have a type field in the plugin.
   
   ```
   local _M = {
       version = 0.1,
       priority = 2500,
       type = 'auth',
       name = plugin_name,
       schema = schema,
       consumer_schema = consumer_schema,
   }
   
   ```
   refer: https://github.com/apache/apisix/blob/master/apisix/plugins/key-auth.lua#L57.
   
   But only the auth plugin uses the type. For example: 
   The file-logger plugin doesn't have.
   refer: https://github.com/apache/apisix/blob/master/apisix/plugins/file-logger.lua#L47-L53.
   
   So I really recommend that we can add the type filed to every plugin.
   We can have "auth", "security", "serverless", "transformation" e.g.
   


-- 
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.apache.org

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


[GitHub] [apisix] tzssangglass commented on issue #8164: feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema

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

   > So I think the origin usage about the `type` is not `category` means, right?
   
   yes, `type` is not used to show the properties of the 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


Re: [I] feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema [apisix]

Posted by "smileby (via GitHub)" <gi...@apache.org>.
smileby commented on issue #8164:
URL: https://github.com/apache/apisix/issues/8164#issuecomment-1868533430

   hi @shreemaan-abhishek i want to try 


-- 
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] pixeldin commented on issue #8164: feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema

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

   > "the auth is a bad name to me. It would be better to be named as consumer."
   
   What about my thought is:
   1. Stay and keep the `type` field in the original plugin, as reserved for logical judgment for the consumer, we can rename the type value of "auth" to "consumer" or whatever appropriate context.
   2. Add a `category` field to the existing plugin or new plugin in the future, which indicate the category, and the optional value is like [General/Authentication/Security/Serverless, etc...].
   
   This is what i plan to do, it's suitable?


-- 
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] pixeldin commented on issue #8164: feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema

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

   So I think maybe we can keep the `type` for old logic, add `category` to classify plugins.


-- 
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] tokers commented on issue #8164: feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema

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

   > > "the auth is a bad name to me. It would be better to be named as consumer."
   > 
   > What about my thought is:
   > 
   > 1. Stay and keep the `type` field in the original plugin, as reserved for logical judgment for the consumer, we can rename the type value of "auth" to "consumer" or whatever appropriate context.
   > 2. Add a `category` field to the existing plugin or new plugin in the future, which indicate the category, and the optional value is like [General/Authentication/Security/Serverless, etc...].
   > 
   > This is what i plan to do, it's suitable?
   
   I like "category".


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


Re: [I] feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema [apisix]

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #8164:
URL: https://github.com/apache/apisix/issues/8164#issuecomment-1868530011

   This looks like a good to have feature.


-- 
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] starsz commented on issue #8164: feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema

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

   > So I think maybe we can keep the `type` for old logic, add `category` to classify plugins.
   
   Agree +1.


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


Re: [I] feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema [apisix]

Posted by "starsz (via GitHub)" <gi...@apache.org>.
starsz commented on issue #8164:
URL: https://github.com/apache/apisix/issues/8164#issuecomment-1874761964

   Hello @smileby.Thanks for your contribution.After deep thinking of this, we don't need this feature now. The reason is that it will increase maintenance costs. So I will close this issue, and I am sorry for that.


-- 
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 #8164: feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema

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

   IMO, I think it would be good to keep one of `type` or `category`.


-- 
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] pixeldin commented on issue #8164: feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema

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

   # Usage of type 
   
   This two places mentions the `type` field:
   https://github.com/apache/apisix/blob/2f4a4dba2c0cbc426ae99133c2546112ea71dba8/apisix/consumer.lua#L46
   https://github.com/apache/apisix/blob/2f4a4dba2c0cbc426ae99133c2546112ea71dba8/apisix/admin/consumers.lua#L55
   
   # Docs about plugin category
   From the docs, most plugin in the '**Authentication**' category will initialization with `type = 'auth'` in code, like [ basic-auth / jwt-auth / hmac-auth / wolf-rbac etc... ]  
   https://github.com/apache/apisix/blob/2f4a4dba2c0cbc426ae99133c2546112ea71dba8/apisix/plugins/basic-auth.lua#L56
   
   But I found **not all** plugins in the '**Authentication**' category will specify `type = 'auth'`, such as this:
   https://apisix.apache.org/zh/docs/apisix/plugins/authz-casbin/
   
   So I think the origin usage about the `type` is not `category` means, right?


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


Re: [I] feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema [apisix]

Posted by "smileby (via GitHub)" <gi...@apache.org>.
smileby commented on issue #8164:
URL: https://github.com/apache/apisix/issues/8164#issuecomment-1868499120

   @shreemaan-abhishek  Hi, Hello, do you feel there is still a need for support in this matter?


-- 
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] starsz commented on issue #8164: feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema

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

   > So what is the use case for "security" and the other types, and how to classify them?
   
   IMO, I think we can follow the docs of APISIX, https://apisix.apache.org/docs/apisix/installation-guide/
   <img width="276" alt="image" src="https://user-images.githubusercontent.com/25628854/197705116-38ff7072-ea3c-4350-850b-dbc822e432d9.png">
   
   
   The type also can be used in the dashboard, for example 
   <img width="2248" alt="image" src="https://user-images.githubusercontent.com/25628854/197706260-8702aa1f-12d0-4805-b52e-e29473312d60.png">
   The front-end can use the type field to list and filter the plugin.
   
   
   > how to classify them
   
   We can define the plugin type list as constant in the APISIX core first.


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


Re: [I] feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema [apisix]

Posted by "starsz (via GitHub)" <gi...@apache.org>.
starsz closed issue #8164: feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema
URL: https://github.com/apache/apisix/issues/8164


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


Re: [I] feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema [apisix]

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #8164:
URL: https://github.com/apache/apisix/issues/8164#issuecomment-1869222101

   assigned to you


-- 
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] pixeldin commented on issue #8164: feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema

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

   @starsz, I would love to try it out, can you assign it to 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.

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 #8164: feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema

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

   The `auth` type is used here: https://github.com/apache/apisix/blob/e2d0f0b16bb157412684a38b129d12acb4628d39/apisix/consumer.lua#L46. (BTW, the `auth` is a bad name to me. It would be better to be named as `consumer`. We keep this name just because we don't have a chance to rename it.) 
   
   The `auth` type is also used in the dashboard to make sure a plugin can be bound with the consumer.
   
   So what is the use case for `"security"` and the other types, and how to classify them?


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


Re: [I] feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema [apisix]

Posted by "smileby (via GitHub)" <gi...@apache.org>.
smileby commented on issue #8164:
URL: https://github.com/apache/apisix/issues/8164#issuecomment-1869553681

   @shreemaan-abhishek  I referred to #8362  and completed the PR quickly. If you have time, please check if there is any problem. Thank you.


-- 
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] shreemaan-abhishek commented on issue #8164: feat: As a user, I want to add type for every plugin, so that we can get the type info of every plugin in the schema

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #8164:
URL: https://github.com/apache/apisix/issues/8164#issuecomment-1704918504

   @pixeldin any updates?


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