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
原创文章,作者:酷盾叔,如若转载,请注明出处:https://www.kdun.com/ask/114184.html
本网站发布或转载的文章及图片均来自网络,其原创性以及文中表达的观点和判断不代表本网站。如有问题,请联系客服处理。
发表回复