kong

KONG网关 — KongA管理UI使用

落爺英雄遲暮 提交于 2019-12-27 17:51:15
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> kong虽然很强大,但是在管理方式上比较单一只能通过API请求来管理,那么有没有一个UI界面的管理工具呢?这里就要说到kong管理UI新起之秀Konga 附上: 喵了个咪的博客: w-blog.cn kong官网: https://konghq.com/ konga官网: https://github.com/pantsel/konga PS: Kong版本必须 >= 1.0.0才能正常使用konga 一,konga介绍 konga带来的一个最大的便利就是可以很好地通过UI观察到现在kong的所有的配置,并且可以对于管理kong节点情况进行查看、监控和预警,konga主要特性如下: 多用户管理 管理多个Kong节点 电子邮件异常信息通知 管理所有Kong Admin API 使用快照备份,还原和迁移Kong节点 使用运行状况检查监控节点和API状态 轻松的数据库集成(MySQL,postgresSQL,MongoDB) 二,docker安装konga 安装当然使用最方便的docker docker run -p 1337:1337 \ --network kong-net \ --name konga \ -e "NODE_ENV=production" \ pantsel/konga:0.14.1

Kong系列 - 10 - 官方开源插件介绍

假装没事ソ 提交于 2019-12-27 01:21:19
Kong官方预置大量的插件,可以在 Kong Hub 查看官方插件,其中有三类插件,官方开发的开源插件;第三方开发的开源插件;适用于Kong Enterprise的收费插件。其中官方开发的开源插件有35个。 Kong安装完成后已经预置了开源插件的代码,可以在/usr/local/share/lua/5.1/kong/plugins目录查看。也可以在Kong的github代码库 https://github.com/Kong/kong/tree/master/kong/plugins 中查看代码。 cd /usr/local/share/lua/5.1/kong/plugins ls acl datadog ldap-auth rate-limiting syslog aws-lambda file-log loggly request-size-limiting tcp-log azure-functions hmac-auth log-serializers request-termination udp-log base_plugin.lua http-log oauth2 request-transformer zipkin basic-auth ip-restriction post-function response-ratelimiting bot-detection

8-Kong和Consul如何结合

隐身守侯 提交于 2019-12-25 18:47:42
如下配置文件中 # cat /etc/kong/kong.conf | sed 's#\s*##' | grep -v '^#' | grep -v '^$' anonymous_reports = off # Send anonymous usage data such as error upstream_keepalive = 1 # Sets the maximum number of idle keepalive database = postgres # Determines which of PostgreSQL or Cassandra pg_host = rm-xxxxxxxxxxx.pg.rds.aliyuncs.com pg_port = 3433 # The port to connect to. pg_user = kong # The username to authenticate if required. pg_password = xxxxxxxx # The password to authenticate if required. pg_database = kong # The database name to connect to. dns_resolver = 127.0.0.1:8600 # the local `resolv.conf`

JWT/KONG: Cannot create JWTs with a shared secret

独自空忆成欢 提交于 2019-12-25 05:19:34
问题 I'm playing around KONG API gateway recently. I want to sign each JWT with a secret that is shared in all micros. I need this because I want other micros to be able to decode given JWT and extract payload data and work upon it (e.g. _user_id_ field in the payload). When I try to create a JWT for the first consumer, it works just fine. But when I try to create it for the second consumer I'm getting the following error: {u'secret': u"already exists with value 'secret'} I'm not exactly sure but

Same endpoint for anonymous and authenticated users

*爱你&永不变心* 提交于 2019-12-23 13:15:45
问题 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 回答1: Try the config.anonymous field in the key-auth plugin I think by: creating a consumer that you can call ‘anoynmous’ with and id 0 for example use the kong id of that consumer in anonymous field update your custom code (KongAuthentication) and check if HTTP_X_CONSUMER_CUSTOM_ID = 0 then return AnonymousUser

Kong系列 - 08 - 无数据库DB-less

我们两清 提交于 2019-12-22 15:26:35
Kong无数据库介绍 Kong在1.1.0版本(2019-03-27)开始支持无数据库模式,只需要将kong.conf中的配置项database = off即可启用无数据库方式。 无数据库采用声明方式定义实体,所有的实体都配置在其中。一旦该文件加载到Kong中,它将替换整个配置。当需要增量更改时,将对声明性配置文件进行更改,然后将其全部重新加载。 由于没有中心数据库进行协调,多个Kong节点是完全彼此独立。 由于配置实体的唯一方式是通过声明性配置,管理API的CRUD操作只支持只读方法,即GET方法,不支持POST、DELETE等方法。 无数据库加载实体声明的方式: 在kong.conf配置文件中配置declarative_config = /etc/kong/kong.yaml 调用管理API,一次性加载声明配置。 由于没有数据库,有些Kong的插件将不再能够使用,有些插件能够部分使用。 兼容的插件 bot-detection correlation-id cors datadog file-log http-log tcp-log udp-log syslog ip-restriction prometheus zipkin request-transformer response-transformer request-termination 部分兼容的插件 acl

Does Kong support API Aggregation

a 夏天 提交于 2019-12-21 17:57:26
问题 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, this seems limited to headers. Does Kong support API Aggregation like Netflix does it? 回答1: No, by default one http request into Kong will only match to one upstream url. The Kong request and response transformation plugins handle simple Header, Body and Query String manipulation but Kong doesn

Does Kong support API Aggregation

£可爱£侵袭症+ 提交于 2019-12-21 17:57:02
问题 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, this seems limited to headers. Does Kong support API Aggregation like Netflix does it? 回答1: No, by default one http request into Kong will only match to one upstream url. The Kong request and response transformation plugins handle simple Header, Body and Query String manipulation but Kong doesn

Custom Authentication Service in Kong API Gateway

佐手、 提交于 2019-12-20 15:37:25
问题 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 users stored in Kong database itself. We need to delegate this responsibility to our custom auth HTTP service and don't want to add these users in API gateway database. 回答1: It's possible to do this with some code around, instead of using the OpenID connect plugin; in effect you need to implement an

Custom Authentication Service in Kong API Gateway

假装没事ソ 提交于 2019-12-20 15:37:07
问题 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 users stored in Kong database itself. We need to delegate this responsibility to our custom auth HTTP service and don't want to add these users in API gateway database. 回答1: It's possible to do this with some code around, instead of using the OpenID connect plugin; in effect you need to implement an