Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ def sample_delete_attestor():
metadata=metadata,
)

def __enter__(self):
def __enter__(self) -> "BinauthzManagementServiceV1Client":
return self

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def sample_get_system_policy():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "SystemPolicyV1Client":
return self

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def sample_validate_attestation_occurrence():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "ValidationHelperV1Client":
return self

def __exit__(self, type, value, traceback):
Expand Down
75 changes: 73 additions & 2 deletions google/cloud/binaryauthorization_v1/types/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,16 @@ class Policy(proto.Message):
"""

class GlobalPolicyEvaluationMode(proto.Enum):
r""""""
r"""

Values:
GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED (0):
Not specified: DISABLE is assumed.
ENABLE (1):
Enables system policy evaluation.
DISABLE (2):
Disables system policy evaluation.
"""
GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0
ENABLE = 1
DISABLE = 2
Expand Down Expand Up @@ -212,7 +221,20 @@ class AdmissionRule(proto.Message):
"""

class EvaluationMode(proto.Enum):
r""""""
r"""

Values:
EVALUATION_MODE_UNSPECIFIED (0):
Do not use.
ALWAYS_ALLOW (1):
This rule allows all all pod creations.
REQUIRE_ATTESTATION (2):
This rule allows a pod creation if all the attestors listed
in 'require_attestations_by' have valid attestations for all
of the images in the pod spec.
ALWAYS_DENY (3):
This rule denies all pod creations.
"""
EVALUATION_MODE_UNSPECIFIED = 0
ALWAYS_ALLOW = 1
REQUIRE_ATTESTATION = 2
Expand All @@ -221,6 +243,17 @@ class EvaluationMode(proto.Enum):
class EnforcementMode(proto.Enum):
r"""Defines the possible actions when a pod creation is denied by
an admission rule.

Values:
ENFORCEMENT_MODE_UNSPECIFIED (0):
Do not use.
ENFORCED_BLOCK_AND_AUDIT_LOG (1):
Enforce the admission rule by blocking the
pod creation.
DRYRUN_AUDIT_LOG_ONLY (2):
Dryrun mode: Audit logging only. This will
allow the pod creation as if the admission
request had specified break-glass.
"""
ENFORCEMENT_MODE_UNSPECIFIED = 0
ENFORCED_BLOCK_AND_AUDIT_LOG = 1
Expand Down Expand Up @@ -372,6 +405,44 @@ class SignatureAlgorithm(proto.Enum):
algorithms. See https://cloud.google.com/kms/docs/algorithms. In
the future, BinAuthz might support additional public key types
independently of Tink and/or KMS.

Values:
SIGNATURE_ALGORITHM_UNSPECIFIED (0):
Not specified.
RSA_PSS_2048_SHA256 (1):
RSASSA-PSS 2048 bit key with a SHA256 digest.
RSA_PSS_3072_SHA256 (2):
RSASSA-PSS 3072 bit key with a SHA256 digest.
RSA_PSS_4096_SHA256 (3):
RSASSA-PSS 4096 bit key with a SHA256 digest.
RSA_PSS_4096_SHA512 (4):
RSASSA-PSS 4096 bit key with a SHA512 digest.
RSA_SIGN_PKCS1_2048_SHA256 (5):
RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
RSA_SIGN_PKCS1_3072_SHA256 (6):
RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
RSA_SIGN_PKCS1_4096_SHA256 (7):
RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
RSA_SIGN_PKCS1_4096_SHA512 (8):
RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
ECDSA_P256_SHA256 (9):
ECDSA on the NIST P-256 curve with a SHA256
digest.
EC_SIGN_P256_SHA256 (9):
ECDSA on the NIST P-256 curve with a SHA256
digest.
ECDSA_P384_SHA384 (10):
ECDSA on the NIST P-384 curve with a SHA384
digest.
EC_SIGN_P384_SHA384 (10):
ECDSA on the NIST P-384 curve with a SHA384
digest.
ECDSA_P521_SHA512 (11):
ECDSA on the NIST P-521 curve with a SHA512
digest.
EC_SIGN_P521_SHA512 (11):
ECDSA on the NIST P-521 curve with a SHA512
digest.
"""
_pb_options = {"allow_alias": True}
SIGNATURE_ALGORITHM_UNSPECIFIED = 0
Expand Down
13 changes: 12 additions & 1 deletion google/cloud/binaryauthorization_v1/types/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,18 @@ class ValidateAttestationOccurrenceResponse(proto.Message):
"""

class Result(proto.Enum):
r"""The enum returned in the "result" field."""
r"""The enum returned in the "result" field.

Values:
RESULT_UNSPECIFIED (0):
Unspecified.
VERIFIED (1):
The Attestation was able to verified by the
Attestor.
ATTESTATION_NOT_VERIFIABLE (2):
The Attestation was not able to verified by
the Attestor.
"""
RESULT_UNSPECIFIED = 0
VERIFIED = 1
ATTESTATION_NOT_VERIFIABLE = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ def sample_delete_attestor():
metadata=metadata,
)

def __enter__(self):
def __enter__(self) -> "BinauthzManagementServiceV1Beta1Client":
return self

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def sample_get_system_policy():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "SystemPolicyV1Beta1Client":
return self

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,15 @@ class ContinuousValidationPodEvent(proto.Message):
"""

class PolicyConformanceVerdict(proto.Enum):
r"""Audit time policy conformance verdict."""
r"""Audit time policy conformance verdict.

Values:
POLICY_CONFORMANCE_VERDICT_UNSPECIFIED (0):
We should always have a verdict. This is an
error.
VIOLATES_POLICY (1):
The pod violates the policy.
"""
POLICY_CONFORMANCE_VERDICT_UNSPECIFIED = 0
VIOLATES_POLICY = 1

Expand All @@ -84,7 +92,16 @@ class ImageDetails(proto.Message):
"""

class AuditResult(proto.Enum):
r"""Result of the audit."""
r"""Result of the audit.

Values:
AUDIT_RESULT_UNSPECIFIED (0):
Unspecified result. This is an error.
ALLOW (1):
Image is allowed.
DENY (2):
Image is denied.
"""
AUDIT_RESULT_UNSPECIFIED = 0
ALLOW = 1
DENY = 2
Expand Down
75 changes: 73 additions & 2 deletions google/cloud/binaryauthorization_v1beta1/types/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,16 @@ class Policy(proto.Message):
"""

class GlobalPolicyEvaluationMode(proto.Enum):
r""""""
r"""

Values:
GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED (0):
Not specified: DISABLE is assumed.
ENABLE (1):
Enables system policy evaluation.
DISABLE (2):
Disables system policy evaluation.
"""
GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0
ENABLE = 1
DISABLE = 2
Expand Down Expand Up @@ -214,7 +223,20 @@ class AdmissionRule(proto.Message):
"""

class EvaluationMode(proto.Enum):
r""""""
r"""

Values:
EVALUATION_MODE_UNSPECIFIED (0):
Do not use.
ALWAYS_ALLOW (1):
This rule allows all all pod creations.
REQUIRE_ATTESTATION (2):
This rule allows a pod creation if all the attestors listed
in ``require_attestations_by`` have valid attestations for
all of the images in the pod spec.
ALWAYS_DENY (3):
This rule denies all pod creations.
"""
EVALUATION_MODE_UNSPECIFIED = 0
ALWAYS_ALLOW = 1
REQUIRE_ATTESTATION = 2
Expand All @@ -223,6 +245,17 @@ class EvaluationMode(proto.Enum):
class EnforcementMode(proto.Enum):
r"""Defines the possible actions when a pod creation is denied by
an admission rule.

Values:
ENFORCEMENT_MODE_UNSPECIFIED (0):
Do not use.
ENFORCED_BLOCK_AND_AUDIT_LOG (1):
Enforce the admission rule by blocking the
pod creation.
DRYRUN_AUDIT_LOG_ONLY (2):
Dryrun mode: Audit logging only. This will
allow the pod creation as if the admission
request had specified break-glass.
"""
ENFORCEMENT_MODE_UNSPECIFIED = 0
ENFORCED_BLOCK_AND_AUDIT_LOG = 1
Expand Down Expand Up @@ -372,6 +405,44 @@ class SignatureAlgorithm(proto.Enum):
algorithms. See https://cloud.google.com/kms/docs/algorithms. In
the future, BinAuthz might support additional public key types
independently of Tink and/or KMS.

Values:
SIGNATURE_ALGORITHM_UNSPECIFIED (0):
Not specified.
RSA_PSS_2048_SHA256 (1):
RSASSA-PSS 2048 bit key with a SHA256 digest.
RSA_PSS_3072_SHA256 (2):
RSASSA-PSS 3072 bit key with a SHA256 digest.
RSA_PSS_4096_SHA256 (3):
RSASSA-PSS 4096 bit key with a SHA256 digest.
RSA_PSS_4096_SHA512 (4):
RSASSA-PSS 4096 bit key with a SHA512 digest.
RSA_SIGN_PKCS1_2048_SHA256 (5):
RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
RSA_SIGN_PKCS1_3072_SHA256 (6):
RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
RSA_SIGN_PKCS1_4096_SHA256 (7):
RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
RSA_SIGN_PKCS1_4096_SHA512 (8):
RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
ECDSA_P256_SHA256 (9):
ECDSA on the NIST P-256 curve with a SHA256
digest.
EC_SIGN_P256_SHA256 (9):
ECDSA on the NIST P-256 curve with a SHA256
digest.
ECDSA_P384_SHA384 (10):
ECDSA on the NIST P-384 curve with a SHA384
digest.
EC_SIGN_P384_SHA384 (10):
ECDSA on the NIST P-384 curve with a SHA384
digest.
ECDSA_P521_SHA512 (11):
ECDSA on the NIST P-521 curve with a SHA512
digest.
EC_SIGN_P521_SHA512 (11):
ECDSA on the NIST P-521 curve with a SHA512
digest.
"""
_pb_options = {"allow_alias": True}
SIGNATURE_ALGORITHM_UNSPECIFIED = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-binary-authorization",
"version": "1.5.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-binary-authorization",
"version": "1.5.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down