awx_plugins.credentials.plugin module

class awx_plugins.credentials.plugin.CertFiles(cert, key=None)

Bases: object

A context manager used for writing a certificate and (optional) key to $TMPDIR, and cleaning up afterwards.

This is particularly useful as a shared resource for credential plugins that want to pull cert/key data out of the database and persist it temporarily to the file system so that it can loaded into the OpenSSL certificate chain (generally, for HTTPS requests plugins make via the Python requests library)

with CertFiles(cert_data, key_data) as cert:

# cert is string representing a path to the certificate or PEM file # temporarily written to disk requests.post(…, cert=cert)

certfile: IO[bytes] | None = None
class awx_plugins.credentials.plugin.CredentialPlugin(name: str, inputs: object, backend: object)

Bases: NamedTuple

Schema for credential plugins.

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('name', 'inputs', 'backend')
classmethod _make(iterable)

Make a new CredentialPlugin object from a sequence or iterable

_replace(**kwds)

Return a new CredentialPlugin object replacing specified fields with new values

backend: object

Alias for field number 2

inputs: object

Alias for field number 1

name: str

Alias for field number 0

awx_plugins.credentials.plugin.raise_for_status(resp)