# AdvancedSecurityOptionsInputProperty

Struct · External

Specifies options for fine-grained access control.

If you specify advanced security options, you must also enable node-to-node encryption ( [NodeToNodeEncryptionOptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-nodetonodeencryptionoptions.html) ) and encryption at rest ( [EncryptionAtRestOptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-encryptionatrestoptions.html) ). You must also enable `EnforceHTTPS` within [DomainEndpointOptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-domainendpointoptions.html) , which requires HTTPS for all traffic to the domain.

- Source: Generated at build time
- Type last changed: v2.212.0 · 20 Aug 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_opensearchservice as opensearchservice } from 'aws-cdk-lib';
const advancedSecurityOptionsInputProperty: opensearchservice.CfnDomain.AdvancedSecurityOptionsInputProperty = {
  anonymousAuthDisableDate: 'anonymousAuthDisableDate',
  anonymousAuthEnabled: false,
  enabled: false,
  iamFederationOptions: {
    enabled: false,
    rolesKey: 'rolesKey',
    subjectKey: 'subjectKey',
  },
  internalUserDatabaseEnabled: false,
  jwtOptions: {
    enabled: false,
    publicKey: 'publicKey',
    rolesKey: 'rolesKey',
    subjectKey: 'subjectKey',
  },
  masterUserOptions: {
    masterUserArn: 'masterUserArn',
    masterUserName: 'masterUserName',
    masterUserPassword: 'masterUserPassword',
  },
  samlOptions: {
    enabled: false,
    idp: {
      entityId: 'entityId',
      metadataContent: 'metadataContent',
    },
    masterBackendRole: 'masterBackendRole',
    masterUserName: 'masterUserName',
    rolesKey: 'rolesKey',
    sessionTimeoutMinutes: 123,
    subjectKey: 'subjectKey',
  },
};
```

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_opensearchservice as opensearchservice

advanced_security_options_input_property = opensearchservice.CfnDomain.AdvancedSecurityOptionsInputProperty(
    anonymous_auth_disable_date="anonymousAuthDisableDate",
    anonymous_auth_enabled=False,
    enabled=False,
    iam_federation_options={
        "enabled": False,
        "roles_key": "rolesKey",
        "subject_key": "subjectKey"
    },
    internal_user_database_enabled=False,
    jwt_options=opensearchservice.CfnDomain.JWTOptionsProperty(
        enabled=False,
        public_key="publicKey",
        roles_key="rolesKey",
        subject_key="subjectKey"
    ),
    master_user_options=opensearchservice.CfnDomain.MasterUserOptionsProperty(
        master_user_arn="masterUserArn",
        master_user_name="masterUserName",
        master_user_password="masterUserPassword"
    ),
    saml_options=opensearchservice.CfnDomain.SAMLOptionsProperty(
        enabled=False,
        idp=opensearchservice.CfnDomain.IdpProperty(
            entity_id="entityId",
            metadata_content="metadataContent"
        ),
        master_backend_role="masterBackendRole",
        master_user_name="masterUserName",
        roles_key="rolesKey",
        session_timeout_minutes=123,
        subject_key="subjectKey"
    )
)
```

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.opensearchservice.*;

AdvancedSecurityOptionsInputProperty advancedSecurityOptionsInputProperty = AdvancedSecurityOptionsInputProperty.builder()
        .anonymousAuthDisableDate("anonymousAuthDisableDate")
        .anonymousAuthEnabled(false)
        .enabled(false)
        .iamFederationOptions(Map.of(
                "enabled", false,
                "rolesKey", "rolesKey",
                "subjectKey", "subjectKey"))
        .internalUserDatabaseEnabled(false)
        .jwtOptions(JWTOptionsProperty.builder()
                .enabled(false)
                .publicKey("publicKey")
                .rolesKey("rolesKey")
                .subjectKey("subjectKey")
                .build())
        .masterUserOptions(MasterUserOptionsProperty.builder()
                .masterUserArn("masterUserArn")
                .masterUserName("masterUserName")
                .masterUserPassword("masterUserPassword")
                .build())
        .samlOptions(SAMLOptionsProperty.builder()
                .enabled(false)
                .idp(IdpProperty.builder()
                        .entityId("entityId")
                        .metadataContent("metadataContent")
                        .build())
                .masterBackendRole("masterBackendRole")
                .masterUserName("masterUserName")
                .rolesKey("rolesKey")
                .sessionTimeoutMinutes(123)
                .subjectKey("subjectKey")
                .build())
        .build();
```

C#:

```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.OpenSearchService;

var advancedSecurityOptionsInputProperty = new AdvancedSecurityOptionsInputProperty {
    AnonymousAuthDisableDate = "anonymousAuthDisableDate",
    AnonymousAuthEnabled = false,
    Enabled = false,
    IamFederationOptions = new Dictionary<string, object?> {
        { "enabled", false },
        { "rolesKey", "rolesKey" },
        { "subjectKey", "subjectKey" }
    },
    InternalUserDatabaseEnabled = false,
    JwtOptions = new JWTOptionsProperty {
        Enabled = false,
        PublicKey = "publicKey",
        RolesKey = "rolesKey",
        SubjectKey = "subjectKey"
    },
    MasterUserOptions = new MasterUserOptionsProperty {
        MasterUserArn = "masterUserArn",
        MasterUserName = "masterUserName",
        MasterUserPassword = "masterUserPassword"
    },
    SamlOptions = new SAMLOptionsProperty {
        Enabled = false,
        Idp = new IdpProperty {
            EntityId = "entityId",
            MetadataContent = "metadataContent"
        },
        MasterBackendRole = "masterBackendRole",
        MasterUserName = "masterUserName",
        RolesKey = "rolesKey",
        SessionTimeoutMinutes = 123,
        SubjectKey = "subjectKey"
    }
};
```

Go:

```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"

advancedSecurityOptionsInputProperty := &AdvancedSecurityOptionsInputProperty{
	AnonymousAuthDisableDate: jsii.String("anonymousAuthDisableDate"),
	AnonymousAuthEnabled: jsii.Boolean(false),
	Enabled: jsii.Boolean(false),
	IamFederationOptions: map[string]interface{}{
		"enabled": jsii.Boolean(false),
		"rolesKey": jsii.String("rolesKey"),
		"subjectKey": jsii.String("subjectKey"),
	},
	InternalUserDatabaseEnabled: jsii.Boolean(false),
	JwtOptions: &JWTOptionsProperty{
		Enabled: jsii.Boolean(false),
		PublicKey: jsii.String("publicKey"),
		RolesKey: jsii.String("rolesKey"),
		SubjectKey: jsii.String("subjectKey"),
	},
	MasterUserOptions: &MasterUserOptionsProperty{
		MasterUserArn: jsii.String("masterUserArn"),
		MasterUserName: jsii.String("masterUserName"),
		MasterUserPassword: jsii.String("masterUserPassword"),
	},
	SamlOptions: &SAMLOptionsProperty{
		Enabled: jsii.Boolean(false),
		Idp: &IdpProperty{
			EntityId: jsii.String("entityId"),
			MetadataContent: jsii.String("metadataContent"),
		},
		MasterBackendRole: jsii.String("masterBackendRole"),
		MasterUserName: jsii.String("masterUserName"),
		RolesKey: jsii.String("rolesKey"),
		SessionTimeoutMinutes: jsii.Number(123),
		SubjectKey: jsii.String("subjectKey"),
	},
}
```

## Properties

- `anonymousAuthDisableDate`: string — Date and time when the migration period will be disabled.

  Only necessary when [enabling fine-grained access control on an existing domain](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/fgac.html#fgac-enabling-existing) .

- `anonymousAuthEnabled`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — True to enable a 30-day migration period during which administrators can create role mappings.

  Only necessary when [enabling fine-grained access control on an existing domain](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/fgac.html#fgac-enabling-existing) .

- `enabled`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — True to enable fine-grained access control.

  You must also enable encryption of data at rest and node-to-node encryption. See [Fine-grained access control in Amazon OpenSearch Service](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/fgac.html) .

- `iamFederationOptions`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.IAMFederationOptionsProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_opensearchservice.CfnDomain.IAMFederationOptionsProperty.html) — Input configuration for IAM identity federation within advanced security options.

- `internalUserDatabaseEnabled`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — True to enable the internal user database.

- `jwtOptions`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.JWTOptionsProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_opensearchservice.CfnDomain.JWTOptionsProperty.html) — Container for information about the JWT configuration of the Amazon OpenSearch Service.

- `masterUserOptions`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.MasterUserOptionsProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_opensearchservice.CfnDomain.MasterUserOptionsProperty.html) — Specifies information about the master user.

- `samlOptions`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.SAMLOptionsProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_opensearchservice.CfnDomain.SAMLOptionsProperty.html) — Container for information about the SAML configuration for OpenSearch Dashboards.
