Skip to content
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

Admin API security #133

Closed
subnetmarco opened this issue Apr 13, 2015 · 13 comments
Closed

Admin API security #133

subnetmarco opened this issue Apr 13, 2015 · 13 comments
Labels
task/feature Requests for new features in Kong

Comments

@subnetmarco
Copy link
Member

In kong.yml it would be nice to have a configuration entry that protects the management API, for example:

admin_allowed_ips:
  - 127.0.0.1
  - 192.168.0.0/16
@subnetmarco subnetmarco added this to the 0.2.0 milestone Apr 13, 2015
@subnetmarco
Copy link
Member Author

Maybe this could be a plugin?

@ahmadnassri
Copy link
Contributor

+1 for plugin.

by default localhost, plugin to manage additional sources.

@sonicaghi
Copy link
Member

EVERYTHING should be a plugin. the core kong as lightweight as possible.

@sonicaghi
Copy link
Member

API Admin plugin

@subnetmarco subnetmarco modified the milestones: 0.2.1, 0.2.0 Apr 24, 2015
@subnetmarco subnetmarco added the idea/new plugin [legacy] those issues belong to Kong Nation, since GitHub issues are reserved for bug reports. label May 1, 2015
@thibaultcha thibaultcha changed the title Management API security Admin API security May 7, 2015
@montanaflynn
Copy link

by default localhost, plugin to manage additional sources.

I like default how it is currently. Anyone in production will set up appropriate firewalls using iptables, AWS security groups, or running their Kong(s) in an internal private network which is blocked off from public access except for port 80.

I agree with the plugin, it would be nice to have a whitelist & blacklist plus support for matching subnets. This would allow us to be on par with nginx's ngx_http_access_module, and should be introduced not only for the admin API but also as a plugin available for all user created APIs.

@subnetmarco subnetmarco modified the milestones: 0.3.0, 0.2.1 May 11, 2015
@subnetmarco subnetmarco modified the milestones: 0.3.1, 0.3.0 Jun 2, 2015
@thibaultcha thibaultcha removed this from the 0.3.1 milestone Jun 8, 2015
@subnetmarco
Copy link
Member Author

It's related to #379.

@subnetmarco
Copy link
Member Author

We should find a way to use existing plugins for the admin API. @thibaultcha Including CORS, user authentication, IP whitelisting/blacklisting, etc. While still having the admin running separately.

This means that the plugin execution handlers in kong.lua need to be also used in the content_by_lua of the admin server on port 8001. As opposed to the server on port 8000, we decide which plugins are running and are installed on the Admin API (opened #380).

@sonicaghi
Copy link
Member

^

Kong Shield: can be new commercial solution.

Enterprise Admin Governance.

@sgulics
Copy link

sgulics commented Aug 28, 2015

How are people securing the admin api in production environments? I would assume that if someone added/changed/deleted an API through the ADMIN API, you would want to know who did it.

@thibaultcha
Copy link
Member

They put the port behind a firewall for internal usage only.

@subnetmarco
Copy link
Member Author

@sgulics as per proper authentication and activity logging, this is related to #380

@thibaultcha thibaultcha added task/feature Requests for new features in Kong and removed idea/new plugin [legacy] those issues belong to Kong Nation, since GitHub issues are reserved for bug reports. labels Oct 16, 2015
@ahmadnassri ahmadnassri added the BC label May 13, 2016
@thibaultcha thibaultcha removed the BC label Sep 1, 2016
@p0pr0ck5
Copy link
Contributor

p0pr0ck5 commented Jun 2, 2017

We have published a doc that highlights some of the best practices we suggest when considering securing the Admin API: https://getkong.org/docs/0.10.x/secure-admin-api/

@p0pr0ck5
Copy link
Contributor

p0pr0ck5 commented Aug 7, 2017

Worth noting here that Kong Enterprise now supports RBAC!

Not sure how much value is left in keeping this issue open...

gszr pushed a commit that referenced this issue Jun 10, 2021
gszr pushed a commit that referenced this issue Aug 6, 2021
javierguerragiraldez pushed a commit that referenced this issue Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task/feature Requests for new features in Kong
Projects
None yet
Development

No branches or pull requests

7 participants