*交叉发布到k3d github 讨论、 Rancher 论坛中的主题以及traefik 的社区讨论板
2020 年的教程涉及编辑 traefik 配置图。它去哪儿了?
traefik安装说明提到了几种公开仪表板的方法:
这有效,但不持久:使用 1-time 命令kubectl -n kube-system port-forward $(kubectl -n kube-system get pods --selector "app.kubernetes.io/name=traefik" --output=name) 9000:9000
我无法让它工作:创建一个“IngressRoute”yaml 文件并将其应用到集群。这可能是由于 Klipper LB 和/或我的无知。
对于 2 服务器、2 代理集群...kubectl -n kube-system describe deploy traefik
不显示任何配置图:
Volumes:
data:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit: <unset>
tmp:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit: <unset> …
Run Code Online (Sandbox Code Playgroud) 在运行使用自定义根 CA 对流量进行签名的反向代理时,是否可以按原样运行公开可用的容器?
示例:Zscaler 互联网安全
企业环境通常运行代理。
虽然可以将自定义根 CA 证书文件安装到自定义构建的 docker 映像中并成功运行容器(例如COPY ... custom certificate ...
和RUN ... install custom certificate ...
),也可以将证书安装到容器中,然后运行自定义“entrypoint”命令来安装证书后,似乎不可能简单地告诉 Docker 信任主机信任的内容。
例如,当 Zscaler 使用其根 CA 签署响应时,docker 容器网络请求将无法验证响应,因为它们无法识别 Zscaler 根 CA。
设想:
当 Docker Compose 或 Kubernetes Helm 等工具尝试一次运行多个容器并且其中许多容器需要网络(当然)时,这个问题就会凸显出来。
在遥远的将来,可能会使用 OCI hooks 之类的东西。
在IBM Cloud CF Java Buildpack上使用Spring Boot OAuth 2 ...
https://github.com/ericis/oauth-cf-https-issue
*我已经尝试了以下的每种组合。
使用此配置,应用程序陷入了无限循环的重定向,OAuth重定向策略将其发送至http
,然后此配置将其发送至https
。
http.requiresChannel().anyRequest().requiresSecure()
没有此配置,用户可以通过http登录(不需要)。
完整配置:
http.
requiresChannel().anyRequest().requiresSecure().
authorizeRequests().
// allow access to...
antMatchers("favicon.ico", "/login", "/loginFailure", "/oauth2/authorization/ghe")
.permitAll().anyRequest().authenticated().and().oauth2Login().
// Codify "spring.security.oauth2.client.registration/.provider"
clientRegistrationRepository(this.clientRegistrationRepository()).
// setup OAuth2 client service to use clientRegistrationRepository
authorizedClientService(this.authorizedClientService()).
successHandler(this.successHandler()).
// customize login pages
loginPage("/login").failureUrl("/loginFailure").
userInfoEndpoint().
// customize the principal
userService(this.userService());
Run Code Online (Sandbox Code Playgroud)
我也尝试过:
要使用的服务器配置 https
server:
useForwardHeaders: true
tomcat:
protocolHeader: x-forwarded-proto
Run Code Online (Sandbox Code Playgroud)Servlet过滤器
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest; …
Run Code Online (Sandbox Code Playgroud)java spring-security spring-boot spring-security-oauth2 ibm-cloud