google-nomulus/java/google/registry/model/server
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
..
KmsSecret.java Add Cloud KMS based secret storage 2017-02-17 12:22:12 -05:00
KmsSecretRevision.java Add Cloud KMS based secret storage 2017-02-17 12:22:12 -05:00
Lock.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
ServerSecret.java Rewrite ServerSecret caching and accessor logic 2017-03-07 13:30:18 -05:00