[ad_1]
Amazon OpenSearch Serverless is a serverless model of Amazon OpenSearch Service, a completely managed open search and analytics platform. On Amazon OpenSearch Service you’ll be able to run petabyte-scale search and analytics workloads with out the heavy lifting of managing the underlying OpenSearch Service clusters and Amazon OpenSearch Serverless helps workloads as much as 30TB of knowledge for time-series collections. Amazon OpenSearch Serverless offers an set up of OpenSearch Dashboards with each assortment created.
The community configuration for an OpenSearch Serverless assortment controls how the gathering may be accessed over the community. You’ve gotten the choice to make the gathering publicly accessible over the web from any community, or to limit entry to the gathering solely privately by means of OpenSearch Serverless-managed digital non-public cloud (VPC) endpoints. This community entry setting may be outlined individually for the gathering’s OpenSearch endpoint (used for information operations) and its corresponding OpenSearch Dashboards endpoint (used for visualizing and analyzing information). On this submit, we work with a publicly accessible OpenSearch Serverless assortment.
SAML allows customers to entry a number of functions or companies with a single set of credentials, eliminating the necessity for separate logins for every software or service. This improves the consumer expertise and reduces the overhead of managing a number of credentials. We offer SAML authentication for OpenSearch Serverless. With this you should utilize your current id supplier (IdP) to supply single sign-on (SSO) for the OpenSearch Dashboards endpoints of serverless collections. OpenSearch Serverless helps IdPs that adhere to the SAML 2.0 commonplace, together with companies like AWS IAM Id Middle, Okta, Keycloak, Lively Listing Federation Companies (AD FS), and Auth0. This SAML authentication mechanism is solely supposed for accessing the OpenSearch Dashboards interface by means of an online browser.
On this submit, we present you the right way to configure SAML authentication for controlling entry to public OpenSearch Dashboards utilizing Keycloak as an IdP.
Answer overview
The next diagram illustrates a pattern structure of an answer that permits customers to authenticate to OpenSearch Dashboards utilizing SSO with Keycloak.
The sign-in stream consists of the next steps:
- A consumer accesses OpenSearch Dashboards in a browser and chooses an IdP from the record.
- OpenSearch Serverless generates a SAML authentication request.
- OpenSearch Service redirects the request again to the browser.
- The browser redirects the consumer to the chosen IdP (Keycloak). Keycloak offers a login web page, the place customers can present their login credentials.
- If authentication was profitable, Keycloak returns the SAML response to the browser.
- The SAML assertions is distributed again to OpenSearch Serverless.
- OpenSearch Serverless validates the SAML assertion, and logs the consumer in to OpenSearch Dashboards.
Stipulations
To get began, you need to have the next stipulations:
- An lively OpenSearch Serverless assortment
- A working Keycloak server (on premises or within the cloud)
- The next AWS Id and Entry Administration (IAM) permissions to configure SAML authentication in OpenSearch Serverless:
aoss:CreateSecurityConfig
– Create a SAML supplier.aoss:ListSecurityConfig
– Record all SAML suppliers within the present account.aoss:GetSecurityConfig
– View SAML supplier data.aoss:UpdateSecurityConfig
– Modify a given SAML supplier configuration, together with the XML metadata.aoss:DeleteSecurityConfig
– Delete a SAML supplier.
Create and configure a consumer in Keycloak
Full the next steps to create your Keycloak consumer:
- Login to your Keycloak admin web page.
- Within the navigation pane, select Consumer.
- Select Create consumer
- For Consumer sort, select SAML.
- For Consumer ID enter
aws:opensearch:AWS_ACCOUNT_ID
, the place AWS_ACCOUNT_ID is your AWS account ID. - Enter a reputation and outline in your consumer.
- Select Subsequent.
- For Legitimate redirect URIs, enter the deal with of the assertion client service (ACS), the place
REGION
is the AWS Area wherein you might have created the OpenSearch Serverless assortment. - For Grasp SAML Processing URL, additionally enter the previous ACS deal with.
- Full your consumer creation.
- After you create the consumer, you must disable the Signing keys config setting, as a result of OpenSearch Serverless signed and encrypted requests are usually not supported. For extra particulars, consult with Issues.
- After you might have created the consumer and disabled the consumer signature, you’ll be able to export the SAML 2.0 IdP Metadata by selecting the hyperlink on the Realm settings web page. You want this metadata, while you create the SAML supplier in OpenSearch Serverless.
Create a SAML supplier
When your OpenSearch Serverless assortment is lively, you then create a SAML supplier. This SAML supplier may be assigned to any assortment in the identical Area. Full the next steps:
- On the OpenSearch Service console, beneath Serverless within the navigation pane, select SAML authentication beneath Safety.
- Select Create SAML supplier.
- Enter a reputation and outline in your SAML supplier.
- Enter the IdP metadata you downloaded earlier from Keycloak.
- Beneath Extra settings, you’ll be able to optionally add customized consumer ID and group attributes (for this instance, we go away this empty).
- Select Create a SAML supplier.
You’ve gotten now configured a SAML supplier for OpenSearch Serverless. Subsequent, you configure the information entry coverage for accessing collections.
Create an information entry coverage
After you might have configured SAML supplier, you must create information entry insurance policies for OpenSearch Serverless to permit entry to the customers.
- On the OpenSearch Service console, beneath Serverless within the navigation pane, select Information entry insurance policies beneath Safety.
- Select Create entry coverage.
- Enter a reputation and non-obligatory description in your entry coverage.
- For Coverage definition technique, choose Visible editor.
- For Rule title, enter a reputation.
- Beneath Choose principals, for Add principals, select SAML customers and teams.
- For SAML supplier title, select the supplier you created earlier than.
- Select Save.
- Specify the consumer or group within the format
consumer/USERNAME
orgroup/GROUPNAME
. The worth of the USERNAME or GROUPNAME ought to match the worth you laid out in Keycloak foruser-/groupname
. - Select Save.
- Select Grant to grant permissions to assets.
- Within the Grant assets and permissions part, you’ll be able to specify entry you need to present for a given consumer on the assortment stage, and in addition on the index sample stage.
For extra details about the right way to arrange extra granular entry in your customers, consult with Supported OpenSearch API operations and permissions and Supported coverage permissions. - Select Save.
- You’ll be able to create extra guidelines if wanted.
- Select Create to create the information entry coverage.
Now, you might have information entry coverage that can permit customers to entry the OpenSearch Dashboards and carry out the allowed actions there.
Entry the OpenSearch Dashboards
Full the next steps to register to the OpenSearch Dashboards:
- On the OpenSearch Service console, beneath Serverless within the navigation pane, select Dashboard.
- Within the Assortment part, find your assortment and select Dashboard.
The OpenSearch login web page will open in a brand new browser tab. - Select your IdP supplier on the dropdown menu and select Login.
You may be redirected to the Keycloak sign-in web page. - Log in together with your SSO credentials.
After a profitable login, you may be redirected to OpenSearch Dashboards, and you may carry out the actions allowed by the information entry coverage.
You’ve gotten efficiently federated OpenSearch Dashboards with Keycloak as an IdP.
Cleansing up
Once you’re carried out with this resolution, delete the assets you created when you now not want them.
- Delete your OpenSearch Serverless assortment.
- Delete your information entry coverage.
- Delete the SAML supplier.
Conclusion
On this submit, we demonstrated the right way to arrange Keycloak as an IdP to entry an OpenSearch Serverless dashboard utilizing SAML authentication. For extra particulars, consult with SAML authentication for Amazon OpenSearch Serverless
In regards to the Creator
Arpad Csoke is a Options Architect at Amazon Net Companies. His obligations embrace serving to massive enterprise clients perceive and make the most of the AWS atmosphere, appearing as a technical guide to contribute to fixing their points.
[ad_2]