mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
pref: 日志中加密授权信息输出替换成星号
This commit is contained in:
@@ -108,7 +108,7 @@ export class AliyunDeployCertToALB extends AbstractTaskPlugin {
|
||||
|
||||
async execute(): Promise<void> {
|
||||
this.logger.info(`开始部署证书到阿里云(alb)`);
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
const certId = await this.getAliyunCertId(access);
|
||||
|
||||
const client = await this.getLBClient(access, this.regionId);
|
||||
@@ -155,7 +155,7 @@ export class AliyunDeployCertToALB extends AbstractTaskPlugin {
|
||||
if (!this.accessId) {
|
||||
throw new Error('请选择Access授权');
|
||||
}
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
const client = await this.getLBClient(access, 'cn-shanghai');
|
||||
|
||||
const res = await client.request('DescribeRegions', {});
|
||||
@@ -180,7 +180,7 @@ export class AliyunDeployCertToALB extends AbstractTaskPlugin {
|
||||
if (!this.regionId) {
|
||||
throw new Error('请先选择地区');
|
||||
}
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
const client = await this.getLBClient(access, this.regionId);
|
||||
|
||||
const params = {
|
||||
@@ -208,7 +208,7 @@ export class AliyunDeployCertToALB extends AbstractTaskPlugin {
|
||||
if (!this.regionId) {
|
||||
throw new Error('请先选择地区');
|
||||
}
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
const client = await this.getLBClient(access, this.regionId);
|
||||
|
||||
const params: any = {
|
||||
|
||||
@@ -77,7 +77,7 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
|
||||
async onInstance() {}
|
||||
async execute(): Promise<void> {
|
||||
this.logger.info('开始部署证书到阿里云cdn');
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
const sslClient = new AliyunSslClient({
|
||||
access,
|
||||
logger: this.logger,
|
||||
@@ -151,7 +151,7 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
|
||||
if (!this.accessId) {
|
||||
throw new Error('请选择Access授权');
|
||||
}
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
|
||||
const client = await this.getClient(access);
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin {
|
||||
async onInstance() {}
|
||||
async execute(): Promise<void> {
|
||||
this.logger.info('开始部署证书到阿里云DCDN');
|
||||
const access = (await this.accessService.getById(this.accessId)) as AliyunAccess;
|
||||
const access = (await this.getAccess(this.accessId)) as AliyunAccess;
|
||||
const client = await this.getClient(access);
|
||||
const params = await this.buildParams();
|
||||
await this.doRequest(client, params);
|
||||
|
||||
@@ -116,7 +116,7 @@ export class AliyunDeployCertToFC extends AbstractPlusTaskPlugin {
|
||||
|
||||
async execute(): Promise<void> {
|
||||
this.logger.info('开始部署证书到阿里云');
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
|
||||
const client = await this.getClient(access);
|
||||
|
||||
@@ -177,7 +177,7 @@ export class AliyunDeployCertToFC extends AbstractPlusTaskPlugin {
|
||||
if (!this.accessId) {
|
||||
throw new Error('请选择Access授权');
|
||||
}
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
const client = await this.getClient(access);
|
||||
|
||||
const $OpenApi = await import('@alicloud/openapi-client');
|
||||
|
||||
@@ -108,7 +108,7 @@ export class AliyunDeployCertToNLB extends AbstractTaskPlugin {
|
||||
|
||||
async execute(): Promise<void> {
|
||||
this.logger.info(`开始部署证书到阿里云(nlb)`);
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
const certId = await this.getAliyunCertId(access);
|
||||
|
||||
const client = await this.getLBClient(access, this.regionId);
|
||||
@@ -151,7 +151,7 @@ export class AliyunDeployCertToNLB extends AbstractTaskPlugin {
|
||||
if (!this.accessId) {
|
||||
throw new Error('请选择Access授权');
|
||||
}
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
const client = await this.getLBClient(access, 'cn-shanghai');
|
||||
|
||||
const res = await client.request('DescribeRegions', {});
|
||||
@@ -176,7 +176,7 @@ export class AliyunDeployCertToNLB extends AbstractTaskPlugin {
|
||||
if (!this.regionId) {
|
||||
throw new Error('请先选择地区');
|
||||
}
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
const client = await this.getLBClient(access, this.regionId);
|
||||
|
||||
const params = {
|
||||
@@ -204,7 +204,7 @@ export class AliyunDeployCertToNLB extends AbstractTaskPlugin {
|
||||
if (!this.regionId) {
|
||||
throw new Error('请先选择地区');
|
||||
}
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
const client = await this.getLBClient(access, this.regionId);
|
||||
|
||||
const params: any = {
|
||||
|
||||
@@ -102,7 +102,7 @@ export class DeployCertToAliyunOSS extends AbstractTaskPlugin {
|
||||
async onInstance() {}
|
||||
async execute(): Promise<void> {
|
||||
this.logger.info('开始部署证书到阿里云OSS');
|
||||
const access = (await this.accessService.getById(this.accessId)) as AliyunAccess;
|
||||
const access = (await this.getAccess(this.accessId)) as AliyunAccess;
|
||||
this.logger.info(`bucket: ${this.bucket}, region: ${this.region}, domainName: ${this.domainName}`);
|
||||
const client = await this.getClient(access);
|
||||
await this.doRequest(client, {});
|
||||
|
||||
@@ -107,7 +107,7 @@ export class AliyunDeployCertToSLB extends AbstractTaskPlugin {
|
||||
|
||||
async execute(): Promise<void> {
|
||||
this.logger.info(`开始部署证书到阿里云(slb)`);
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
|
||||
const client = await this.getLBClient(access, this.regionId);
|
||||
const aliyunCert = await this.getAliyunCertId(access);
|
||||
@@ -167,7 +167,7 @@ export class AliyunDeployCertToSLB extends AbstractTaskPlugin {
|
||||
if (!this.accessId) {
|
||||
throw new Error('请选择Access授权');
|
||||
}
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
const client = await this.getLBClient(access, 'cn-shanghai');
|
||||
|
||||
const res = await client.request('DescribeRegions', {});
|
||||
@@ -192,7 +192,7 @@ export class AliyunDeployCertToSLB extends AbstractTaskPlugin {
|
||||
if (!this.regionId) {
|
||||
throw new Error('请先选择地区');
|
||||
}
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
const client = await this.getLBClient(access, this.regionId);
|
||||
|
||||
const params = {
|
||||
@@ -221,7 +221,7 @@ export class AliyunDeployCertToSLB extends AbstractTaskPlugin {
|
||||
if (!this.regionId) {
|
||||
throw new Error('请先选择地区');
|
||||
}
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
const client = await this.getLBClient(access, this.regionId);
|
||||
|
||||
const params: any = {
|
||||
|
||||
@@ -109,7 +109,7 @@ export class AliyunDeployCertToWaf extends AbstractPlusTaskPlugin {
|
||||
|
||||
async execute(): Promise<void> {
|
||||
this.logger.info('开始部署证书到阿里云');
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
let certId: any = this.cert;
|
||||
if (typeof this.cert === 'object') {
|
||||
const sslClient = new AliyunSslClient({
|
||||
@@ -163,7 +163,7 @@ export class AliyunDeployCertToWaf extends AbstractPlusTaskPlugin {
|
||||
if (!this.accessId) {
|
||||
throw new Error('请选择Access授权');
|
||||
}
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
const client = await this.getWafClient(access);
|
||||
|
||||
const instanceId = await this.getInstanceId(client);
|
||||
|
||||
@@ -83,7 +83,7 @@ export class UploadCertToAliyun extends AbstractTaskPlugin {
|
||||
|
||||
async execute(): Promise<void> {
|
||||
this.logger.info('开始部署证书到阿里云cdn');
|
||||
const access: AliyunAccess = await this.accessService.getById(this.accessId);
|
||||
const access: AliyunAccess = await this.getAccess(this.accessId);
|
||||
|
||||
let endpoint = '';
|
||||
for (const region of regionDict) {
|
||||
|
||||
Reference in New Issue
Block a user