fix(connector.letsencrypt): Improve Lets Encrypt integration and certificate handling; fix coreflow certificate response; add local assistant permissions config
This commit is contained in:
@@ -18,21 +18,22 @@ export class LetsencryptConnector {
|
||||
* inits letsencrypt
|
||||
*/
|
||||
public async init() {
|
||||
// Create DNS-01 challenge handler using Cloudflare
|
||||
const dnsHandler = new plugins.smartacme.handlers.Dns01Handler(
|
||||
this.cloudlyRef.cloudflareConnector.cloudflare
|
||||
);
|
||||
|
||||
// Create MongoDB certificate manager
|
||||
const certManager = new plugins.smartacme.certmanagers.MongoCertManager(
|
||||
this.cloudlyRef.config.data.mongoDescriptor
|
||||
);
|
||||
|
||||
this.smartacme = new plugins.smartacme.SmartAcme({
|
||||
accountEmail: this.cloudlyRef.config.data.letsEncryptEmail,
|
||||
accountPrivateKey: this.cloudlyRef.config.data.letsEncryptPrivateKey,
|
||||
environment: this.cloudlyRef.config.data.environment,
|
||||
setChallenge: async (dnsChallenge) => {
|
||||
await this.cloudlyRef.cloudflareConnector.cloudflare.convenience.acmeSetDnsChallenge(
|
||||
dnsChallenge,
|
||||
);
|
||||
},
|
||||
removeChallenge: async (dnsChallenge) => {
|
||||
await this.cloudlyRef.cloudflareConnector.cloudflare.convenience.acmeRemoveDnsChallenge(
|
||||
dnsChallenge,
|
||||
);
|
||||
},
|
||||
mongoDescriptor: this.cloudlyRef.config.data.mongoDescriptor,
|
||||
certManager: certManager,
|
||||
challengeHandlers: [dnsHandler],
|
||||
});
|
||||
await this.smartacme.start().catch((err) => {
|
||||
console.error('error in init', err);
|
||||
|
Reference in New Issue
Block a user