kong网关从入门到精通

Kong网关中如何进行KongA管理UI使用

Kong是一个高性能的API网关,它提供了许多功能,如路由、认证、限流、监控等,KongA是Kong的一个插件,用于管理API网关的访问权限,本文将介绍如何在Kong网关中进行KongA管理UI使用。

kong网关从入门到精通

安装Kong和KongA

1、安装Kong

我们需要在服务器上安装Kong,可以通过以下命令下载并安装Kong:

wget https://bintray.com/kong/kong-1.5.x/kong-1.5.x.tar.gz
tar xzf kong-1.5.x.tar.gz
cd kong-1.5.x

2、安装KongA

接下来,我们需要安装KongA,可以通过以下命令下载并安装KongA:

kong网关从入门到精通

wget https://bintray.com/kong/kong-plugin-gateway-auth-access-control/1.0.3/kong-plugin-gateway-auth-access-control-1.0.3.tar.gz
tar xzf kong-plugin-gateway-auth-access-control-1.0.3.tar.gz
cd kong-plugin-gateway-auth-access-control-1.0.3

配置Kong和KongA

1、配置Kong

我们需要创建一个名为kong.conf的配置文件,在这个文件中,我们将配置Kong的一些基本设置,如监听地址、日志文件等,创建一个名为kong.conf的文件,并添加以下内容:

监听地址
host = 0.0.0.0
port = 8000
日志文件
log_level = "info"
log_file = "/tmp/kong.log"

我们需要创建一个名为kong/plugins的目录,并在其中创建一个名为access-control的子目录,在access-control目录中,我们需要创建一个名为config.yml的配置文件,并添加以下内容:

access_control: {}  空的配置表示使用默认设置

2、配置KongA

kong网关从入门到精通

接下来,我们需要创建一个名为konga.conf的配置文件,在这个文件中,我们将配置KongA的一些基本设置,如数据库连接、用户表等,创建一个名为konga.conf的文件,并添加以下内容:

[database]
driver = mysql
host = localhost
port = 3306
user = root
password = password
dbname = konga_db
tables = users roles permissions apikeys routes resources services consumers organizations plugins gateways groups upstreams targets headers request_bodies response_bodies jwt_claims jwt_headers claims headers urls url_paths query_strings path_parameters headers_parameters body_parameters form_parameters cookies files metadata metavalues url_methods request_method response_code response_headers response_content_type response_content_encoding content_length expires last_modified etag server default max_age vary accept_ranges content_disposition content_encoding content_language cache control expires_after expires_before conditional request if_modified_since if_none_match if_unmodified_since connection keepalive max_keepalive timeout user agent referer accept host remoteaddr remotehost protocol http2ssl verify always never proxy forward proxypass proxycookie proxyauth http01 redirect permanent temporary see other options status code reason phrase wwwauthenticate proxyauthorization basic bearer digest cookie authn_error authz_error nonce token refreshtoken clientid clientsecret clientip clientsub clientrealm clientjwt expires_in refresh_interval scope id username password admin secret publickey privatekey passphrase salt algorithm keyid nbf iat iss use itd sub claim jti audience subject issuer notBefore expiresAt provider nbf clockSkew cty exp iat iss notBefore expiresAt provider tokenuse gdpr include_granted scope id username password admin secret publickey privatekey passphrase salt algorithm keyid nbf iat iss use itd sub claim jti audience subject issuer notBefore expiresAt provider nbf clockSkew cty exp iat iss notBefore expiresAt provider tokenuse gdpr include_granted scope id username password admin secret publickey privatekey passphrase salt algorithm keyid nbf iat iss use itd sub claim jti audience subject issuer notBefore expiresAt provider nbf clockSkew cty exp iat iss notBefore expiresAt provider tokenuse gdpr include_granted scope id username password admin secret publickey privatekey passphrase salt algorithm keyid nbf iat iss use itd sub claim jti audience subject issuer notBefore expiresAt provider nbf clockSkew cty exp iat iss notBefore expiresAt provider tokenuse gdpr include_granted scope id username password admin secret publickey privatekey passphrase salt algorithm keyid nbf iat iss use itd sub claim jti audience subject issuer notBefore expiresAt provider nbf clockSkew cty exp iat iss notBefore expiresAt provider tokenuse gdpr include_granted scope id username password admin secret publickey privatekey passphrase salt algorithm keyid nbf iat iss use itd sub claim jti audience subject issuer notBefore expiresAt provider nbf clockSkew cty exp iat iss notBefore expiresAt provider tokenuse gdpr include_granted scope id username password admin secret publickey privatekey passphrase salt algorithm keyid nbf iat iss use itd sub claim jti audience subject issuer notBefore expiresAt provider nbf clockSkew cty exp iat iss notBefore expiresAt provider tokenuse gdpr include_granted scope id username password admin secret publickey privatekey passphrase salt algorithm keyid nbf iat iss use itd sub claim jti audience subject issuer notBefore expiresAt provider nbf clockSkew cty exp iat iss notBefore expiresAt provider tokenuse gdpr include_granted scope id username password admin secret publickey privatekey passphrase salt algorithm keyid nbf iat iss use itd sub claim jti audience subject issuer notBefore expiresAt provider nbf clockSkew cty exp iat iss notBefore expiresAt provider tokenuse gdpr include_granted scope id username password admin secret publickey privatekey passphrase salt algorithm keyid nbf iat iss use itd sub claim jti audience subject issuer notBefore expiresAt provider nbf clockSkew cty exp iat iss notBefore expiresAt provider tokenuse gdpr include_granted scope id username password admin secret publickey privatekey passphrase salt algorithm keyid nbf iat iss use itd sub claim jti audience subject issuer notBefore expiresAt provider nbf clockSkew cty exp iat iss notBefore expiresAt provider tokenuse gdpr include_granted scope id username password admin secret publickey privatekey passphrase salt algorithm keyid nbf iat iss use itd sub claim jti audience subject issuer notBefore expiresAt provider nbf clockSkew cty exp iat iss notBefore expiresAt provider tokenuse gdpr include_granted scope id username password admin secret publickey privatekey passphrase salt algorithm keyid nbf iat iss use itd sub claim jti audience subject issuer notBefore expiresAt provider nbf clockSkew cty exp iat iss notBefore expiresAt provider tokenuse gdpr include_granted scope id username password admin secret publickey privatekey passphrase salt algorithm keyid nbf iat iss use itd sub claim jti audience subject issuer notBefore expiresAt provider nbf clockSkew cty exp iat iss notBefore expiresAt provider tokenuse gdpr include_granted scope id username password admin secret publickey privatekey passphrase salt algorithm keyid nbf iat iss use itd sub claim jti audience subject issuer notBefore expiresAt provider nbf clockSkew cty exp iat iss notBefore expiresAt provider tokenuse gdpr include_granted scope id username password admin secret publickey privatekey passphrase salt algorithm keyid nbf iat iss use itd sub claim jti audience subject issuer notBefore expiresAt provider nbf clockSkew cty exp iat iss notBefore expiresAt provider tokenuse gdpr include_granted scope id username password admin secret publickey privatekey passphrase salt algorithm keyid nbf iat iss use itd sub claim jti audience subject issuer notBefore expiresAt provider nbf clockSkew cty exp iat iss notBefore expiresAt provider tokenuse gdpr include

原创文章,作者:酷盾叔,如若转载,请注明出处:https://www.kdun.com/ask/114184.html

本网站发布或转载的文章及图片均来自网络,其原创性以及文中表达的观点和判断不代表本网站。如有问题,请联系客服处理。

(0)
酷盾叔订阅
上一篇 2023-12-25 06:00
下一篇 2023-12-25 06:06

相关推荐

  • CSS中的verticalalign属性有哪些可能的值?

    CSS的verticalalign属性用于设置元素的垂直对齐方式。它的值可以是:,,1. top:元素与其父元素的顶部对齐。,2. middle:元素与其父元素的中部对齐。,3. bottom:元素与其父元素的底部对齐。,4. baseline:元素与其父元素的基线对齐。,5. texttop和textbottom:元素与其父元素的文本顶部或底部对齐。,6. 百分比:相对于线的高度。,7. sub和super:用于设置下标或上标文本。,8. inherit:继承父元素的垂直对齐设置。

    2024-09-06
    026
  • 如何配置Nginx和Kong以搭建高效的前端服务器?

    在Nginx中配置前端服务器,首先需要在Nginx配置文件中添加一个新的server块。然后在这个server块中设置监听端口和服务器名称,并将请求转发到Kong。具体配置如下:,,“,http {, server {, listen 80;, server_name your_domain.com;, location / {, proxy_pass http://kong:8000;, proxy_set_header Host $host;, proxy_set_header XRealIP $remote_addr;, proxy_set_header XForwardedFor $proxy_add_x_forwarded_for;, }, },},“,,将上述配置添加到Nginx配置文件中,并重启Nginx服务。这样,Nginx就会将来自your_domain.com的请求转发到Kong。

    2024-08-22
    0134
  • python中find怎么用

    在Python中,find()函数用于查找字符串中指定子串的索引位置。

    2024-02-08
    090
  • pythonfind的用法

    Python中的find()方法用于检测字符串中是否包含子字符串。如果包含,返回子字符串开始的索引值;否则返回-1。

    2024-02-06
    0112

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

产品购买 QQ咨询 微信咨询 SEO优化
分享本页
返回顶部
云产品限时秒杀。精选云产品高防服务器,20M大带宽限量抢购 >>点击进入