syntax = "proto2";

package hirs.pb;
option java_package="hirs.attestationca.configuration.provisionerTpm2";

message FirmwareInfo {
  required string biosVendor = 1;
  required string biosVersion = 2;
  required string biosReleaseDate = 3;
}

message HardwareInfo {
  required string manufacturer = 1;
  required string productName = 2;
  required string productVersion = 3;
  required string systemSerialNumber = 4;
  repeated ComponentInfo chassisInfo = 5;
  repeated ComponentInfo baseboardInfo = 6;
  repeated ComponentInfo processorInfo = 7;
  repeated ComponentInfo biosOrUefiInfo = 8;
  repeated ComponentInfo nicInfo = 9;
  repeated ComponentInfo hardDriveInfo = 10;
  repeated ComponentInfo memoryInfo = 11;
}

message ComponentInfo {
  required string manufacturer = 1;
  required string model = 2;
  optional string serialNumber = 3;
  optional string revision = 4;
}

message NetworkInfo {
  required string hostname = 1;
  required string ipAddress = 2;
  required string macAddress = 3;
}

message OsInfo {
  required string osName = 1;
  required string osVersion = 2;
  required string osArch = 3;
  required string distribution = 4;
  required string distributionRelease = 5;
}

message DeviceInfo {
  required FirmwareInfo fw = 1;
  required HardwareInfo hw = 2;
  required NetworkInfo nw = 3;
  required OsInfo os = 4;
}

message IdentityClaim {
  required DeviceInfo dv = 1;
  required bytes ak_public_area = 2;
  required bytes ek_public_area = 3;
  optional bytes endorsement_credential = 4;
  repeated bytes platform_credential = 5;
  optional string client_version = 6;
  optional string paccorOutput = 7;

}

message IdentityClaimResponse {
  required bytes credential_blob = 1;
}

message CertificateRequest {
  required bytes nonce = 1;
}

message CertificateResponse {
  required bytes certificate = 1;
}

