Kubernetes - Docker Architecture
Architecture
核心是 Docker daemon
Flow123456789101112131415161718192021222324252627$ docker run hello-worldUnable to find image 'hello-world:latest' locallylatest: Pulling from library/hello-world2db29710123e: Pull completeDigest: sha256:faa03e786c97f07ef34423fccceeec2398ec8a5759259f94d99078f264e9d7afStatus: Downloaded newer image for hello-world:latestHello from Docker!This message shows that your installation appears to be working correctly.To generate this message, Docker took the following st ...
Oauth2 - Authorization Code Flow
Authorization ServerMaven12345678910111213141516171819<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> <dependency> <groupId>org.springframework.security.oauth</groupId> <artifact ...
Spring Security OAuth2 - Authorization Server
授权服务器
Introspection Endpoint:校验 Access Token 的合法性
Spring Security OAuth2 架构
Authorization flowAuthorization Code Flow
Maven12345678<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId></dependency><dependency> <groupId>org.springframework.security.oauth</groupId> <artifactId>spring-security-oauth2</artifactId></dependency>
API1234567@Data@Builder@FieldDefaults(level = Acc ...
Oauth2 - Overview
问题域
开放系统间授权
账号密码
不安全
万能钥匙
适用于公司内部
特殊令牌
核心挑战是令牌的生命周期管理
微服务安全
核心是 Token
OAuth2最简向导
正式定义
Token 是核心,可类比为仆从钥匙(给应用授予有限的访问权限,让应用代表用户去访问用户数据)
优劣主要优势
OAuth2 使用代理授权的方式解决密码共享的反模式问题
主要劣势
OAuth2 不是认证协议,而是一个代理授权框架
OAuth2 提供一个宽泛的协议框架,具体安全场景需要定制
主要角色
主要术语
Token 类型
常见误区
典型 Flow
https://www.rfc-editor.org/rfc/rfc6749
Authorization Code Flow
最复杂 + 最安全 + 应用最广泛
Implicit Grant Flow
减少了授权码兑换的过程(通过 Script 解析 Access Token),适用于单页应用(无后端)
Resource Owner Password Credentials Flow
适用于公司内部应用等风险可控的场景
Client Cre ...
Spring Cloud - Load Balancing
实现方式
@LoadBalanced
负载均衡策略概念
实战
Spring Cloud - Service Discovery
Webflux
WebClient
底层原理
Spring Cloud - Service Registration
版本匹配
自动装配
实战
Kubernetes - Job/CronJob
生成模板
Job
CronJob
Kubernetes - Pod
描述
操作