首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >cookie设置为安全,但您的重定向url在keycloak-gatekeeper中是非tls错误

cookie设置为安全,但您的重定向url在keycloak-gatekeeper中是非tls错误
EN

Stack Overflow用户
提问于 2021-10-01 05:05:17
回答 1查看 57关注 0票数 1

[error] the cookie is set to secure but your redirection url is non-tls

在我的keycloak-gatekeeper容器中面对这个问题

在我的.conf文件下面

代码语言:javascript
复制
discovery-url: http://localhost:8180/auth/realms/employee-ms/keys
skip-openid-provider-tls-verify: true
client-id: employee-admin

client-secret:

listen: :3000

enable-refresh-tokens: true
tls-cert:
tls-private-key:
redirection-url: http://localhost:8084/*
encryption-key: vGcLt8ZUdPX5fXhtLZaPHZkGWHZrT6aa
upstream-url: http://employee:80/
scopes:

resources:
- uri: /*
  methods:
  - GET

- uri: /admin/*
  methods:
  - GET
  roles:
  - openvpn:vpn-user
  - openvpn:prod-vpn

- uri: /admin/*
  methods:
  - GET
  roles:
  - openvpn:vpn-user
  - openvpn:commons-prod-vpn
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-10-02 06:25:35

错误中包含了所有内容:the cookie is set to secure but your redirection url is non-tls (http协议是非tls协议,因此您需要在那里使用https协议)。

存在与您的配置redirection-url: http://localhost:8084/*不兼容的默认值secure-cookie: true

您有两个选项:

1.)为您的应用程序配置TLS,然后即可使用redirection-url: https://localhost:8084/*

2.)禁用安全cookie secure-cookie: false

选项1更好、更安全,因为OIDC协议需要TLS (您还应该为Keycloak使用TLS )。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69400683

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档