Skip to content
This repository was archived by the owner on Jul 22, 2021. It is now read-only.

NIFIREG-131 Surface auth failure details#96

Closed
kevdoran wants to merge 1 commit intoapache:masterfrom
kevdoran:NIFIREG-131
Closed

NIFIREG-131 Surface auth failure details#96
kevdoran wants to merge 1 commit intoapache:masterfrom
kevdoran:NIFIREG-131

Conversation

@kevdoran
Copy link
Contributor

Adds logging of root cause for exceptions passed to
AuthenticationEntryPoint.

AuthenticationEntryPoint writes exception message to response body.

@kevdoran
Copy link
Contributor Author

This change results in the following responses when testing a composite file+ldap authorizer and accessing and endpoint that requires authentication:


No credentials:

HTTP/1.1 401 Unauthorized
...

An Authentication object was not found in the SecurityContext. Contact the system administrator.

Bad credentials:

HTTP/1.1 401 Unauthorized
...

Unable to validate the access token. Contact the system administrator.

Untrusted Proxy:

HTTP/1.1 403 Forbidden
...

Untrusted proxy [CN=user1, OU=nifi]. Contact the system administrator.

Logging for the root cause exception has also been added to the AuthenticationEntryPoint bean.

Adds logging of root cause for exceptions passed to
AuthenticationEntryPoint.

AuthenticationEntryPoint writes exception message to response body.
@bbende
Copy link
Contributor

bbende commented Jan 30, 2018

Reviewing...

@bbende
Copy link
Contributor

bbende commented Jan 30, 2018

+1 Verified I got back the untrusted proxy error on the client side, and also saw it in the logs on registry server side, going to merge, thanks!

@asfgit asfgit closed this in 754889b Jan 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants