Skip to content

Commit 9f146b8

Browse files
authored
Merge pull request NginxProxyManager#1099 from jc21/updates-dns-providers
Updates Porkbun, DuckDNS & Azure challenge providers
2 parents 9a2d965 + 2616709 commit 9f146b8

File tree

2 files changed

+52
-34
lines changed

2 files changed

+52
-34
lines changed

frontend/js/app/nginx/certificates/form.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,20 @@ const App = require('../../main');
44
const CertificateModel = require('../../../models/certificate');
55
const template = require('./form.ejs');
66
const i18n = require('../../i18n');
7-
const dns_providers = require('../../../../../global/certbot-dns-plugins');
7+
const dns_providers = sortProvidersAlphabetically(require('../../../../../global/certbot-dns-plugins'));
88

99
require('jquery-serializejson');
1010
require('selectize');
1111

12+
function sortProvidersAlphabetically(obj) {
13+
return Object.entries(obj)
14+
.sort((a,b) => a[1].display_name.toLowerCase() > b[1].display_name.toLowerCase())
15+
.reduce((result, entry) => {
16+
result[entry[0]] = entry[1];
17+
return result;
18+
}, {});
19+
}
20+
1221
module.exports = Mn.View.extend({
1322
template: template,
1423
className: 'modal-dialog',

global/certbot-dns-plugins.js

Lines changed: 42 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -40,32 +40,31 @@ certbot_dns_aliyun:dns_aliyun_access_key_secret = 1234567890abcdef1234567890abcd
4040
full_plugin_name: 'certbot-dns-aliyun:dns-aliyun',
4141
},
4242
//####################################################//
43-
// This can be reactivated once the plugin supports --dns-azure-credentials (https://github.com/binkhq/certbot-dns-azure/issues/7)
44-
// azure: {
45-
// display_name: 'Azure',
46-
// package_name: 'certbot-dns-azure',
47-
// package_version: '1.1.0',
48-
// dependencies: '',
49-
// credentials: `# This plugin supported API authentication using either Service Principals or utilizing a Managed Identity assigned to the virtual machine.
50-
// # Regardless which authentication method used, the identity will need the “DNS Zone Contributor” role assigned to it.
51-
// # As multiple Azure DNS Zones in multiple resource groups can exist, the config file needs a mapping of zone to resource group ID. Multiple zones -> ID mappings can be listed by using the key dns_azure_zoneX where X is a unique number. At least 1 zone mapping is required.
43+
azure: {
44+
display_name: 'Azure',
45+
package_name: 'certbot-dns-azure',
46+
package_version: '1.2.0',
47+
dependencies: '',
48+
credentials: `# This plugin supported API authentication using either Service Principals or utilizing a Managed Identity assigned to the virtual machine.
49+
# Regardless which authentication method used, the identity will need the “DNS Zone Contributor” role assigned to it.
50+
# As multiple Azure DNS Zones in multiple resource groups can exist, the config file needs a mapping of zone to resource group ID. Multiple zones -> ID mappings can be listed by using the key dns_azure_zoneX where X is a unique number. At least 1 zone mapping is required.
5251
53-
// # Using a service principal (option 1)
54-
// dns_azure_sp_client_id = 912ce44a-0156-4669-ae22-c16a17d34ca5
55-
// dns_azure_sp_client_secret = E-xqXU83Y-jzTI6xe9fs2YC~mck3ZzUih9
56-
// dns_azure_tenant_id = ed1090f3-ab18-4b12-816c-599af8a88cf7
52+
# Using a service principal (option 1)
53+
dns_azure_sp_client_id = 912ce44a-0156-4669-ae22-c16a17d34ca5
54+
dns_azure_sp_client_secret = E-xqXU83Y-jzTI6xe9fs2YC~mck3ZzUih9
55+
dns_azure_tenant_id = ed1090f3-ab18-4b12-816c-599af8a88cf7
5756
58-
// # Using used assigned MSI (option 2)
59-
// # dns_azure_msi_client_id = 912ce44a-0156-4669-ae22-c16a17d34ca5
57+
# Using used assigned MSI (option 2)
58+
# dns_azure_msi_client_id = 912ce44a-0156-4669-ae22-c16a17d34ca5
6059
61-
// # Using system assigned MSI (option 3)
62-
// # dns_azure_msi_system_assigned = true
60+
# Using system assigned MSI (option 3)
61+
# dns_azure_msi_system_assigned = true
6362
64-
// # Zones (at least one always required)
65-
// dns_azure_zone1 = example.com:/subscriptions/c135abce-d87d-48df-936c-15596c6968a5/resourceGroups/dns1
66-
// dns_azure_zone2 = example.org:/subscriptions/99800903-fb14-4992-9aff-12eaf2744622/resourceGroups/dns2`,
67-
// full_plugin_name: 'dns-azure',
68-
// },
63+
# Zones (at least one always required)
64+
dns_azure_zone1 = example.com:/subscriptions/c135abce-d87d-48df-936c-15596c6968a5/resourceGroups/dns1
65+
dns_azure_zone2 = example.org:/subscriptions/99800903-fb14-4992-9aff-12eaf2744622/resourceGroups/dns2`,
66+
full_plugin_name: 'dns-azure',
67+
},
6968
//####################################################//
7069
cloudflare: {
7170
display_name: 'Cloudflare',
@@ -127,9 +126,9 @@ certbot_dns_cpanel:cpanel_password = hunter2`,
127126
duckdns: {
128127
display_name: 'DuckDNS',
129128
package_name: 'certbot-dns-duckdns',
130-
package_version: '0.5',
129+
package_version: '0.6',
131130
dependencies: '',
132-
credentials: 'dns_duckdns_token=<your-duckdns-token>',
131+
credentials: 'dns_duckdns_token=your-duckdns-token',
133132
full_plugin_name: 'dns-duckdns',
134133
},
135134
//####################################################//
@@ -182,6 +181,15 @@ certbot_dns_dnspod:dns_dnspod_api_token = "DNSPOD-API-TOKEN"`,
182181
full_plugin_name: 'certbot-dns-dnspod:dns-dnspod',
183182
},
184183
//####################################################//
184+
dynu: {
185+
display_name: 'Dynu',
186+
package_name: 'certbot-dns-dynu',
187+
package_version: '0.0.1',
188+
dependencies: '',
189+
credentials: 'certbot_dns_dynu:dns_dynu_auth_token = YOUR_DYNU_AUTH_TOKEN',
190+
full_plugin_name: 'certbot-dns-dynu:dns-dynu',
191+
},
192+
//####################################################//
185193
eurodns: {
186194
display_name: 'EuroDNS',
187195
package_name: 'certbot-dns-eurodns',
@@ -327,6 +335,16 @@ dns_ovh_consumer_key = MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAw`,
327335
full_plugin_name: 'dns-ovh',
328336
},
329337
//####################################################//
338+
porkbun: {
339+
display_name: 'Porkbun',
340+
package_name: 'certbot-dns-porkbun',
341+
package_version: '0.2',
342+
dependencies: '',
343+
credentials: `dns_porkbun_key=your-porkbun-api-key
344+
dns_porkbun_secret=your-porkbun-api-secret`,
345+
full_plugin_name: 'dns-porkbun',
346+
},
347+
//####################################################//
330348
powerdns: {
331349
display_name: 'PowerDNS',
332350
package_name: 'certbot-dns-powerdns',
@@ -394,13 +412,4 @@ certbot_dns_transip:dns_transip_key_file = /etc/letsencrypt/transip-rsa.key`,
394412
credentials: 'certbot_dns_vultr:dns_vultr_key = YOUR_VULTR_API_KEY',
395413
full_plugin_name: 'certbot-dns-vultr:dns-vultr',
396414
},
397-
//####################################################//
398-
dynu: {
399-
display_name: 'Dynu',
400-
package_name: 'certbot-dns-dynu',
401-
package_version: '0.0.1',
402-
dependencies: '',
403-
credentials: 'certbot_dns_dynu:dns_dynu_auth_token = YOUR_DYNU_AUTH_TOKEN',
404-
full_plugin_name: 'certbot-dns-dynu:dns-dynu',
405-
},
406415
};

0 commit comments

Comments
 (0)