# SAML Authentication

**URL:** https://forum.opensearch.org/t/saml-authentication/17157
**Category:** Security
**Created:** [December 19, 2023, 10:15am UTC](https://forum.opensearch.org/t/saml-authentication/17157 "2023-12-19T10:15:13Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![LeonvanEeden](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@LeonvanEeden](https://forum.opensearch.org/u/LeonvanEeden)
#### Post date: [December 19, 2023, 10:15am UTC](https://forum.opensearch.org/t/saml-authentication/17157/1 "2023-12-19T10:15:13Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser):  
2.11.1

**Describe the issue** :  
Good day,

I’m trying to set up SAML authentication for Opensearch but I keep getting an error 500 →

Request URL:  
[http://192.168.211.170:5601/auth/saml/login?nextUrl=%2F&redirectHash=false](http://192.168.211.170:5601/auth/saml/login?nextUrl=%2F&redirectHash=false)  
Request Method:  
GET  
Status Code:  
500 Internal Server Error  
Remote Address:  
192.168.211.170:5601  
Referrer Policy:  
strict-origin-when-cross-origin  
Cache-Control:  
private, no-cache, no-store, must-revalidate  
Connection:  
keep-alive  
Content-Length:  
77  
Content-Type:  
application/json; charset=utf-8  
Date:  
Tue, 19 Dec 2023 09:49:27 GMT  
Keep-Alive:  
timeout=120  
Osd-Name:  
debian  
Accept:  
text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,_/_;q=0.8,application/signed-exchange;v=b3;q=0.7  
Accept-Encoding:  
gzip, deflate  
Accept-Language:  
en-US,en;q=0.9  
Connection:  
keep-alive  
Host:  
192.168.211.170:5601  
Referer:  
[http://192.168.211.170:5601/auth/saml/captureUrlFragment?nextUrl=%2F](http://192.168.211.170:5601/auth/saml/captureUrlFragment?nextUrl=%2F)  
Upgrade-Insecure-Requests:  
1  
User-Agent:  
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

**Configuration** :

```auto
authc:
      basic_internal_auth_domain:
        description: "Authenticate via HTTP Basic against internal users database"
        http_enabled: true
        transport_enabled: true
        order: 0
        http_authenticator:
          type: "basic"
          challenge: false
        authentication_backend:
          type: "intern"
      saml_auth_domain:
        http_enabled: true
        transport_enabled: false
        order: 1
        http_authenticator:
          type: saml
          challenge: true
          config:
            idp:
              metadata_url: 'XXXXXXXXXXX'
              entity_id: 'XXXXXXXX'
            sp:
              entity_id: opensearch
            kibana_url: https://<OPENSEARCH_DASHBOARD_URL>
            roles_key: Roles
            exchange_key: 'XXXXXXXXXXXXXX.'
        authentication_backend:
          type: noop

```

---

<div class="post-metadata">

### Author: ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/9946_2.png) [@pablo](https://forum.opensearch.org/u/pablo)
#### Post date: [December 19, 2023, 12:12pm UTC](https://forum.opensearch.org/t/saml-authentication/17157/2 "2023-12-19T12:12:50Z")

</div>

@LeonvanEeden What IdP do you use for SAML authentication?  
Do you have any proxy in the front of OpenSearch Dashboards?  
Are you getting redirected to IdP for login or do you get a 500 error straight away?

Please share your opensearch\_dashboards.yml file.

---

<div class="post-metadata">

### Author: ![LeonvanEeden](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@LeonvanEeden](https://forum.opensearch.org/u/LeonvanEeden)
#### Post date: [December 19, 2023, 2:26pm UTC](https://forum.opensearch.org/t/saml-authentication/17157/4 "2023-12-19T14:26:56Z")

</div>

Hi Pablo,

Thank you for the prompt response.

We are using WebAdm/OpenOTP

No proxy

No redirection, it goes straight to error 500.

I am trying to share the yml but it wont let me

Regards,

Leon

---

<div class="post-metadata">

### Author: ![LeonvanEeden](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@LeonvanEeden](https://forum.opensearch.org/u/LeonvanEeden)
#### Post date: [December 19, 2023, 2:32pm UTC](https://forum.opensearch.org/t/saml-authentication/17157/5 "2023-12-19T14:32:57Z")

</div>

Attached please find the configs

(Attachment opensearch\_dashboards.yml is missing)

---

<div class="post-metadata">

### Author: ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/9946_2.png) [@pablo](https://forum.opensearch.org/u/pablo)
#### Post date: [December 19, 2023, 4:06pm UTC](https://forum.opensearch.org/t/saml-authentication/17157/6 "2023-12-19T16:06:06Z")

</div>

@LeonvanEeden I didn’t get your opensearch\_dashboards.yml file.  
Would you mind sharing the content instead of the file attachment?

---

<div class="post-metadata">

### Author: ![LeonvanEeden](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@LeonvanEeden](https://forum.opensearch.org/u/LeonvanEeden)
#### Post date: [December 20, 2023, 7:54am UTC](https://forum.opensearch.org/t/saml-authentication/17157/7 "2023-12-20T07:54:08Z")

</div>

Good morning,

Here you go 🙂

---

<div class="post-metadata">

### Author: ![LeonvanEeden](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@LeonvanEeden](https://forum.opensearch.org/u/LeonvanEeden)
#### Post date: [December 20, 2023, 1:54pm UTC](https://forum.opensearch.org/t/saml-authentication/17157/8 "2023-12-20T13:54:55Z")

</div>

Hi there,

Any news regarding this?

Regards,

Leon

---

<div class="post-metadata">

### Author: ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/9946_2.png) [@pablo](https://forum.opensearch.org/u/pablo)
#### Post date: [December 20, 2023, 2:38pm UTC](https://forum.opensearch.org/t/saml-authentication/17157/9 "2023-12-20T14:38:42Z")

</div>

@LeonvanEeden There is still no content of opensearch\_dashboards.yml from you.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/7/72d7ddb45de5264f30db6325bdbcc0c46c062a5c.png)

---

<div class="post-metadata">

### Author: ![LeonvanEeden](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@LeonvanEeden](https://forum.opensearch.org/u/LeonvanEeden)
#### Post date: [December 21, 2023, 6:31am UTC](https://forum.opensearch.org/t/saml-authentication/17157/10 "2023-12-21T06:31:55Z")

</div>

For some reason it won’t let me send it it through.

The only think changed to the is the last two lines was added.

“opensearch\_security.auth.type: “saml”  
“server.xsrf.allowlist: [”/\_opendistro/\_security/saml/acs”]"

---

<div class="post-metadata">

### Author: ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/9946_2.png) [@pablo](https://forum.opensearch.org/u/pablo)
#### Post date: [January 16, 2024, 1:39am UTC](https://forum.opensearch.org/t/saml-authentication/17157/11 "2024-01-16T01:39:44Z")

</div>

> [@LeonvanEeden](#):
>
> `metadata_url: 'XXXXXXXXXXX'`

Have you tried using the below instead?

```auto
metadata_file: metadata.xml

```

Do you see any errors in OpenSearch nodes during the startup or when accessing the OpenSearch Dashboards and IdP?

---

<div class="post-metadata">

### Author: ![rtamil](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@rtamil](https://forum.opensearch.org/u/rtamil)
#### Post date: [March 26, 2024, 3:24pm UTC](https://forum.opensearch.org/t/saml-authentication/17157/12 "2024-03-26T15:24:33Z")

</div>

@LeonvanEeden  
Were you able to solve this issue ?
