0003-auditor_aml_staff.sql (2318B)
1 -- 2 -- This file is part of TALER 3 -- Copyright (C) 2014--2026 Taler Systems SA 4 -- 5 -- TALER is free software; you can redistribute it and/or modify it under the 6 -- terms of the GNU General Public License as published by the Free Software 7 -- Foundation; either version 3, or (at your option) any later version. 8 -- 9 -- TALER is distributed in the hope that it will be useful, but WITHOUT ANY 10 -- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 11 -- A PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 -- 13 -- You should have received a copy of the GNU General Public License along with 14 -- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> 15 -- 16 17 SET search_path TO auditor; 18 CREATE TABLE IF NOT EXISTS auditor_aml_staff 19 ( 20 row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY, 21 decider_pub BYTEA NOT NULL CHECK (LENGTH(decider_pub)=32), 22 decider_name TEXT NOT NULL, 23 is_active BOOLEAN NOT NULL, 24 read_only BOOLEAN NOT NULL, 25 master_sig_valid BOOLEAN NOT NULL, 26 last_change INT8 NOT NULL, 27 UNIQUE (decider_pub, last_change) 28 ); 29 COMMENT ON TABLE auditor_aml_staff 30 IS 'Status changes of the exchange''s AML staff, as observed by the auditor. The exchange''s own aml_staff is append-only and holds the same history, but only as a promise its code makes; this is the auditor''s independent record of who was allowed to decide when, and of what it had already seen when.'; 31 COMMENT ON COLUMN auditor_aml_staff.decider_pub 32 IS 'Public key of the AML staff member'; 33 COMMENT ON COLUMN auditor_aml_staff.is_active 34 IS 'true if the staff member was allowed to act from last_change onwards'; 35 COMMENT ON COLUMN auditor_aml_staff.read_only 36 IS 'true if the staff member had read-only access from last_change onwards, and thus could not legitimately sign decisions'; 37 COMMENT ON COLUMN auditor_aml_staff.master_sig_valid 38 IS 'true if the exchange''s offline master key really did sign this status. A status that fails this check confers no authority, but is still recorded so that the finding is raised once instead of on every round.'; 39 COMMENT ON COLUMN auditor_aml_staff.last_change 40 IS 'Time from which this status was in force, as claimed by the exchange. The status holds until the next change for the same decider_pub.';