基于微服务架构的RBAC权限管理系统
1、各模块调用流程说明
具体功能模块都是部署为单独的内网http服务,如ResourceManager服务、ProjectManager服务等。功能模块在启动时,将自己注册到权限管理服务Authority和Consul服务中。
用户的访问流程如下:1、用户Client 向Ocelot网关ApiGateway发起http 的API调用服务;2、ApiGateway 通过访问 Consul服务器中的服务列表,将 外网API调用的 Uri 翻译为内网调用的 Uri;3、ApiGateway 调用内网 Uri 服务;4、功能模块收到调用,判断用户是否有权限调用该接口。判断过程中,如有需要,会访问权限服务器 RbacAuthServer;5、结果数据返回给ApiGateway网关;6、ApiGateway网关将结果数据返回给用户Client。
2、系统默认配置参数:
"Authority": "http://localhost:12345",
"ConsulAddress": "http://localhost:8500",
"ApiGateway": "http://localhost:5500",
3、本系统最大的好处
功能模块服务能力的弹性配置,可以向Consul服务器中注册多台相同功能的功能服务,以实现服务器的集群。应对较大规模的计算服务。服务规模伸缩自如。