ManagedClusterSecurityProfileDefenderSecurityGating Class

  • java.lang.Object
    • com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityGating

Implements

public final class ManagedClusterSecurityProfileDefenderSecurityGating
implements JsonSerializable<ManagedClusterSecurityProfileDefenderSecurityGating>

Microsoft Defender settings for security gating. This validates container image eligibility for deployment based on Defender for Containers security findings. Using Admission Controller, it either audits or prevents deployment of images that do not meet security standards.

Constructor Summary

Constructor Description
ManagedClusterSecurityProfileDefenderSecurityGating()

Creates an instance of ManagedClusterSecurityProfileDefenderSecurityGating class.

Method Summary

Modifier and Type Method and Description
Boolean allowSecretAccess()

Get the allowSecretAccess property: In use only while registry access is granted by secret rather than managed identity.

Boolean enabled()

Get the enabled property: Whether to enable Defender security gating.

static ManagedClusterSecurityProfileDefenderSecurityGating fromJson(JsonReader jsonReader)

Reads an instance of ManagedClusterSecurityProfileDefenderSecurityGating from the JsonReader.

List<ManagedClusterSecurityProfileDefenderSecurityGatingIdentity> identities()

Get the identities property: List of identities that the admission controller uses to pull security artifacts from registries.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ManagedClusterSecurityProfileDefenderSecurityGating withAllowSecretAccess(Boolean allowSecretAccess)

Set the allowSecretAccess property: In use only while registry access is granted by secret rather than managed identity.

ManagedClusterSecurityProfileDefenderSecurityGating withEnabled(Boolean enabled)

Set the enabled property: Whether to enable Defender security gating.

ManagedClusterSecurityProfileDefenderSecurityGating withIdentities(List<ManagedClusterSecurityProfileDefenderSecurityGatingIdentity> identities)

Set the identities property: List of identities that the admission controller uses to pull security artifacts from registries.

Methods inherited from java.lang.Object

Constructor Details

ManagedClusterSecurityProfileDefenderSecurityGating

public ManagedClusterSecurityProfileDefenderSecurityGating()

Creates an instance of ManagedClusterSecurityProfileDefenderSecurityGating class.

Method Details

allowSecretAccess

public Boolean allowSecretAccess()

Get the allowSecretAccess property: In use only while registry access is granted by secret rather than managed identity. Sets whether to grant the Defender gating agent access to cluster secrets for pulling images from registries. If secret access is denied and the registry requires pull secrets, the add-on will not perform image validation. Default value is false.

Returns:

the allowSecretAccess value.

enabled

public Boolean enabled()

Get the enabled property: Whether to enable Defender security gating. When enabled, the gating feature scans container images and audits or blocks deployment of images that do not meet security standards according to configured security rules. For more information, see https://aka.ms/KubernetesDefenderAuditRule.

Returns:

the enabled value.

fromJson

public static ManagedClusterSecurityProfileDefenderSecurityGating fromJson(JsonReader jsonReader)

Reads an instance of ManagedClusterSecurityProfileDefenderSecurityGating from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ManagedClusterSecurityProfileDefenderSecurityGating if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the ManagedClusterSecurityProfileDefenderSecurityGating.

identities

public List<ManagedClusterSecurityProfileDefenderSecurityGatingIdentity> identities()

Get the identities property: List of identities that the admission controller uses to pull security artifacts from registries. These are the same identities used by the cluster to pull container images. For more information on configuring this identity, see https://learn.microsoft.com/en-us/azure/defender-for-cloud/gated-deployment-infrastructure-as-code.

Returns:

the identities value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAllowSecretAccess

public ManagedClusterSecurityProfileDefenderSecurityGating withAllowSecretAccess(Boolean allowSecretAccess)

Set the allowSecretAccess property: In use only while registry access is granted by secret rather than managed identity. Sets whether to grant the Defender gating agent access to cluster secrets for pulling images from registries. If secret access is denied and the registry requires pull secrets, the add-on will not perform image validation. Default value is false.

Parameters:

allowSecretAccess - the allowSecretAccess value to set.

Returns:

the ManagedClusterSecurityProfileDefenderSecurityGating object itself.

withEnabled

public ManagedClusterSecurityProfileDefenderSecurityGating withEnabled(Boolean enabled)

Set the enabled property: Whether to enable Defender security gating. When enabled, the gating feature scans container images and audits or blocks deployment of images that do not meet security standards according to configured security rules. For more information, see https://aka.ms/KubernetesDefenderAuditRule.

Parameters:

enabled - the enabled value to set.

Returns:

the ManagedClusterSecurityProfileDefenderSecurityGating object itself.

withIdentities

public ManagedClusterSecurityProfileDefenderSecurityGating withIdentities(List<ManagedClusterSecurityProfileDefenderSecurityGatingIdentity> identities)

Set the identities property: List of identities that the admission controller uses to pull security artifacts from registries. These are the same identities used by the cluster to pull container images. For more information on configuring this identity, see https://learn.microsoft.com/en-us/azure/defender-for-cloud/gated-deployment-infrastructure-as-code.

Parameters:

identities - the identities value to set.

Returns:

the ManagedClusterSecurityProfileDefenderSecurityGating object itself.

Applies to