From 1081f7572d6940dc832b357eb50f79e801765f01 Mon Sep 17 00:00:00 2001 From: gbrodman Date: Fri, 5 Jun 2020 16:55:12 -0400 Subject: [PATCH] Only use asymmetric VKeys for EPP resources (#611) Given that we currently have no way of reconstituting a symmetric key from the asymmetric key (or at least, we don't have a 100% reliable way of doing so) it's best to keep keys as asymmetrical, referring to the correct database. That way, we don't get situations where we cannot compare equality of two keys due to one being asymmetrical and one being symmetrical. --- .../src/main/java/google/registry/model/domain/DomainBase.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/google/registry/model/domain/DomainBase.java b/core/src/main/java/google/registry/model/domain/DomainBase.java index aaabc0ed0..999af6913 100644 --- a/core/src/main/java/google/registry/model/domain/DomainBase.java +++ b/core/src/main/java/google/registry/model/domain/DomainBase.java @@ -615,7 +615,8 @@ public class DomainBase extends EppResource @Override public VKey createVKey() { - return VKey.create(DomainBase.class, getRepoId(), Key.create(this)); + // TODO(mmuller): create symmetric keys if we can ever reload both sides. + return VKey.createOfy(DomainBase.class, Key.create(this)); } /** Predicate to determine if a given {@link DesignatedContact} is the registrant. */