【问题标题】:You must use HTTPS while generating Kong client credentials生成 Kong 客户端凭据时必须使用 HTTPS
【发布时间】:2020-01-24 18:55:40
【问题描述】:

谁能帮帮我。在 HTTP 端口 8000 上生成 KONG 客户端凭据时出错。

{
    "error_description": "You must use HTTPS",
    "error": "access_denied"
}

我也在 kong.conf 中添加了trusted_ips = 0.0.0.0/0,::/0,但它没有用。

【问题讨论】:

  • 你用过负载均衡器吗?

标签: docker rhel7 api-gateway kong kong-plugin


【解决方案1】:

您应该通过 https 进行操作(使用端口 8443 而不是 8000)。如果您使用的是 localhost,请执行以下操作:

curl -X POST \
--url "https://127.0.0.1:8443/<route name>/oauth2/token " \
  --header "Host: <route host>" \
  --data "grant_type=password" \
  --data "client_id=<clientid>" \
  --data "client_secret=<clientsecret>" \
  --data "provision_key=<provision_key>"\
  --data "redirect_uri=http://localhost/cb/" \
  --data "authenticated_userid=<userid>"  \
  --insecure

您可以关注此link 以了解有关如何进行此操作的更多详细信息

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-12-13
    • 1970-01-01
    • 2010-09-11
    • 1970-01-01
    • 2015-09-02
    • 1970-01-01
    • 1970-01-01
    • 2012-01-29
    相关资源
    最近更新 更多