Questions tagged [kong]
Kong is a cloud-native, fast, scalable, and distributed Microservice Abstraction Layer (also known as an API Gateway or API Middleware). Made available as an open-source project in 2015, its core values are high performance and extensibility. Actively maintained, Kong is widely used in production at companies ranging from startups to Global 5000 as well as government organizations.
774
questions
54
votes
9
answers
97k
views
Using Keycloak behind a reverse proxy: Could not open Admin loginpage because mixed Content
so I have a problem getting keycloak 3.2.1 to work behind kong (0.10.3), a reverse proxy based on nginx.
Scenario is:
I call keycloak via my gateway-route via https://{gateway}/auth and it shows me ...
33
votes
5
answers
51k
views
Docker - check if postgres is ready
I have a Kong API Gateway container and a postgres container and I need to check whether postgres has started up and ready from the Kong container before running the migrations. I was thinking of ...
30
votes
3
answers
66k
views
How to run bash as user root on alpine images with docker? su: must be suid to work properly
Edit:
The answer is so clear. One may use the flag --user root when entering the container.
docker exec -it --user root mycontainername bash or sh
I just downloaded this official ...
22
votes
1
answer
5k
views
How do I use an API Gateway in conjunction with microservices and JWTs?
Afternoon y'all,
Just looking for someone to double check my work. Is the below an effective way to secure microservices?
Premise
Breaking up our monolithic application and monolithic Partner API into ...
19
votes
1
answer
13k
views
Netflix-Zuul vs Mashape-Kong
Both Zuul and kong serve as a good API gateway layer in a microservices architecture. What are some important differences between these two?
18
votes
3
answers
9k
views
Is there a comprehensive comparison between Tyk vs Kong?
I have been developing microservices (Spring Cloud) for a while (~2 years) and heavily used Netflix Zuul. While it offers a lot of functionalities and great features, my developer mind wandered ...
15
votes
4
answers
20k
views
Is keycloak behind api gateway a good practice?
What are good arguments in favor to use or not to use Keycloak behind Api gateway (Kong)?
14
votes
2
answers
19k
views
How good is Krakend compared to Kong?
I am stuck in choosing One API gateway from the three API gateways mentioned below:
KrakenD (https://www.krakend.io/)
Kong (https://konghq.com/kong/)
Spring Cloud Gateway (https://cloud.spring.io/...
10
votes
3
answers
10k
views
Kong and JWT without creating consumers
I am currently playing around with the Kong API Gateway and I would like to use it to validate the authentication of users at the gateway and restrict access to services if the user is not logged in ...
10
votes
3
answers
48k
views
Error {"message":"failure to get a peer from the ring-balancer"} using kong ingress
Getting error msg when I trying to access with public IP:
"{"message":"failure to get a peer from the ring-balancer"}"
Looks like Kong is unable to the upstream services....
10
votes
1
answer
23k
views
How to increase max request body size on nginx ingress controller and kong
I have an a service that accepts POSTs with base64 encoded files in the body. I'm currently getting
Error: 413 Request Entity Too Large when I POST anything larger than 1MB, otherwise it works fine.
...
8
votes
1
answer
8k
views
Cert-Manager Certificate Renewal process - How it is performed?
I am using cert-manager-v0.10.0 installed from its helm chart
I am using kong like ingress controller to manage the ingress operations.
So I have created a ClusterIssuer resource in order it could ...
8
votes
3
answers
4k
views
Authentication with Kong
I'm looking at Kong to replace my current hand-rolled NodeJS API gateway. Currently I have a user service that handles authentication (written in Django) by providing a JWT back upon login, which the ...
7
votes
5
answers
7k
views
How to start Kong?
I am getting following error, when I tried to start Kong in Ubuntu
kong start [-c /path/to/kong.conf]
prefix directory /usr/local/kong not found, trying to create it
2017/11/05 21:11:41 [warn] ...
7
votes
1
answer
4k
views
Why Cassandra is used for Kong Api Gateway
Kong uses Cassandra or Postgres. Cassandra is know for write heavy application.I don't see Kong api gateway is that much write heavy,also none of table uses Cassandra one of the important feature ...
7
votes
3
answers
10k
views
How can I add a customized kong plugin into dockerized kong
I have a KONG container running and I want to add a customized plugin to it, specifically a JWT crafter.
I've downloaded the plugin but I don't know how to make it start with my KONG container. so ...
7
votes
3
answers
9k
views
Custom plugin for Kong v1.0.2 is enabled but not installed
I have a custom plugin for Kong which worked fine for Kong v0.14.1 but after I upgraded to v.1.0.2 it's throwing an error.
OS used: macOS Mojave
In kong.conf file I have this code:
log_level = ...
7
votes
1
answer
4k
views
User registration + authentication for microservices integrated with kong
I am in the process of developing a node.js microservices-based application. The individual microservices are developed including one that already handles the authentication, authorization and ...
7
votes
1
answer
11k
views
NgInx as reverse proxy with Kong
I wanna use Kong as my API Gateway, running in a Docker container. Each request must go first through a NgInx server and if the requested uri matches example.com/api it must result in the api, ...
7
votes
2
answers
12k
views
How to configure ssl for API in kong
I'm working on kong 0.13.1. Following the docs I added certificate as follows:
{
"data": [
{
"cert": "certificate is really here",
"created_at": 1529667116000,
...
7
votes
0
answers
1k
views
Using env variables in kong.yml with Kong and Docker-compose
I am trying to use Kong in declarative way with a kong.yml file. I want to be able to use environment variables in the kong.yml file. I have the following content in my docker-compose:
kong:
...
7
votes
0
answers
861
views
How to get permission response decision from keycloak authorization server
I am using kong as my api-gateway and using a plugin kong-oidc for authentication using keycloak. Authentication process is smooth and running fine. Now I want to add authorization for the requests ...
6
votes
1
answer
7k
views
Docker,Error: cannot run migrations: database needs bootstrapping;
This is what I have tried
docker run --rm \
> --link kong-database:kong-database \
> -e "KONG_DATABASE=postgres" \
> -e "KONG_PG_HOST=kong-database" \
> kong:latest kong migrations up
...
6
votes
2
answers
28k
views
My curl POST gets "Empty reply from server"
I am following this guide:
http://lua-programming.blogspot.co.uk/
I am at the part where I need to create my API. I have used kong before and have created a script to make an api. The problem is ...
6
votes
2
answers
10k
views
Custom Authentication Service in Kong API Gateway
We are currently analyzing the API gateway for our microservices and Kong is one of the possible candidate. We discovered that Kong support several plugins for authentication but the all based on ...
6
votes
1
answer
7k
views
Does Kong support API Aggregation
We are just researching a couple of API gateways, in particular Kong.
Looking through their documentation it seems they support request/response transformation.
However, if I understand this correctly,...
5
votes
1
answer
16k
views
Dockererized Kong on windows giving "An invalid response was received from the upstream server"
Please help me as I am getting "An invalid response was received from the upstream server" error on getting the data from REST endpoint using Dockerized Kong.
REST service that I am trying to access ...
5
votes
1
answer
4k
views
Kong DB-less in Docker
As of Kong 1.1 you can use db-less (declarative) configuration.
I can't find any information on how to start a Kong 1.1 based container in db-less/declarative mode without having to set up a db ...
5
votes
2
answers
7k
views
Kong, 502 Bad Gateway with localhost Service
I am facing to an issue with Kong, i created my service and my route exactly like the 5min quickstart of the Kong's documentation but i only change some parameters to setup the service with my own api ...
5
votes
2
answers
7k
views
How to use redis with kong api gateway
We are using kong api gateway as a single gateway for all apis. we are facing latency issue with few of our api's (1500-2000ms). later when we checked, latency was being created because of the "rate ...
5
votes
1
answer
1k
views
What is the recommended way to manage dev dependencies in Lua projects?
I'm building a Lua library (an internal kong plugin actually), and this is the first time I'm using Lua - let alone writing production code with it.
I've made it a luarock. From what I can see, the ...
5
votes
1
answer
1k
views
How to secure API behind Kong Gateway for both pubic and internal traffic
We currently have multiple APIs that are not behind a gateway. The APIs that are exposed publicly use OpenID Connect for authentication and claims authorization. Some of the APIs are internal only and ...
5
votes
2
answers
1k
views
Kong in Docker : Configuring API endpoints without curl
Is there a way to add API endpoints in Kong without using curl? I have Kong up and running in a docker container using docker-compose and I would like to be able to pass in a configuration file (or ...
4
votes
2
answers
5k
views
Docker Kong admin API is unreachable
I've upgraded the Docker Kong image to the version 0.14.0 and it stopped responding to connections from outside the container:
$ curl 127.0.0.1:8001 --trace-ascii dump.txt
== Info: Rebuilt URL to: ...
4
votes
3
answers
5k
views
Kong Ingress Controller - Remove Kong related headers
I have a working installation of Kong on a Kubernetes cluster, using kubernetes-ingress-controller functionality (https://github.com/Kong/kubernetes-ingress-controller).
I would like to remove the ...
4
votes
1
answer
4k
views
What is the purpose of Kong API Gateway Routes
I am trying to better understand Kong API Gateway - Routes
Let's say I add a service to my Kong Admin API. This service only allows GET requests and when you do a GET request to the service, all it ...
4
votes
3
answers
15k
views
How do you view the request details including headers, host that Kong is Making?
I am using kong as an API gateway.
I am struggling to debug the requests that kong is making to upstreams.
I have tried using the syslog plugin, but that only logs the request kong receives and the ...
4
votes
2
answers
2k
views
X-Cache-Status is always Bypass using Kong proxy-cache plugin
I have service in Kong and I have set proxy-cache plugin for that service.
curl -X POST http://localhost:8001/plugins --data "name=proxy-cache" --data "config.strategy=redis" --data 'service_id=...
4
votes
1
answer
2k
views
Kong API gateway v0.11.0 upstream_url
We are trying to set up a plugin that depends on the headers of the request, proxy it to an specific host. Ex.
curl -H 'Env: foo' http://127.0.0.1:8000/poc -> https://foo.example.com/poc
curl -H '...
4
votes
1
answer
3k
views
Kong with AWS Application Load Balancer
I was trying to create an alb-ingress-controller and point to kong-proxy. Since kong controller supports only classic loadbalancer and network loadbalancer
I followed all the mentioned steps from [...
4
votes
1
answer
441
views
Same endpoint for anonymous and authenticated users
I want to add this endpoint /graphql in kong for both anonymous and authenticated users :
if the apikey is provided consider it as authenticated
othwerwise consider it as anonymous
4
votes
1
answer
3k
views
Need help about Kong and OAuth with self-managed user-database
I need to use Kong and OAuth to build a web app and some other APIs.
Now I have:
A server for Kong.
A server storages User Information such as id, username, password. Named it as User-Database.
I ...
4
votes
3
answers
12k
views
Kong: docker-compose [PostgreSQL error] failed to retrieve PostgreSQL server_version_num: host or service not provided, or not known
I'm trying to learn how to use Kong for my API server, but met the error:
kong_1 | nginx: [error] init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:388: [PostgreSQL error] failed to ...
4
votes
2
answers
3k
views
Kong - custom plugins returning: custom-plugin plugin is enabled but not installed;
I have an instance of Kong that I am running using Dockerfile with contents:
FROM kong:1.4.0
WORKDIR /files
COPY plugins kong/plugins
ENV KONG_LOG_LEVEL=debug
ENV KONG_PLUGINS custom-plugin
ENV ...
4
votes
2
answers
635
views
After installing kong by luarocks, how do I install the binary and run it?
I installed kong by luarocks with this command:
luarocks install kong 0.14.1-0
but i can't find the binary 'kong' to start service. The document (like below), Where is the bin?:
4
votes
1
answer
1k
views
Kong for a single service that has public and private resources
Once you enable an auth plugin for a service all its resources requires authentication, what if I want to whitelist some resources and expose them publicly.
4
votes
0
answers
937
views
Kong with Docker Compose on Windows: failed loading initial list of upstreams: failed to get from node cache: could not acquire callback lock
I am experimenting with Kong deployed via Docker using Docker Compose and Docker Desktop for Windows.
When I start the container I seee a bunch of Lua errors, which from reading other posts around the ...
4
votes
0
answers
1k
views
SAML request authentication with Kong
we are using konghq as an API gateway for one of our customers but we are very new to it and therefore don't know how to tackle this authentication issue.
We have to authenticate our services with a ...
4
votes
0
answers
2k
views
How to add Authentication header to Dash-plotly app with flask backend when using Kong with oauth2?
I have setup authentication on my flask backed Dash-plotly app using Kong oauth2 plugin. I want to send the authentication header to my dash app on the /dash route. I tried sending the same via my ...
4
votes
1
answer
3k
views
Kong custom error message / response
We are looking to override Kong error response structure and write custom messages (i.e. replace "API rate limit exceeded", "Invalid authentication credentials" and others with our custom messages).
...