github.com/transparency-dev/armored-witness-os@v0.1.3-0.20240514084412-27eef7325168/api/api.proto (about) 1 /* 2 * Copyright 2022 The Armored Witness OS authors. All Rights Reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 syntax = "proto3"; 18 19 package api; 20 21 option go_package = "./;api"; 22 23 /* 24 25 Status information 26 27 The status information format is returned on any message sent with the 28 `U2FHID_ARMORY_INF` vendor specific command. 29 30 */ 31 message Status { 32 string Serial = 1; 33 bool HAB = 2; 34 string Revision = 3; 35 string Build = 4; 36 string Version = 5; 37 string Runtime = 6; 38 bool Link = 7; 39 WitnessStatus Witness = 8; 40 // IdentityCounter is incremented when the device is recovered and the device 41 // needs a new witness identity. 42 uint32 IdentityCounter = 9; 43 string SRKHash = 10; 44 string MAC = 11; 45 } 46 47 /* 48 49 WitnessStatus contains witness-applet specific status information. 50 51 This is embedded in the general Status message if the applet has provided 52 this information to the OS. 53 54 */ 55 message WitnessStatus { 56 // Identity is the note-formatted public key which can be used to verify 57 // checkpoints cosigned by this witness. 58 string Identity = 1; 59 // IP is a string representation of the witness applet's current IP address. 60 string IP = 2; 61 // IDAttestKey is the stable public key from this device, used to attest to all derived witness identities. 62 string IDAttestPublicKey = 3; 63 // AttestedID is a note-formatted signed attestation for the current witness identity. 64 // This attestation note contains: 65 // "ArmoredWitness ID attestation v1" 66 // <Device serial> 67 // <Witness identity counter in decimal> 68 // <Witness identity as a note verifier string> 69 string AttestedID = 4; 70 } 71 72 /* 73 74 Trusted Applet configuration 75 76 The trusted applet configuration format, any configuration exchange will cause 77 an existing trusted applet instance to be termimnated for re-initialization. 78 79 The configuration message is sent with the `U2FHID_ARMORY_CFG` vendor specific 80 command. 81 82 */ 83 84 message Configuration { 85 bool DHCP = 1; 86 string IP = 2; 87 string Netmask = 3; 88 string Gateway = 4; 89 string Resolver = 5; 90 string NTPServer = 6; 91 } 92 93 /* 94 95 Log messages 96 97 */ 98 99 message LogMessagesRequest { 100 bool Continue = 1; 101 } 102 103 message LogMessagesResponse { 104 bytes Payload = 1; 105 bool More = 2; 106 } 107 108 message Response { 109 ErrorCode Error = 1; 110 bytes Payload = 2; 111 } 112 113 enum ErrorCode { 114 NONE = 0; 115 116 // GENERIC_ERROR is returned in case of a generic error, in this case 117 // Payload might contain the error string. 118 GENERIC_ERROR = 1; 119 }