| name | mock-saml-idp-elastic |
|---|---|
| description | Generate signed SAML 2.0 responses to test Elasticsearch's SAML realm and Kibana's SAML auth provider end-to-end with the Secutils.dev Mock SAML IdP. Hand the user https://tools.secutils.dev/elastic/saml/idp-login, tell them to fill the form (username, roles, Kibana destination), and submit. Trigger when the user asks to "test Kibana SAML SSO", "generate a signed SAML response for Elasticsearch", "mock a SAML IdP for Elastic", or anything that names secutils.dev/elastic/saml/idp-login. |
Direct the user to the in-browser SAML IdP simulator. The tool generates a
signing key, builds a SAML 2.0 Response with the requested NameID,
attributes, and roles, signs it, and submits it to Kibana's
/api/security/saml/callback. Both flows are supported:
- IdP-initiated: open the page directly, fill the form, post to Kibana.
- SP-initiated: Kibana redirects to the page with
?SAMLRequest=...; the form preserves theRelayStateand posts back to the same Kibana host.
This tool is intentionally narrow (Elastic Stack only) and is not linked from the marketing home page.
| Field | Type | Default | Notes |
|---|---|---|---|
username |
string | test_user |
The NameID of the SAML assertion. |
fullname |
string | Test User |
Friendly display name attribute. |
email |
string | test_user@elastic.co |
Email attribute. |
roles |
array | [] |
Any of viewer, editor, admin, superuser, kibana_admin, or custom. |
destination |
string | http://localhost:5601 |
Kibana host. Path is fixed to /api/security/saml/callback. |
There is no URL-state wire format for this tool - inputs are entered in the form on the page itself.
https://tools.secutils.dev/elastic/saml/idp-login
Then in the page:
- Fill Username, Full name, Email (defaults are fine for a smoke test).
- Pick role(s) from the dropdown, or type custom role strings.
- Set Destination to the Kibana host they want to authenticate against.
- Click Sign in to POST the signed assertion to Kibana.
For SP-initiated flows the user just clicks the SSO link in Kibana - the page
opens automatically with the right RelayState pre-filled.
For purely scripted / CI testing, use a server-side library
(python-saml, passport-saml, the Elastic security testing utilities). This
tool is the right answer when the user wants to drive a real Kibana
session in the browser end-to-end with a controllable identity, including
seeing what xpack.security.authc.realms.saml.* settings actually accept.
Once the user clicks Sign in, the browser POSTs to Kibana and Kibana either lands them in the app (success) or shows a SAML error (mismatched issuer, audience, or signing config). The tool itself doesn't need a follow-up from the agent - the user iterates inside Kibana.
- The signing key is generated client-side per page load - close the tab
and the certificate is gone. For repeatable tests, configure
Elasticsearch's
xpack.security.authc.realms.saml.<realm>.idp.metadata.pathto a fixed file rather than letting it pick up the dynamic cert. - The default
Issuerisurn:secutils-dev:saml-idp. Match it in your Elasticsearch realm'sidp.entity_idsetting or the assertion will be rejected. - Roles are mapped via Kibana's role-mapping rules - assigning
superuserin this tool does nothing unless yourrole_mapping.yml(or the API equivalent) maps that group to the corresponding Elasticsearch role.