/* * Copyright (c) 2011 SURFnet bv * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package pb_orm_test; import "orm.proto"; message KeyStateDocument { repeated EnforcerZone zones = 1; } message KeyStateExport { optional EnforcerZone zone = 1; } message EnforcerZone { required string name = 1; required string policy = 2; repeated KeyData keys = 3; required bool signconf_needs_writing = 4; required string signconf_path = 5; optional uint32 next_change = 6; // don't write determine when importing optional uint32 ttl_end_ds = 7; // after this date no old ttl is rumoured optional uint32 ttl_end_dk = 8; // after this date no old ttl is rumoured optional uint32 ttl_end_rs = 9; // after this date no old ttl is rumoured optional bool roll_ksk_now = 10 [default = false]; // ignored if ManualRollover not in Policy optional bool roll_zsk_now = 11 [default = false]; // ignored if ManualRollover not in Policy optional bool roll_csk_now = 12 [default = false]; // ignored if ManualRollover not in Policy } message KeyData { required string locator = 1; required uint32 algorithm = 2; required uint32 inception = 3; // Should be UTC Zulu time ? required KeyState ds = 4; required KeyState rrsig = 5; required KeyState dnskey = 6; required keyrole role = 7; // optional bool ds_seen = 8 [default = false]; // parent says DS has been seen // optional bool submit_to_parent = 9 [default = false]; // submit DS to parent optional bool introducing = 10 [default=true]; optional bool revoke = 11 [default = false, (orm.column).name="revoke_k"]; optional bool standby = 12 [default = false]; optional bool active_zsk = 13 [default = false]; optional bool publish = 14 [default = false]; required KeyState rrsigdnskey = 15; optional bool active_ksk = 16 [default = false]; optional dsatparent ds_at_parent = 17 [default = unsubmitted]; optional uint32 keytag = 18 [default = 0]; } message KeyState { optional rrstate state = 1 [default = sohidden]; optional uint32 last_change = 2; // Encode as UTC Zulu time ? optional bool minimize = 3 [default = false]; optional uint32 ttl = 4; } enum keyrole { KSK = 1; ZSK = 2; CSK = 3; } enum rrstate { sohidden = 0; rumoured = 1; omnipresent = 2; unretentive = 3; NA = 4; } enum dsatparent { unsubmitted = 0; submit = 1; submitted = 2; seen = 3; retract = 4; retracted = 5; }