Hi I have integrated Secured Nifi with NGINX and is integrated with Onelogin SAML 2.0 Custom Connector (Advanced)
After entering credentials of one login it shows user logged in on onelogin portal, But on Browser it redirects to /nifi-api/access/saml/login/consumer this url and it shows
HTTP ERROR 401 Unauthorized
URI:STATUS:MESSAGE:
/nifi-api/access/saml/login/consumer
401
Unauthorized
Few findings are- Recipient value in SAML payload is empty and Cookie value is not matching with InResponseTo value in SAML Payload Also not sure how to match it
from nifi.user.log file i can see error:
SAML Authentication Request Identifier Cookie not found
@rsurti The issue described suggests a mismatch or misconfiguration in the SAML integration with NiFi and NGINX. The following analysis and potential solutions should address your findings
SAML Payload Issues:
Empty Recipient Value: The Recipient in the SAML assertion should match the ACS (Assertion Consumer Service) URL configured in NiFi. If it is empty, this indicates a misconfiguration in the SAML IdP (OneLogin).
Cookie and InResponseTo Mismatch: The InResponseTo attribute in the SAML response should correspond to the SAML request identifier issued by NiFi. If the cookie storing the SAML request ID is missing or mismatched, authentication fails.
NiFi Error: SAML Authentication Request Identifier Cookie not found:
This suggests that the browser is not sending back the SAML request ID cookie, or NiFi cannot recognize it. This could happen if:
The cookie is not set or overwritten by NGINX.
The cookie is being blocked or dropped due to cross-domain or SameSite restrictions.
NGINX is misconfigured to handle or forward SAML cookies.
Probable Causes
NiFi Configuration:
Misconfigured nifi.security.user.saml properties in nifi.properties.
ACS URL mismatch between NiFi and OneLogin.
NGINX Configuration:
Improper handling of cookies, particularly the SAML request identifier cookie.
Incorrect forwarding of headers or paths for SAML requests and responses.
OneLogin Configuration:
The SAML application in OneLogin is not configured to provide a valid Recipient or ACS URL.
Mismatched SAML settings such as entity ID, ACS URL, or signature settings.
Steps to Resolve
1. Verify and Update NiFi Configuration
Ensure the nifi.properties file has the correct SAML configurations: