腾讯专有云API的设计与实现

 2022-06-13 10:06

论文总字数:28132字

摘 要

腾讯专有云是腾讯云对B类客户输出的企业版,为客户提供Iaas层的大部分能力,比如云主机、私有网络、负载均衡、云监控等。而API接入层就是用来代理这些云产品的一个统一入口。随着专有云接入越来越多的云产品,目前的API接入层暴露出一些问题:权限控制粒度太粗、安全性无法达到等保要求、接入复杂且不灵活、不支持OpenAPI。因此,为了解决这些问题,需要重新设计并实现一套API接入层。

本论文实现了一种基于资源粒度鉴权的API接入层方案。通过可自定义的资源转换器和条件转换器,将权限控制粒度由页面级别细化至接口级别、资源级别、条件级别。通过数据签名来解决请求被篡改的风险,通过时间窗口和频次控制来降低重放攻击的风险,基于这两点来满足等保提出的要求。通过可编程的协议转换器来灵活地适配不同云产品的协议格式,对外提供统一调用格式,来解决接入不灵活的问题。通过使用密钥,代替原来登录且需要二次认证的方式,来支持OpenAPI的特性。

改造后的结果是:首先,API接入层在做权限校验时,能够在接口、资源、条件三个粒度级别同时支持明确拒绝、明确允许、模糊拒绝、模糊允许这四种优先级。其次,协议适配能力更加灵活。其次,能够通过OpenAPI的方式将云产品能力赋能到客户自己的业务代码中。此外,还基于docker和k8s对服务做了容器化,实现了自动化的部署、伸缩、容灾,满足了更多的等保要求。

关键字:API接入层,资源粒度鉴权,协议适配,等保

Abstract

Tencent Cloud Enterprise is the enterprise and private version for business customers, providing most of the Iaas abilities such as the Cloud Virtual Machine, the Virtual Private Network, the Cloud Load Balance, the Cloud Monitor and so on. The API access service is the unified entrance and proxy of back-end cloud products. Along with more and more cloud products are migrated to use the API access service, the current API access service has exposed several problems. The granularity of access control is too crude. The safety can not meet the requirements of the information security level protection. It is not enough flexible and it can not support OpenAPI. Thus, to solve these problems, it is need to design and implement a new API access service.

It implements a scheme based on resource level access control. It refines the granularity from page level to action level, resource level, condition level by a customable converter. To meet the requirements of the level protection, it eliminates the risk of distorted requests by the data signature and reduces the risk of the replay attack by a time window and the frequency limit. It uses a programmable protocol converter to fit various of back-end cloud products and supply a unified call format to the caller. It replaces the mode that first login and second SMS verification with the secret key to support the characteristic of OpenAPI.

The results of reform are: First, when the API access service executes the permission check, it can support the explicit deny, the explicit allow, the fuzzy deny and the fuzzy allow on the action level, resource level and condition level. Secondly, the protocol adaptation is more flexible. Thirdly, it gives the abilities of cloud products to the custom’s own business code by OpenAPI. In addition, with the technique of docker and kubernetes, it has the ability of automatic deploy, expand and disaster recovery.

Keywords: API Access Service, Resource Level Authentication, Protocol Adaptation, Level Protection

目录

摘要 I

Abstract II

第一章 引言 1

1.1 选题背景与意义 1

1.2 文献综述 2

1.3 论文章节安排 9

第二章 设计与实现 10

2.1 系统模块架构 10

2.2 系统基于的账号数据结构 11

2.3 密钥子服务 12

2.4 接口管理子服务 13

2.5 授权子服务 16

2.6 鉴权子服务 17

2.6.1 协议格式 17

2.6.2 鉴权整体流程 19

2.6.3 时间窗口有效性 21

2.6.4 防重攻击控制 21

2.6.5 校验数据签名 21

2.6.6 频次控制 22

2.6.7 查出关联策略 23

2.6.8 策略匹配算法 24

2.7 接入子服务 26

2.8 高可用设计 27

2.8.1 基于MySQL Group Replication的数据高可用 27

2.8.2 基于docker k8s的服务高可用 27

第三章 测试 34

3.1 功能测试 34

3.1.1 数据完整性测试 34

3.1.2 权限测试 34

3.1.3 协议转换器测试 36

3.2 性能测试 36

3.3 容灾测试 37

3.3.1 服务异常恢复 37

3.3.2 误删节点恢复 38

第四章 总结与展望 39

4.1 总结 39

4.2 展望 39

致谢 40

参考文献 41

第一章 引言

    1. 选题背景与意义

腾讯专有云是腾讯云对B类客户输出的私有化企业版,为客户提供Iaas层的大部分能力,比如云主机、私有网络、云数据库等云产品。而专有云API接入层便是代理这些不同云产品的一个统一入口,它现有的架构如图1-1所示:

剩余内容已隐藏,请支付后下载全文,论文总字数:28132字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;