Class: Google::Apis::BinaryauthorizationV1::PkixPublicKey

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/binaryauthorization_v1/classes.rb,
lib/google/apis/binaryauthorization_v1/representations.rb,
lib/google/apis/binaryauthorization_v1/representations.rb

Overview

A public key in the PkixPublicKey format. Public keys of this type are typically textually encoded using the PEM format.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PkixPublicKey

Returns a new instance of PkixPublicKey.



1112
1113
1114
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 1112

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#key_idString

Optional. The ID of this public key. Signatures verified by Binary Authorization must include the ID of the public key that can be used to verify them. The ID must match exactly contents of the key_id field exactly. The ID may be explicitly provided by the caller, but it MUST be a valid RFC3986 URI. If key_id is left blank and this PkixPublicKey is not used in the context of a wrapper (see next paragraph), a default key ID will be computed based on the digest of the DER encoding of the public key. If this PkixPublicKey is used in the context of a wrapper that has its own notion of key ID (e.g. AttestorPublicKey), then this field can either match that value exactly, or be left blank, in which case it behaves exactly as though it is equal to that wrapper value. Corresponds to the JSON property keyId

Returns:

  • (String)


1096
1097
1098
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 1096

def key_id
  @key_id
end

#public_key_pemString

A PEM-encoded public key, as described in https://tools.ietf.org/html/rfc7468# section-13 Corresponds to the JSON property publicKeyPem

Returns:

  • (String)


1102
1103
1104
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 1102

def public_key_pem
  @public_key_pem
end

#signature_algorithmString

The signature algorithm used to verify a message against a signature using this key. These signature algorithm must match the structure and any object identifiers encoded in public_key_pem (i.e. this algorithm must match that of the public key). Corresponds to the JSON property signatureAlgorithm

Returns:

  • (String)


1110
1111
1112
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 1110

def signature_algorithm
  @signature_algorithm
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1117
1118
1119
1120
1121
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 1117

def update!(**args)
  @key_id = args[:key_id] if args.key?(:key_id)
  @public_key_pem = args[:public_key_pem] if args.key?(:public_key_pem)
  @signature_algorithm = args[:signature_algorithm] if args.key?(:signature_algorithm)
end