google-nomulus/java/google/registry
nickfelt 499f1e7dbc Rewrite ServerSecret caching and accessor logic
I'm working on some changes to XsrfTokenManager (b/35388772) and ServerSecret
was crufty enough that I ended up rewriting it.  Now it uses a LoadingCache
with a transaction instead of needlessly race-condition-y static init logic.

It also now supports retrieving its value as either a UUID (the old format
used by XsrfTokenManager) or a byte[].  The latter is more flexible and can
be directly used with HMAC which the new XsrfTokenManager format will employ.

And lastly, I added tests.  In addition, I tested this code on alpha and
verified appropriate operation (XSRF tokens still work from the console and
from regtool; if you remove ServerSecret from datastore and memcache, it
persists a new one).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148931620
2017-03-07 13:30:18 -05:00
..
backup Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
batch Replace 'host.getSubordinateHost() != null' with 'host.isSubordinate()' 2017-02-06 16:45:23 -05:00
bigquery Change BigQuery call from update to patch 2017-02-06 16:45:23 -05:00
braintree Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
builddefs Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
config Add missing newline to default-config.yaml 2017-03-07 13:22:52 -05:00
cron Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
dns Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
eclipse Restructure Maven dependencies in build 2017-01-09 11:59:04 -05:00
env Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
export Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
flows Remove duplicate version of lookupSuperordinateDomain() function 2017-03-07 13:12:09 -05:00
gcs Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
groups Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
idn Run buildifier on codebase to format BUILD files 2016-11-28 18:15:21 -05:00
keyring Fix bugs in KmsConnectionImpl 2017-03-07 13:25:51 -05:00
loadtest Daggerize XsrfTokenManager 2017-02-22 11:43:10 -05:00
mapreduce Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
model Rewrite ServerSecret caching and accessor logic 2017-03-07 13:30:18 -05:00
module Remove Builder type param on RequestComponentBuilder/RequestHandler 2017-02-27 11:12:07 -05:00
monitoring Re-add some accidentally removed license headers 2017-02-06 16:45:23 -05:00
pricing Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
rdap Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
rde Remove duplicate version of lookupSuperordinateDomain() function 2017-03-07 13:12:09 -05:00
request Add XSRF protection to legacy authentication mechanism 2017-03-07 13:18:04 -05:00
security Rewrite ServerSecret caching and accessor logic 2017-03-07 13:30:18 -05:00
storage/drive Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
tldconfig/idn Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
tmch Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
tools Drop FixDomainNameserverKeysCommand 2017-03-07 13:16:34 -05:00
ui Add XSRF protection to legacy authentication mechanism 2017-03-07 13:18:04 -05:00
util Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
whois Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
xjc Add mapper to import domains from RDE deposits 2017-02-06 16:46:46 -05:00
xml Replace Throwables.propagate and variants with Guava 20 versions 2017-02-02 17:01:23 -05:00
BUILD Move the environment configuration YAML files into the main JAR 2017-02-06 16:46:52 -05:00
repositories.bzl Set generates_api=1 for Dagger component processor 2017-03-07 13:27:21 -05:00