Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom authorization in Kong #7518

Closed
reetik-raj opened this issue Jul 1, 2021 · 1 comment
Closed

Custom authorization in Kong #7518

reetik-raj opened this issue Jul 1, 2021 · 1 comment

Comments

@reetik-raj
Copy link

reetik-raj commented Jul 1, 2021

We wanted to move our company's custom authorisation to Kong. Currently we have an internal table which maps URLs to scopes and using the request URL and consumer details we are able to authorise the request. We want to move all this to Kong.

We need to maintain a table on Kong level which has the different scopes associated with the different URLs. Calling another service to get the scope is also one solution for this. Any suggestions or recommended methods for this?

@kikito
Copy link
Member

kikito commented Jul 2, 2021

Good morning, you should be able to accomplish what you need by creating a Custom Plugin.

The Custom Plugin Development Guide is here:

https://docs.konghq.com/gateway-oss/2.4.x/plugin-development/

Plugins can have migrations (on db mode) and custom entities (both on db and db-less modes) which could be used to map your scopes and how they map to each consumer.

Since you are doing an auth plugin, it will probably be a good idea to give a look at the Basic Auth Plugin source code, or even use it as a base for your own plugin.

@kikito kikito closed this as completed Jul 2, 2021
@kikito kikito reopened this Jul 2, 2021
@kikito kikito closed this as completed Jul 2, 2021
@Kong Kong locked and limited conversation to collaborators Jul 2, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants