-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(opensearchservice): SAML authorization properties for Domain construct #26673
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking this up. LGTM!!
/** | ||
* Container for information about the SAML configuration for OpenSearch Dashboards. | ||
*/ | ||
readonly samlAuthenticationOptions?: SAMLOptionsProperty; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a default stating "no SAML authentication options"? - @default - no SAML authentication options
I also think we should add a note here saying that if SAML authentication options are set, then samlAuthenticationEnabled
will be enabled
@@ -1685,6 +1757,18 @@ export class Domain extends DomainBase implements IDomain, ec2.IConnectable { | |||
masterUserName: masterUserName, | |||
masterUserPassword: this.masterUserPassword?.unsafeUnwrap(), // Safe usage | |||
}, | |||
samlOptions: samlAuthenticationEnabled ? { | |||
enabled: true, | |||
idp: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about something like this so we can remove the !
operator:
idp: props.fineGrainedAccessControl && props.fineGrainedAccessControl.samlAuthenticationOptions ? {
entityId: props.fineGrainedAccessControl.samlAuthenticationOptions.idpEntityId,
metadataContent: props.fineGrainedAccessControl.samlAuthenticationOptions.idpMetadataContent,
} : undefined,
What do you think?
* This SAML user receives full permission in OpenSearch Dashboards/Kibana. | ||
* Creating a new master username does not delete any existing master usernames. | ||
*/ | ||
readonly masterUserName?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a default
flag?
* The backend role that the SAML master user is mapped to. | ||
* Any users with this backend role receives full permission in OpenSearch Dashboards/Kibana. | ||
*/ | ||
readonly masterBackendRole?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a default
flag for this one too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lpizzinidev This looks great! I left a few minor comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lpizzinidev Looks great! Thanks for your work on this.
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
@lpizzinidev @colifran I don't see the docs having updated but I see the README.md was updated in this PR. Do you know when/how the docs will update? |
Allows to specify SAML authentication for OpenSearch domains via high-level construct properties.
Example:
Closes #26600.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license