Add RDAP special notice for domains in XAP - #3221
Conversation
384eaaf to
dec4496
Compare
gbrodman
left a comment
There was a problem hiding this comment.
@gbrodman reviewed 16 files and all commit messages, and made 8 comments.
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on CydeWeys).
core/src/main/java/google/registry/batch/SyncRemoteCacheAction.java line 96 at r1 (raw file):
@Inject @Config("domainExpiryAccessPeriodTotalLength") Duration domainExpiryAccessPeriodTotalLength = Duration.ofDays(10);
Inject via constructor, like the rest of the fields. No need for default.
core/src/main/java/google/registry/batch/SyncRemoteCacheAction.java line 200 at r1 (raw file):
String key = getKeyFunction.apply(resource); if (shouldSaveResourceInRemoteCache(resource, tm().getTxTime())) { toSaveBuilder.add(new SimplifiedJedisClient.JedisResource<>(key, resource));
The simplified jedis client, for now, sets the expiration time of the object to the deletion time. We'll probably need to change that, I would think.
core/src/main/java/google/registry/cache/DomainCache.java line 30 at r1 (raw file):
* domains. */ default Optional<Domain> loadMostRecentByDomainName(String domainName) {
this is not a good name, especially in relation to the other method
like, if i read this i'm like "what, does the other method not load the most recent?"
And if it's meant for use in CacheModule when Valkey isn't configured, it doesn't work -- that delegates loadByDomainName() to FKUtils.loadResourceByCache which filters out deleted domains
core/src/main/java/google/registry/cache/MultilayerEppResourceCache.java line 67 at r1 (raw file):
@SuppressWarnings("unchecked") protected Optional<V> loadMostRecentFromCaches(Class<V> clazz, String key) {
so this is just the method above without the deletion filtering? that method should probably just call this one then and do the filtering
core/src/main/java/google/registry/model/ForeignKeyUtils.java line 413 at r1 (raw file):
*/ @SuppressWarnings("unchecked") public static <E extends EppResource> Optional<E> loadMostRecentResourceByCache(
again i don't like the name here. Emphasize that this includes deleted resources.
core/src/main/java/google/registry/rdap/RdapDomainAction.java line 50 at r1 (raw file):
public class RdapDomainAction extends RdapActionBase { @Inject
inject this in the constructor
core/src/main/java/google/registry/rdap/RdapObjectClasses.java line 560 at r1 (raw file):
@RestrictJsonNames({}) @SuppressWarnings("UnusedVariable") public static class DomainInExpiryAccessPeriodErrorResponse extends ReplyPayloadBase {
this could possibly share a common base class with the BSA error exception but it's not a big deal
core/src/test/java/google/registry/batch/SyncRemoteCacheActionTest.java line 172 at r1 (raw file):
verifyMetrics(SUCCESS); }
will also need to test a proper Valkey expiry for when XAP is enabled
When an RDAP lookup is performed for a domain that is currently in the Expiry Access Period (XAP), return HTTP 404 with a custom status notice: "This domain is currently available for registration in the Expiry Access Period". This behavior mirrors how BSA-blocked domains return specialized RDAP notices. To optimize performance and eliminate redundant Cloud SQL database calls on 404 queries: - Expose loadMostRecentByDomainName in DomainCache and MultilayerDomainCache to retrieve soft-deleted domains without filtering them out, while preserving temporal projections. - Update SyncRemoteCacheAction to retain soft-deleted domains in Valkey for the duration of the XAP window on XAP-enabled TLDs instead of immediately deleting them, allowing RDAP lookups to be served directly from Valkey with 0 database queries. - Evaluate XAP eligibility entirely in-memory in RdapDomainAction using the already-loaded domain object. - Add comprehensive unit tests in RdapDomainActionTest, MultilayerDomainCacheTest, SyncRemoteCacheActionTest, and DomainFlowUtilsTest. TAG=agy CONV=214408e9-2dbb-44b8-af91-1ca29401d1f5 BUG=http://b/553509095
dec4496 to
3c31ce0
Compare
When an RDAP lookup is performed for a domain that is currently in the Expiry Access Period (XAP), return HTTP 404 with a custom status notice: "This domain is currently available for registration in the Expiry Access Period". This behavior mirrors how BSA-blocked domains return specialized RDAP notices.
To optimize performance and eliminate redundant Cloud SQL database calls on 404 queries:
TAG=agy
CONV=214408e9-2dbb-44b8-af91-1ca29401d1f5
BUG=http://b/553509095
This change is