AdvancedSecurityOptions Struct
Specifies options for fine-grained access control.
| Source | aws-opensearchservice/lib/domain.ts |
|---|---|
| Type last changed |
Example
ts
const domain = new Domain(this, 'Domain', {
version: EngineVersion.OPENSEARCH_1_0,
enforceHttps: true,
nodeToNodeEncryption: true,
encryptionAtRest: {
enabled: true,
},
fineGrainedAccessControl: {
masterUserName: 'master-user',
samlAuthenticationEnabled: true,
samlAuthenticationOptions: {
idpEntityId: 'entity-id',
idpMetadataContent: 'metadata-content-with-quotes-escaped',
},
},
});
python
from aws_cdk.aws_opensearchservice import EncryptionAtRestOptions, AdvancedSecurityOptions, SAMLOptionsProperty
domain = Domain(self, "Domain",
version=EngineVersion.OPENSEARCH_1_0,
enforce_https=True,
node_to_node_encryption=True,
encryption_at_rest=EncryptionAtRestOptions(
enabled=True
),
fine_grained_access_control=AdvancedSecurityOptions(
master_user_name="master-user",
saml_authentication_enabled=True,
saml_authentication_options=SAMLOptionsProperty(
idp_entity_id="entity-id",
idp_metadata_content="metadata-content-with-quotes-escaped"
)
)
)
java
Domain domain = Domain.Builder.create(this, "Domain")
.version(EngineVersion.OPENSEARCH_1_0)
.enforceHttps(true)
.nodeToNodeEncryption(true)
.encryptionAtRest(EncryptionAtRestOptions.builder()
.enabled(true)
.build())
.fineGrainedAccessControl(AdvancedSecurityOptions.builder()
.masterUserName("master-user")
.samlAuthenticationEnabled(true)
.samlAuthenticationOptions(SAMLOptionsProperty.builder()
.idpEntityId("entity-id")
.idpMetadataContent("metadata-content-with-quotes-escaped")
.build())
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
var domain = new Domain(this, "Domain", new DomainProps {
Version = EngineVersion.OPENSEARCH_1_0,
EnforceHttps = true,
NodeToNodeEncryption = true,
EncryptionAtRest = new EncryptionAtRestOptions {
Enabled = true
},
FineGrainedAccessControl = new AdvancedSecurityOptions {
MasterUserName = "master-user",
SamlAuthenticationEnabled = true,
SamlAuthenticationOptions = new SAMLOptionsProperty {
IdpEntityId = "entity-id",
IdpMetadataContent = "metadata-content-with-quotes-escaped"
}
}
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
domain := awscdk.NewDomain(this, jsii.String("Domain"), &DomainProps{
Version: awscdk.EngineVersion_OPENSEARCH_1_0(),
EnforceHttps: jsii.Boolean(true),
NodeToNodeEncryption: jsii.Boolean(true),
EncryptionAtRest: &EncryptionAtRestOptions{
Enabled: jsii.Boolean(true),
},
FineGrainedAccessControl: &AdvancedSecurityOptions{
MasterUserName: jsii.String("master-user"),
SamlAuthenticationEnabled: jsii.Boolean(true),
SamlAuthenticationOptions: &SAMLOptionsProperty{
IdpEntityId: jsii.String("entity-id"),
IdpMetadataContent: jsii.String("metadata-content-with-quotes-escaped"),
},
},
})
Properties
masterUserArnoptionalstringmaster_user_arnoptionalstrmasterUserArnoptionalStringMasterUserArnoptionalstringMasterUserArnoptional*string #ARN for the master user.
Default: fine-grained access control is disabled
Only specify this or masterUserName, but not both.
masterUserNameoptionalstringmaster_user_nameoptionalstrmasterUserNameoptionalStringMasterUserNameoptionalstringMasterUserNameoptional*string #Username for the master user.
Default: fine-grained access control is disabled
Only specify this or masterUserArn, but not both.
masterUserPasswordoptionalSecretValuemaster_user_passwordoptionalSecretValuemasterUserPasswordoptionalSecretValueMasterUserPasswordoptionalSecretValueMasterUserPasswordoptionalSecretValue #Password for the master user.
Default: A Secrets Manager generated password
You can use SecretValue.unsafePlainText to specify a password in plain text or use secretsmanager.Secret.fromSecretAttributes to reference a secret in Secrets Manager.
samlAuthenticationEnabledoptionalbooleansaml_authentication_enabledoptionalboolsamlAuthenticationEnabledoptionalBooleanSamlAuthenticationEnabledoptionalboolSamlAuthenticationEnabledoptional*bool #True to enable SAML authentication for a domain.
Default: SAML authentication is disabled. Enabled if samlAuthenticationOptions is set.
samlAuthenticationOptionsoptionalSAMLOptionsPropertysaml_authentication_optionsoptionalSAMLOptionsPropertysamlAuthenticationOptionsoptionalSAMLOptionsPropertySamlAuthenticationOptionsoptionalSAMLOptionsPropertySamlAuthenticationOptionsoptionalSAMLOptionsProperty #Container for information about the SAML configuration for OpenSearch Dashboards.
Default: no SAML authentication options
If set, samlAuthenticationEnabled will be enabled.