This plugin provides Security Assertion Markup Language (SAML) v2.0 authentication and authorization between Kong Gateway and an identity provider.
The SAML specification defines three roles:
- A principal
- An identity provider (IdP)
- A service provider (SP)
The SAML plugin acts as the SP and is responsible for initiating a login to the IdP. This is called an SP Initiated Login.
The minimum configuration required is:
- An IdP certificate (
idp_certificate): The SP needs to obtain the public certificate from the IdP to validate the signature. The certificate is stored on the SP and is used to verify that a response is coming from the IdP. - The ACS Endpoint (
assertion_consumer_path): This is the endpoint provided by the SP where SAML responses are posted. The SP needs to provide this information to the IdP. - The IdP sign-in URL (
idp_sso_url): This is the IdP endpoint where SAML will issuePOSTrequests. The SP needs to obtain this information from the IdP. - The issuer (
issuer): This is the unique identifier of the IdP application.
The plugin validates the SAML response signature whenever you set
idp_certificate, even whenvalidate_assertion_signatureisfalse. If you setvalidate_assertion_signaturetofalseand don’t configureidp_certificate, the plugin skips signature validation and accepts unsigned responses, which is insecure. Always setidp_certificate.
The plugin currently supports SAML 2.0 with Microsoft Entra. Refer to the Microsoft Entra SAML documentation for more information about SAML authentication with Azure AD.