美文网首页
ServiceComb认证与鉴权(二)

ServiceComb认证与鉴权(二)

作者: JW费心思 | 来源:发表于2020-06-12 16:02 被阅读0次

上一遍文章介绍了servicecomb中简单的一种接口认证方法,他是基于RSA证书来实现认证,如果需要个性化的认证,还需要尝试其他方案。


ServiceComb-fence

根据官网介绍,就是来处理接口的认证和鉴权

关于认证和鉴权时序图

authentication.png authorization.png

关于项目结构如下:

.
├── api
│   ├── authentication-server
│   │   ├── endpoint
│   │   │   ├── pom.xml
│   │   │   └── src
│   │   ├── pom.xml
│   │   └── service
│   │       ├── pom.xml
│   │       └── src
│   ├── common
│   │   ├── endpoint
│   │   │   ├── pom.xml
│   │   │   └── src
│   │   ├── pom.xml
│   │   └── service
│   │       ├── pom.xml
│   │       └── src
│   ├── edge-service
│   │   ├── endpoint
│   │   │   ├── pom.xml
│   │   │   └── src
│   │   ├── pom.xml
│   │   └── service
│   │       ├── pom.xml
│   │       └── src
│   ├── pom.xml
│   └── resource-server
│       ├── endpoint
│       │   ├── pom.xml
│       │   └── src
│       ├── pom.xml
│       └── service
│           └── pom.xml
├── authentication-server
│   ├── pom.xml
│   └── src
│       └── main
│           ├── java

启动的

  • Client 需要用户自己实现请求接口
  • Edge-service在yaml文件中指定auth调用链
  • api/Edge-service/config/cse.handler.xml中指定auth对应的handler
    <config>
      <handler id="auth"
        class="org.apache.servicecomb.authentication.edge.AuthHandler" />
      <handler id="internalAccess"
        class="org.apache.servicecomb.authentication.edge.InternalAccessHandler" />
    </config>
    

相关文章

网友评论

      本文标题:ServiceComb认证与鉴权(二)

      本文链接:https://www.haomeiwen.com/subject/fibgtktx.html