# ClientAuthenticationProperty

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_msk as msk } from 'aws-cdk-lib';
const clientAuthenticationProperty: msk.CfnCluster.ClientAuthenticationProperty = {
  sasl: {
    iam: {
      enabled: false,
    },
    scram: {
      enabled: false,
    },
  },
  tls: {
    certificateAuthorityArnList: ['certificateAuthorityArnList'],
    enabled: false,
  },
  unauthenticated: {
    enabled: false,
  },
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_msk as msk

client_authentication_property = msk.CfnCluster.ClientAuthenticationProperty(
    sasl=msk.CfnCluster.SaslProperty(
        iam=msk.CfnCluster.IamProperty(
            enabled=False
        ),
        scram=msk.CfnCluster.ScramProperty(
            enabled=False
        )
    ),
    tls=msk.CfnCluster.TlsProperty(
        certificate_authority_arn_list=["certificateAuthorityArnList"],
        enabled=False
    ),
    unauthenticated=msk.CfnCluster.UnauthenticatedProperty(
        enabled=False
    )
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.msk.*;

ClientAuthenticationProperty clientAuthenticationProperty = ClientAuthenticationProperty.builder()
        .sasl(SaslProperty.builder()
                .iam(IamProperty.builder()
                        .enabled(false)
                        .build())
                .scram(ScramProperty.builder()
                        .enabled(false)
                        .build())
                .build())
        .tls(TlsProperty.builder()
                .certificateAuthorityArnList(List.of("certificateAuthorityArnList"))
                .enabled(false)
                .build())
        .unauthenticated(UnauthenticatedProperty.builder()
                .enabled(false)
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.MSK;

var clientAuthenticationProperty = new ClientAuthenticationProperty {
    Sasl = new SaslProperty {
        Iam = new IamProperty {
            Enabled = false
        },
        Scram = new ScramProperty {
            Enabled = false
        }
    },
    Tls = new TlsProperty {
        CertificateAuthorityArnList = new [] { "certificateAuthorityArnList" },
        Enabled = false
    },
    Unauthenticated = new UnauthenticatedProperty {
        Enabled = false
    }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

clientAuthenticationProperty := &ClientAuthenticationProperty{
	Sasl: &SaslProperty{
		Iam: &IamProperty{
			Enabled: jsii.Boolean(false),
		},
		Scram: &ScramProperty{
			Enabled: jsii.Boolean(false),
		},
	},
	Tls: &TlsProperty{
		CertificateAuthorityArnList: []*string{
			jsii.String("certificateAuthorityArnList"),
		},
		Enabled: jsii.Boolean(false),
	},
	Unauthenticated: &UnauthenticatedProperty{
		Enabled: jsii.Boolean(false),
	},
}
```

## Properties

- `sasl`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnCluster.SaslProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_msk.CfnCluster.SaslProperty.html) — Details for client authentication using SASL.

  To turn on SASL, you must also turn on `EncryptionInTransit` by setting `inCluster` to true. You must set `clientBroker` to either `TLS` or `TLS_PLAINTEXT` . If you choose `TLS_PLAINTEXT` , then you must also set `unauthenticated` to true.

- `tls`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnCluster.TlsProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_msk.CfnCluster.TlsProperty.html) — Details for ClientAuthentication using TLS.

  To turn on TLS access control, you must also turn on `EncryptionInTransit` by setting `inCluster` to true and `clientBroker` to `TLS` .

- `unauthenticated`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnCluster.UnauthenticatedProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_msk.CfnCluster.UnauthenticatedProperty.html) — Details for ClientAuthentication using no authentication.
