google.cloud.gcp_binaryauthorization_attestor_info module – List BinaryAuthorization.Attestor resources

Note

This module is part of the google.cloud collection (version 1.15.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install google.cloud. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: google.cloud.gcp_binaryauthorization_attestor_info.

Synopsis

  • An attestor that attests to container image artifacts.

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 3.8

  • requests >= 2.18.4

  • google-auth >= 2.25.1

Parameters

Parameter

Comments

access_token

string

The access token used to authenticate.

auth_kind

string / required

The type of credential used.

Choices:

  • "accesstoken"

  • "application"

  • "machineaccount"

  • "serviceaccount"

env_type

string

Specifies which Ansible environment you’re running this module within.

This should not be set unless you know what you’re doing.

This only alters the User Agent string for any API requests.

filters

list / elements=string

A list of filter expression strings used to filter the resources returned by the API.

Each string is a filter expression (e.g. some_field = "SOME_VALUE").

Multiple expressions are combined with a logical AND.

Refer to the filter topic documentation https://cloud.google.com/sdk/gcloud/reference/topic/filters.

Refer to the AIP-160 filter syntax documentation https://google.aip.dev/160.

project

string

The Google Cloud Platform project to use.

scopes

list / elements=string

Array of scopes to be used.

service_account_contents

jsonarg

The contents of a Service Account JSON file,

either in a dictionary or as a JSON string that represents it.

service_account_email

string

An optional service account email address if machineaccount is

selected and the user does not wish to use the default email.

service_account_file

path

The path of a Service Account JSON file if serviceaccount

is selected as type.

Notes

Note

Examples

- name: List all gcp_binaryauthorization_attestor_info resources
  google.cloud.gcp_binaryauthorization_attestor_info:
    project: "{{ gcp_project }}"
    auth_kind: "{{ gcp_cred_kind }}"
    service_account_file: "{{ gcp_cred_file }}"
  register: result

- name: List gcp_binaryauthorization_attestor_info resources matching given filters
  google.cloud.gcp_binaryauthorization_attestor_info:
    filters:
      - display_name = "my-resource"
    project: "{{ gcp_project }}"
    auth_kind: "{{ gcp_cred_kind }}"
    service_account_file: "{{ gcp_cred_file }}"
  register: result

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

changed

boolean

Whether any changes were made (always false for info modules).

Returned: always

resources

list / elements=dictionary

List of BinaryAuthorization.Attestor resources matching the supplied filters. May be empty, contain a single resource, or multiple resources.

Returned: always

description

string

A descriptive comment.

This field may be updated.

The field may be displayed in chooser dialogs.

Returned: when set

name

string

The resource name.

Returned: always

userOwnedGrafeasNote

dictionary

A Container Analysis ATTESTATION_AUTHORITY Note, created by the user.

Returned: always

delegationServiceAccountEmail

string

This field will contain the service account email address that this Attestor will use as the principal when querying Container Analysis.

Attestor administrators must grant this service account the IAM role needed to read attestations from the noteReference in Container Analysis (containeranalysis.notes.occurrences.viewer).

This email address is fixed for the lifetime of the Attestor, but callers should not make any other assumptions about the service account email; future versions may use an email based on a different naming pattern.

Returned: success

noteReference

string

The resource name of a ATTESTATION_AUTHORITY Note, created by the user.

If the Note is in a different project from the Attestor, it should be specified in the format `projects/*/notes/*` (or the legacy `providers/*/notes/*`).

This field may not be updated.

An attestation by this attestor is stored as a Container Analysis ATTESTATION_AUTHORITY Occurrence that names a container image and that links to this Note.

Returned: always

publicKeys

list / elements=dictionary

Public keys that verify attestations signed by this attestor.

This field may be updated.

If this field is non-empty, one of the specified public keys must verify that an attestation was signed by this attestor for the image specified in the admission request.

If this field is empty, this attestor always returns that no valid attestations exist.

Returned: when set

asciiArmoredPgpPublicKey

string

ASCII-armored representation of a PGP public key, as the entire output by the command `gpg --export --armor foo@example.com` (either LF or CRLF line endings).

When using this field, id should be left blank.

The BinAuthz API handlers will calculate the ID and fill it in automatically.

BinAuthz computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as upper-case hex.

If id is provided by the caller, it will be overwritten by the API-calculated ID.

Returned: when set

comment

string

A descriptive comment.

This field may be updated.

Returned: when set

id

string

The ID of this public key.

Signatures verified by BinAuthz must include the ID of the public key that can be used to verify them, and that ID must match the contents of this field exactly.

Additional restrictions on this field can be imposed based on which public key type is encapsulated.

See the documentation on publicKey cases below for details.

Returned: when set

pkixPublicKey

dictionary

A raw PKIX SubjectPublicKeyInfo format public key.

NOTE: id may be explicitly provided by the caller when using this type of public key, but it MUST be a valid RFC3986 URI.

If id is left blank, a default one will be computed based on the digest of the DER encoding of the public key.

Returned: when set

publicKeyPem

string

A PEM-encoded public key, as described in `https://tools.ietf.org/html/rfc7468#section-13`.

Returned: when set

signatureAlgorithm

string

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 publicKeyPem (i.e.

this algorithm must match that of the public key).

Returned: when set

Authors

  • Google Inc. (@googlecloudplatform)