
# 使用STS SDK（NUWA框架）
#### 初始化STS
NUWA中已经自带了STS插件，只需要在nuwa-module-config.yml文件中进行如下配置，即可初始化STS。这种方式可以保证在其他中间件、Cloud Map之前初始化STS，保证组件启动顺序正确。
```
nuwa:
  security:
    sts:
      enable: true
      serverDomain: xx.xx:xx
      configPath: /opt/huawei/certs/XXXService/XXXMicroService/XXXMicroService.ini
```
表1配置说明 
| 参数                             | 说明                                                                                                  |
|:---|:---|
| nuwa.security.sts.enable       | 是否初始化STS，需要配置为true。                                                                                 |
| nuwa.security.sts.serverDomain | STS服务器的地址。                                                                                          |
| nuwa.security.sts.configPath   | STS微服务证书路径，基础设施即代码（Infrastructure as Code，简称IaC）会将证书放在固定路径下，格式为/opt/huawei/certs/服务名/微服务名/微服务名.ini。 |
   
