mirror of
https://github.com/google/nomulus
synced 2026-10-01 04:05:49 +00:00
Persist two singleton entities in SQL tables (#860)
* Persist two singleton entities in SQL tables A table might not be the best place to store singleton entities, but by doing this we ensure we can easily inspect them later and use the same sort of persistence logic for these that we do elsewhere. ServerSecret is stored upon retrieval so that we make sure that the same secret is used in both Datastore and SQL (we wouldn't want to change it). * Responses to CR * Don't have a separate ID for the singleton entities * Rename secret UUID * Rename and regenerate
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
-- Copyright 2020 The Nomulus Authors. All Rights Reserved.
|
||||
--
|
||||
-- Licensed under the Apache License, Version 2.0 (the "License");
|
||||
-- you may not use this file except in compliance with the License.
|
||||
-- You may obtain a copy of the License at
|
||||
--
|
||||
-- http://www.apache.org/licenses/LICENSE-2.0
|
||||
--
|
||||
-- Unless required by applicable law or agreed to in writing, software
|
||||
-- distributed under the License is distributed on an "AS IS" BASIS,
|
||||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
-- See the License for the specific language governing permissions and
|
||||
-- limitations under the License.
|
||||
|
||||
CREATE TABLE "ServerSecret" (
|
||||
secret uuid NOT NULL,
|
||||
PRIMARY KEY (secret)
|
||||
);
|
||||
|
||||
CREATE TABLE "TmchCrl" (
|
||||
certificate_revocations text NOT NULL,
|
||||
update_timestamp timestamptz NOT NULL,
|
||||
url text NOT NULL,
|
||||
PRIMARY KEY (certificate_revocations, update_timestamp, url)
|
||||
);
|
||||
Reference in New Issue
Block a user