Posts
基于Keycloak实现LDAP服务
背景 优点
LDAP 协议的价值,存量应用多。 缺点
易用性 管理机制 扩展性 高可用机制 观测 如何基于keycloak实现LDAP语义 Root DN(Base DN) 在Realm级构建
dc=realm,dc=example,dc=com Users DN(ou=users) 如果有用户bob
ou=users,dc=realm,dc=example,dc=com cn=bob,ou=users,dc=realm,dc=example,dc=com Groups DN(ou=groups) Keycloak有Groups功能,CN命名可能需要通过attribute来实现。
ou=groups,dc=realm,dc=example,dc=com cn=group1,ou=groups,dc=realm,dc=example,dc=com Clients DN(ou=clients or ou=apps) Keycloak通过Client来表示一个应用程序,如果在应用级授权,主要是通过client级role机制来实现。 如:授权bob可以登陆gitlab,可以在gitlab client中创建role: member,然后在gitlab侧的ldap认证配置中使用memberOf表达式
ou=clients,dc=realm,dc=example,dc=com cn=gitlab,ou=clients,dc=realm,dc=example,dc=com Bind(认证) OAuth2 “Direct Access Grants”
curl -X POST http://localhost:8180/realms/quickstart/protocol/openid-connect/token \ -H 'content-type: application/x-www-form-urlencoded' \ -d 'client_id=authz-servlet&client_secret=secret' \ -d 'username=alice&password=alice&grant_type=password' 注:该操作会生成session
OTP 支持 token_endpoint 支持 otp 参数
Search 其它LDAP API 大部分的场景是认证,增、删、改可以不实现,使用Keycloak的管理控制台实施。
LDAP 协议代理 GLAuth 支持多种backend,可将keycloak作为一种后端。
Posts
数据集成 - Sharding
工具 Flink CDC SeaTunnel - MySQL-CDC dts 文档 基于 Flink CDC 同步 MySQL 分库分表构建实时数据湖 多库多表场景下使用Amazon EMR CDC实时入湖最佳实践 Doris flink-doris-connector Flink Doris Connector 使用FlinkCDC接入多表或整库示例 CDCSchemaChangeExample DDL 毫秒级同步,Light Schema Change 的设计与实现|新版本揭秘 flink File Systems:Hadoop/Presto S3 文件系统插件 https://nightlies.apache.org/flink/flink-docs-release-1.17/docs/deployment/cli/ https://nightlies.apache.org/flink/flink-docs-master/zh/docs/dev/datastream/application_parameters/ flink-kubernetes-operator flink-kubernetes-operator CRD Reference Job Lifecycle Management Kubernetes HA flink-cdc MySQL CDC Connector
SeaTunnel https://doris.apache.org/zh-CN/docs/dev/ecosystem/seatunnel https://seatunnel.apache.org/docs/2.3.1/start-v2/kubernetes/
xx Flink kubernetes deployment - how to provide S3 credentials from Hashicorp Vault?
Posts
公有云 ISV 落地调查
ISV(Independent Software Vendor)即“独立软件供应商”。 MSP(Managed Service Provider)托管服务提供商。MSP 通过管理、监控和维护客户的信息技术基础设施和系统,为客户提供全面的技术支持和服务。 SI(System Integrator):系统集成商 阿里云 阿里云:云市场
类目 公司资质,成立满一年,注册资金,技术及客服团队人数,提供n * N 小时售后技术服务 保证金要求 平台服务费
阿里云:计算巢服务
云集成PaaS平台
钉钉开放平台 - 部署应用 - 计算巢
AWS AWS - Marketplace
AWS 合作伙伴网络(APN) 2500 美元的 APN 年费 成为 AWS 合作伙伴
AWS Transforms the Partner Experience to Drive Greater Customer Value and Partner Profitability AWS 改变了合作伙伴体验,以提高客户价值和合作伙伴盈利能力。
腾讯云 腾讯云 - 云市场 腾讯千帆云市场
腾讯云合作伙伴
云市场服务商申请条件 关闭 1.符合国家相关法律、法规规定; 2.有独立的研发能力及完善的售后服务能力,可提供不少于7 * 8小时的客服在线服务; 3.接受《腾讯云云市场服务商接入协议》及腾讯云云市场相关协议及《云市场服务商管理规范》; [查看各类目详细入驻条件](https://cloud.tencent.com/document/product/306/30135) 如您未登录腾讯云账号,点击“立即申请”后将为您跳转至登录页,完成登录后将跳转至申请页。 平台费用说明和保证金规则
Posts
My First Post
Introduction This is bold text, and this is emphasized text.
Visit the Hugo website!
Posts
Envoy's dynamic forward proxy
两个概念
Reverse proxy 反向代理 Forward proxy 正向代理 Envoy 文档 HTTP dynamic forward proxy 描述了“动态正向代理”是什么,设计意图等。Configuration reference-Dynamic forward proxy 提供了一个样例配置,它在代理 http 请求时,是可以工作的,但代理 https 的请求不行,会返回一个404 错误。官方FAQ Why is Envoy sending 404s to CONNECT requests? 和 Issue #11552 描述了 404 的问题。
$ curl -I -vvv https://www.baidu.com -x localhost:10000 * Rebuilt URL to: https://www.baidu.com/ * Trying ::1... * TCP_NODELAY set * Connected to localhost (::1) port 10000 (#0) * Establish HTTP proxy tunnel to www.baidu.com:443 > CONNECT www.
Posts
学习清单: TODO
Security Token Service (STS) OAuth 2.0 Token Exchange draft-ietf-oauth-token-exchange-16 istio-agent. .Values.global.sts.servicePort 选项(istio 1.6.x)。 HAProxy Proxy Protocol HAProxy Proxy Protocol Proxy Protocol(Envoy) BPF/eBPF cilium
OpenTracing opentracing文档中文版(翻译)吴晟
Algorithm Envoy supported load balancers algorithm Maglev: A Fast and Reliable Software Network Load Balancer The Power of Two Random Choices
Posts
Istio 实战:VirtualService rewrite
环境 istio 1.6.3 k8s 1.16.3 场景 需求与下述的两个用例完全一致:将请求的特定前缀删除后,再转发给后端应用,这是一个很普通的 rewrite 场景,下面的两个用例也给出了解决方案且有效。官方的文档HTTPRewrite,描述相当的简单,信息量很少,在排查问题的时候遇到困扰,好在找到了下面的两个用例,过程记录如下。
Rewrite url to the root in the gateway istio: VirtualService rewrite to the root url 目标 请求分发是否符合预期 rewrite 是否符合预期,不同的istio-proxy(istio-ingressgateway, sidecar)在这个过程中承担的角色和行为。 过程 打开envoy的accessLog,重建 istio-ingressgateway 工作负载、应用工作负载,以让这些pod里的istio-proxy 应用日志选项。
$ kubectl -n istio-system edit cm istio ...... # Set accessLogFile to empty string to disable access log. accessLogFile: "/dev/stdout" # 开启日志 ...... 以官方用例中的httpbin来做这个实验,只是对httpbin-gateway中的 VirtualService:httpbin 增加了rewrite选项,如下。这里要实现的意图与上文中 rewrite-url-to-root 的场景是一样的,解决方案也是使用的stackoverflow中描述的方案。
gateways: - httpbin-gateway http: + - match: + - uri: + prefix: /api + rewrite: + uri: " " + route: + - destination: + host: httpbin + port: + number: 8000 - route: - destination: host: httpbin 打开3个终端,观察行为。
Posts
记一次 Kubernetes 节点 OOM 的排查
环境 tke(腾讯云容器服务) 1.12.4 托管集群. 节点操作系统:ubuntu16.04.1 LTSx86_64,4.4.0-104-generic kube-proxy mode: ipvs Docker version 18.06.3-ce, build d7080c1 过程 集群内的业务rpc请求大量超时,与kube-proxy的ipvs模式udp转发规则过期问题 的现象一致。 从集群-事件中观察到以下事件,且该节点有coredns的pod。
2020-06-14 13:15:39 Warning Node 172.21.128.138.1618e2878157535e Rebooted Node 172.21.128.138 has been rebooted, boot id: 281c2a66-2bb2-4274-b979-e1f50cc56fd 后客服反馈:CVM在当时发生了OOM。在得到云厂商客服的反馈后,运维同学没有继续跟进,只是简单的认为是编排中的资源配置问题,可能导致了OOM(我们的编排中, resources.limit.memory > resources.requests.memory),对编排进行了调整。在后续的几天里,发生了4次类似的reboot情况,发生OOM时的时间点和内存监控图如下:
143, 2020-06-11 10:52 138, 2020-06-14 13:15 124, 2020-06-15 23:00 47, 2020-06-16 09:40 从以上的图表中发现:
发生OOM时,部分节点的free指标(绿色)是充裕的,按理不应该触发OOM。 发生OOM前,cache指标占80%。这可能是正常的。 我们将以上信息同步给了云厂商的技术支持,后反馈
ins-xxx ins-yyy 在这两个节点上都有发现上面的内核报错。我反馈给相关同事进一步看下 找到内核报错的方式
# journalctl --since "2020-06-14 13:00" --until "2020-06-14 14:00" ... Jun 14 13:14:38 host-172-21-128-138 kernel: ------------[ cut here ]------------ Jun 14 13:14:38 host-172-21-128-138 kernel: kernel BUG at /build/linux-SwhOyu/linux-4.
Posts
Istio:多集群安装
** 版本 1.8.0 官方文档certificate management 中的 “Plug in CA Certificates” 对此有了更好的描述。**
部署模型 Replicated control planes Shared control plane (single and multiple networks) 环境 istio 1.6.3 k8s 1.16.3 root-ca 为什么需要root-ca?多集群双向认证的必要条件,即使当前是单独部署,考虑到未来多集群的可能性,也应当做root-ca,intermediate-ca的处理。
官方文档有明确的提醒:不可将“sample”的root-ca用于生产,需要构建私有的root-ca。官方仓库有提供两个工具帮忙我们生成root-ca。
直接用 Makefile samples/certs/Makefile, 这个文件在master分支是没有的,在发布tag上有。然后执行以下命令, 会在当前目录生成4个文件
$ make root-ca generating root-key.pem Generating RSA private key, 4096 bit long modulus ..........................................................................++ ...........................................................++ e is 65537 (0x10001) generating root-cert.csr generating root-cert.pem Signature ok subject=/O=Istio/CN=Root CA Getting Private key $ tree . . ├── Makefile ├── root-ca.