attestation.proto 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // Copyright 2019 The Grafeas Authors. All rights reserved.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package grafeas.v1;
  16. import "grafeas/v1/common.proto";
  17. option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
  18. option java_multiple_files = true;
  19. option java_package = "io.grafeas.v1";
  20. option objc_class_prefix = "GRA";
  21. // An attestation wrapper with a PGP-compatible signature. This message only
  22. // supports `ATTACHED` signatures, where the payload that is signed is included
  23. // alongside the signature itself in the same file.
  24. // Note kind that represents a logical attestation "role" or "authority". For
  25. // example, an organization might have one `Authority` for "QA" and one for
  26. // "build". This note is intended to act strictly as a grouping mechanism for
  27. // the attached occurrences (Attestations). This grouping mechanism also
  28. // provides a security boundary, since IAM ACLs gate the ability for a principle
  29. // to attach an occurrence to a given note. It also provides a single point of
  30. // lookup to find all attached attestation occurrences, even if they don't all
  31. // live in the same project.
  32. message AttestationNote {
  33. // This submessage provides human-readable hints about the purpose of the
  34. // authority. Because the name of a note acts as its resource reference, it is
  35. // important to disambiguate the canonical name of the Note (which might be a
  36. // UUID for security purposes) from "readable" names more suitable for debug
  37. // output. Note that these hints should not be used to look up authorities in
  38. // security sensitive contexts, such as when looking up attestations to
  39. // verify.
  40. message Hint {
  41. // Required. The human readable name of this attestation authority, for
  42. // example "qa".
  43. string human_readable_name = 1;
  44. }
  45. // Hint hints at the purpose of the attestation authority.
  46. Hint hint = 1;
  47. }
  48. // Occurrence that represents a single "attestation". The authenticity of an
  49. // attestation can be verified using the attached signature. If the verifier
  50. // trusts the public key of the signer, then verifying the signature is
  51. // sufficient to establish trust. In this circumstance, the authority to which
  52. // this attestation is attached is primarily useful for lookup (how to find
  53. // this attestation if you already know the authority and artifact to be
  54. // verified) and intent (for which authority this attestation was intended to
  55. // sign.
  56. message AttestationOccurrence {
  57. // Required. The serialized payload that is verified by one or more
  58. // `signatures`.
  59. bytes serialized_payload = 1;
  60. // One or more signatures over `serialized_payload`. Verifier implementations
  61. // should consider this attestation message verified if at least one
  62. // `signature` verifies `serialized_payload`. See `Signature` in common.proto
  63. // for more details on signature structure and verification.
  64. repeated Signature signatures = 2;
  65. }