Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
2.14.0
Describe the issue:
I have OpenSearch cluster with SAML authentication (adfs). Everything works fine but for user not included in any group in AD opensearch-dasboards issues following error: “{“statusCode”:500,“error”:“Internal Server Error”,“message”:“Internal Error”}” instead, i think, it must show some “unauthorized” message.
Configuration:
kibana:
server_username: opensearch_dashboards
index: '.kibana'
authc:
basic_internal_auth_domain:
description: "Authenticate via HTTP Basic against internal users database"
http_enabled: true
transport_enabled: true
order: 1
http_authenticator:
type: basic
challenge: false
authentication_backend:
type: intern
saml_auth_domain:
http_enabled: true
transport_enabled: false
order: 2
http_authenticator:
type: saml
challenge: true
config:
idp:
metadata_url: "https://adfs.domain/FederationMetadata/2007-06/FederationMetadata.xml"
entity_id: "http://adfs.domain/adfs/services/trust"
sp:
entity_id: "https://dashboard.domain"
kibana_url: "https://dashboard.domain"
roles_key: roles
exchange_key: "...."
jwt:
expiry: AUTO+1440
authentication_backend:
type: noop
Relevant Logs or Screenshots:
[2024-07-17T13:38:36,918][DEBUG][c.a.d.a.h.s.Token ] [node.hostname] SAMLResponse for ONELOGIN_66747c71-beee-4043-aa71-36e8f129c441
<samlp:Response ID="_5f1a9c06-b8b1-4a22-9550-1988fa821c26" Version="2.0" IssueInstant="2024-07-17T10:38:36.696Z" Destination="https://dashboard.domain/_opendistro/_security/saml/acs" Consent="urn:oasis:names:tc:SAML:2.0:consent:unspecified" InResponseTo="ONELOGIN_66747c71-beee-4043-aa71-36e8f129c441" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"><Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion">http://adfs.domain/adfs/services/trust</Issuer><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" /><ds:Reference URI="#_5f1a9c06-b8b1-4a22-9550-1988fa821c26"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" /><ds:DigestValue>XvN9Dy8u1UblaF4SGx+sefyN+moxgkXPoRt433YQdN4=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>...</ds:SignatureValue><KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"><ds:X509Data><ds:X509Certificate>...</ds:X509Certificate></ds:X509Data></KeyInfo></ds:Signature><samlp:Status><samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Responder"><samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:RequestDenied" /></samlp:StatusCode></samlp:Status></samlp:Response>
[2024-07-17T13:38:36,926][ERROR][c.o.s.a.SamlResponse ] [node.hostname] The status code of the Response was not Success, was urn:oasis:names:tc:SAML:2.0:status:Responder
[2024-07-17T13:38:36,927][WARN ][c.a.d.a.h.s.AuthTokenProcessorHandler] [node.hostname] Error while validating SAML response in /_opendistro/_security/api/authtoken