Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f6aefd2
add scaffolding for PowerDNS writer
qrtp May 2, 2025
4333a55
inherit base staging logic from DnsUpdateWriter
qrtp May 3, 2025
d32c1bc
initial conversion of DNS changes for PowerDNS API usage
qrtp May 3, 2025
5639b21
handle record updates and deletes
qrtp May 5, 2025
d0bc866
add powerDNS API logging
qrtp May 5, 2025
4a45d9e
add license headers
qrtp May 5, 2025
4fc4a72
only fetch zone details when necessary
qrtp May 6, 2025
4563454
add reference to PowerDNS OpenAPI spec
qrtp May 6, 2025
b9e5ff8
automatically create default TLD definition
qrtp May 6, 2025
e3ba1ce
use primary zone configuration and add powerDNS resource files
qrtp May 7, 2025
45d2cf7
add zone xfer settings
qrtp May 8, 2025
38ae70a
PowerDNS client updates for dynamic config
qrtp May 13, 2025
0a28a12
adjust PowerDNS zone update body format
qrtp May 13, 2025
c49477d
only process delete change types when no other updates for a given do…
qrtp May 13, 2025
8fb99bc
support A/AAAA glue records
qrtp May 14, 2025
5e71300
automatic ZSK rotation
qrtp May 15, 2025
db534d3
add license header to management example script
qrtp May 15, 2025
fa247e4
log DS values for DNSSEC config
qrtp May 15, 2025
cfc1b7f
clarify DS logging entries
qrtp May 15, 2025
50ddac7
manage TSIG configuration
qrtp May 16, 2025
be6a2b0
handle root NS server configuration for new TLDs
qrtp May 17, 2025
765454b
optional TSIG configuration flag
qrtp May 19, 2025
433652c
Merge pull request #1 from unstoppabledomains/qrtp/dns-playground
qrtp May 21, 2025
4187a49
Update console server for environment-aware assets and dispatch rules
qrtp May 23, 2025
655bfaf
Merge pull request #3 from unstoppabledomains/qrtp/console-env-awareness
qrtp May 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions console-webapp/staged/dispatch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
dispatch:
# Route console-api requests to the default service
- url: "*/console-api/*"
service: default

# Route console requests to the console service
- url: "*/console/*"
service: console

# Requests to the root domain also go to the console service
- url: "*/"
service: console

37 changes: 31 additions & 6 deletions console-webapp/staged/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,47 @@
// limitations under the License.

const express = require('express');
const path = require('path');
const fs = require('fs');

const app = express();
const PORT = process.env.PORT || 8080;

app.use("/console", express.static('dist', {
// Determine which environment's directory to use
const environment = process.env.GAE_ENV === 'standard' ? 'console-alpha' : 'dist';

function setCustomCacheControl(res, path) {
// Custom Cache-Control for HTML files - we don't want to cache them
if (express.static.mime.lookup(path) === 'text/html') {
res.setHeader('Cache-Control', 'public, max-age=0');
}
}

// Serve static files at root
app.use(express.static(environment, {
etag: false,
lastModified: false,
maxAge: '1d',
setHeaders: setCustomCacheControl
}));

function setCustomCacheControl (res, path) {
// Custom Cache-Control for HTML files - we don't want to cache them
if (express.static.mime.lookup(path) === 'text/html') {
res.setHeader('Cache-Control', 'public, max-age=0');
// Serve static files at /console
app.use('/console', express.static(environment, {
etag: false,
lastModified: false,
maxAge: '1d',
setHeaders: setCustomCacheControl
}));

// For SPA routing - redirect all other routes to index.html
app.get('*', (req, res) => {
const indexPath = path.join(environment, 'index.html');
if (fs.existsSync(indexPath)) {
res.sendFile(path.resolve(indexPath));
} else {
res.status(404).send(`Cannot find ${indexPath}`);
}
}
});

app.listen(PORT);

43 changes: 43 additions & 0 deletions core/src/main/java/google/registry/config/RegistryConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,49 @@ public static String provideLocationId(RegistryConfigSettings config) {
return config.gcpProject.locationId;
}

/** Base URL of the PowerDNS server. */
@Provides
@Config("powerDnsBaseUrl")
public static String providePowerDnsBaseUrl(RegistryConfigSettings config) {
return config.powerDns.baseUrl;
}

/** API key for the PowerDNS server. */
@Provides
@Config("powerDnsApiKey")
public static String providePowerDnsApiKey(RegistryConfigSettings config) {
return config.powerDns.apiKey;
}

/** Whether DNSSEC is enabled for the PowerDNS server. */
@Provides
@Config("powerDnsDnssecEnabled")
public static Boolean providePowerDnsDnssecEnabled(RegistryConfigSettings config) {
return config.powerDns.dnssecEnabled;
}

/** Whether TSIG is enabled for the PowerDNS server. */
@Provides
@Config("powerDnsTsigEnabled")
public static Boolean providePowerDnsTsigEnabled(RegistryConfigSettings config) {
return config.powerDns.tsigEnabled;
}

/** Default SOA MNAME for the TLD zone. */
@Provides
@Config("powerDnsRootNameServers")
public static ImmutableList<String> providePowerDnsRootNameServers(
RegistryConfigSettings config) {
return ImmutableList.copyOf(config.powerDns.rootNameServers);
}

/** Default SOA RNAME for the TLD zone. */
@Provides
@Config("powerDnsSoaName")
public static String providePowerDnsSoaName(RegistryConfigSettings config) {
return config.powerDns.soaName;
}

/**
* The product name of this specific registry. Used throughout the registrar console.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class RegistryConfigSettings {
public DnsUpdate dnsUpdate;
public BulkPricingPackageMonitoring bulkPricingPackageMonitoring;
public Bsa bsa;
public PowerDns powerDns;

/** Configuration options that apply to the entire GCP project. */
public static class GcpProject {
Expand All @@ -58,6 +59,16 @@ public static class GcpProject {
public String baseDomain;
}

/** Configuration options for PowerDNS. */
public static class PowerDns {
public String baseUrl;
public String apiKey;
public Boolean dnssecEnabled;
public Boolean tsigEnabled;
public List<String> rootNameServers;
public String soaName;
}

/** Configuration options for authenticating users. */
public static class Auth {
public List<String> allowedServiceAccountEmails;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ gcpProject:
# The base domain name of the registry service. Services are reachable at [service].baseDomain.
baseDomain: registry.test

powerDns:
baseUrl: http://localhost:8081/api/v1
apiKey: example-api-key
dnssecEnabled: false
tsigEnabled: true
rootNameServers:
- ns1.example.com.
- ns2.example.com.
soaName: nstld.example.com.

gSuite:
# Publicly accessible domain name of the running G Suite instance.
domainName: domain-registry.example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ public class DnsUpdateWriter extends BaseDnsWriter {
private final Duration dnsDefaultNsTtl;
private final Duration dnsDefaultDsTtl;
private final DnsMessageTransport transport;
private final Clock clock;
private final Update update;
private final String zoneName;
protected final Clock clock;
protected final Update update;
protected final String zoneName;

/**
* Class constructor.
Expand Down
Loading