Skip to content
v2.278.0

AdvancedSecurityOptionsInputProperty Struct ​

Specifies options for fine-grained access control.

If you specify advanced security options, you must also enable node-to-node encryption ( NodeToNodeEncryptionOptions ) and encryption at rest ( EncryptionAtRestOptions ). You must also enable EnforceHTTPS within DomainEndpointOptions , which requires HTTPS for all traffic to the domain.

Example ​

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
# 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
// 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();
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
// 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 ​

anonymousAuthDisableDateoptionalstringanonymous_auth_disable_dateoptionalstranonymousAuthDisableDateoptionalStringAnonymousAuthDisableDateoptionalstringAnonymousAuthDisableDateoptional*string #
Date and time when the migration period will be disabled.
anonymousAuthEnabledoptionalboolean | IResolvableanonymous_auth_enabledoptionaltyping.Union[bool, IResolvable]anonymousAuthEnabledoptionalBooleanAnonymousAuthEnabledoptionalboolAnonymousAuthEnabledoptionalinterface{} #
True to enable a 30-day migration period during which administrators can create role mappings.
enabledoptionalboolean | IResolvableenabledoptionaltyping.Union[bool, IResolvable]enabledoptionalBooleanEnabledoptionalboolEnabledoptionalinterface{} #
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 .

iamFederationOptionsoptionalIResolvable | CfnDomain.IAMFederationOptionsPropertyiam_federation_optionsoptionaltyping.Union[IResolvable, IAMFederationOptionsProperty]iamFederationOptionsoptionalIResolvableIamFederationOptionsoptionalIResolvableIamFederationOptionsoptionalinterface{} #
Input configuration for IAM identity federation within advanced security options.
internalUserDatabaseEnabledoptionalboolean | IResolvableinternal_user_database_enabledoptionaltyping.Union[bool, IResolvable]internalUserDatabaseEnabledoptionalBooleanInternalUserDatabaseEnabledoptionalboolInternalUserDatabaseEnabledoptionalinterface{} #
True to enable the internal user database.
jwtOptionsoptionalIResolvable | CfnDomain.JWTOptionsPropertyjwt_optionsoptionaltyping.Union[IResolvable, JWTOptionsProperty]jwtOptionsoptionalIResolvableJwtOptionsoptionalIResolvableJwtOptionsoptionalinterface{} #
Container for information about the JWT configuration of the Amazon OpenSearch Service.
masterUserOptionsoptionalIResolvable | CfnDomain.MasterUserOptionsPropertymaster_user_optionsoptionaltyping.Union[IResolvable, MasterUserOptionsProperty]masterUserOptionsoptionalIResolvableMasterUserOptionsoptionalIResolvableMasterUserOptionsoptionalinterface{} #
Specifies information about the master user.
samlOptionsoptionalIResolvable | CfnDomain.SAMLOptionsPropertysaml_optionsoptionaltyping.Union[IResolvable, SAMLOptionsProperty]samlOptionsoptionalIResolvableSamlOptionsoptionalIResolvableSamlOptionsoptionalinterface{} #
Container for information about the SAML configuration for OpenSearch Dashboards.