云主机测评网云主机测评网云主机测评网

云主机测评网
www.yunzhuji.net

kong网关从入门到精通

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

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

安装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:

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

接下来,我们需要创建一个名为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
打赏
版权声明:主机测评不销售、不代购、不提供任何支持,仅分享信息/测评(有时效性),自行辨别,请遵纪守法文明上网。
文章名称:《kong网关从入门到精通》
文章链接:https://www.yunzhuji.net/jishujiaocheng/7608.html

评论

  • 验证码