cert_v1.proto 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. syntax = "proto3";
  2. package cert;
  3. option go_package = "github.com/slackhq/nebula/cert";
  4. //import "google/protobuf/timestamp.proto";
  5. enum Curve {
  6. CURVE25519 = 0;
  7. P256 = 1;
  8. }
  9. message RawNebulaCertificate {
  10. RawNebulaCertificateDetails Details = 1;
  11. bytes Signature = 2;
  12. }
  13. message RawNebulaCertificateDetails {
  14. string Name = 1;
  15. // Ips and Subnets are in big endian 32 bit pairs, 1st the ip, 2nd the mask
  16. repeated uint32 Ips = 2;
  17. repeated uint32 Subnets = 3;
  18. repeated string Groups = 4;
  19. int64 NotBefore = 5;
  20. int64 NotAfter = 6;
  21. bytes PublicKey = 7;
  22. bool IsCA = 8;
  23. // sha-256 of the issuer certificate, if this field is blank the cert is self-signed
  24. bytes Issuer = 9;
  25. Curve curve = 100;
  26. }
  27. message RawNebulaEncryptedData {
  28. RawNebulaEncryptionMetadata EncryptionMetadata = 1;
  29. bytes Ciphertext = 2;
  30. }
  31. message RawNebulaEncryptionMetadata {
  32. string EncryptionAlgorithm = 1;
  33. RawNebulaArgon2Parameters Argon2Parameters = 2;
  34. }
  35. message RawNebulaArgon2Parameters {
  36. int32 version = 1; // rune in Go
  37. uint32 memory = 2;
  38. uint32 parallelism = 4; // uint8 in Go
  39. uint32 iterations = 3;
  40. bytes salt = 5;
  41. }