Skip to content

Commit

Permalink
2.1 merge conflict fix-SAML-OIDC cooking splitting (#3890)
Browse files Browse the repository at this point in the history
Signed-off-by: cwillum <[email protected]>
  • Loading branch information
cwillum authored Apr 27, 2023
1 parent ddb1c85 commit f6328ad
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
16 changes: 16 additions & 0 deletions _security/authentication-backends/openid-connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,22 @@ opensearch.requestHeadersAllowlist: ["Authorization", "security_tenant"]
To include OpenID Connect with other authentication types in the Dashboards sign-in window, see [Configuring sign-in options]({{site.url}}{{site.baseurl}}/security/configuration/multi-auth/).
{: .note }


#### Session management with additional cookies

To improve session management—especially for users who have multiple roles assigned to them—Dashboards provides an option to split cookie payloads into multiple cookies and then recombine the payloads when receiving them. This can help prevent larger OpenID Connect assertions from exceeding size limits for each cookie. The two settings in the following example allow you to set a prefix name for additional cookies and specify the number of them. The default number of additional cookies is three:

```yml
opensearch_security.openid.extra_storage.cookie_prefix: security_authentication_oidc
opensearch_security.openid.extra_storage.additional_cookies: 3
```

Note that reducing the number of additional cookies can cause some of the cookies that were in use before the change to stop working. We recommend establishing a fixed number of additional cookies and not changing the configuration after that.

If the ID token from the IdP is especially large, OpenSearch may throw a server log authentication error indicating that the HTTP header is too large. In this case, you can increase the value for the `http.max_header_size` setting in the `opensearch.yml` file.
{: .tip }


### OpenSearch security configuration

Because OpenSearch Dashboards requires that the internal OpenSearch Dashboards server user can authenticate through HTTP basic authentication, you must configure two authentication domains. For OpenID Connect, the HTTP basic domain has to be placed first in the chain. Make sure you set the challenge flag to `false`.
Expand Down
17 changes: 17 additions & 0 deletions _security/authentication-backends/saml.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,23 @@ If you use the logout POST binding, you also need to ad the logout endpoint to y
server.xsrf.allowlist: ["/_plugins/_security/saml/acs", "/_plugins/_security/saml/logout"]
```

To include SAML with other authentication types in the Dashboards sign-in window, see [Configuring sign-in options]({{site.url}}{{site.baseurl}}/security/configuration/multi-auth/).
{: .note }

#### Session management with additional cookies

To improve session management—especially for users who have multiple roles assigned to them—Dashboards provides an option to split cookie payloads into multiple cookies and then recombine the payloads when receiving them. This can help prevent larger SAML assertions from exceeding size limits for each cookie. The two settings in the following example allow you to set a prefix name for additional cookies and specify the number of them. The default number of additional cookies is three:

```yml
opensearch_security.saml.extra_storage.cookie_prefix: security_authentication_oidc
opensearch_security.saml.extra_storage.additional_cookies: 3
```

Note that reducing the number of additional cookies can cause some of the cookies that were in use before the change to stop working. We recommend establishing a fixed number of additional cookies and not changing the configuration after that.

If the ID token from the IdP is especially large, OpenSearch may throw a server log authentication error indicating that the HTTP header is too large. In this case, you can increase the value for the `http.max_header_size` setting in the `opensearch.yml` file.
{: .tip }

### IdP-initiated SSO

To use IdP-initiated SSO, set the Assertion Consumer Service endpoint of your IdP to this:
Expand Down

0 comments on commit f6328ad

Please sign in to comment.