I’m new to kong. Excuse me if my question is too simple.
I have a Flask app with multiple endpoints like:
/api/v1/end1
/api/v1/end2
/api/v1/end3
/api/v1/end4
...
I followed a kong tutorial and Create a Service object for my app:
Post {{host}}:8001/services/
{
"name": "app",
"url": "http://app:4001"
}
Then create a Route object:
Post {{host}}:8001/services/app/routes/
{
"hosts": ["app"]
}
Then, I enabled OAuth2 plugin for my service, create a consumer and get a bearer token to access my endpoints. So far everything was fine.
My question is how can I categorize the endpoints of my app? For example, I want to use authentication for the first two endpoints(/api/v1/end1
, /api/v1/end1
) but not to use authentication for the rest.
As far as I realized, authentication is done for each service object so I thought maybe I could categorize the endpoints of my upstream service and create a separate service object for each category. Is this possible? How?
I think this categorization can also help me create multiple access control lists. For example, if I have two service objects for my app, I will activate the access control list plugin for each one of them and have a separate control list.