org.mule.api.security.UnauthorisedException: Registered authentication is set to org.mule.transport.http.filters.HttpBasicAuthenticationFilter but there was no security context on the session. Authentication denied on endpoint none. Message payload is of type: NullPayload

MuleSoft JIRA | Sylwester Zieliński | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    new wersion of mule runtime has a bug in http connector. When http connector receive request http attributes are: Headers[http.version, accept-encoding, connection, http.remote.address, http.uri.params, content-type, soapaction, http.listener.path, authorization, http.request.uri, content-length, http.method, http.query.params, host, user-agent, http.scheme, http.request.path, http.query.string] -- The main problem of basic auth is that, mule passed attribute authorization instead of Authorization, and if you configure <http:basic-security-filter realm="mule-realm"/> and then is thrown exception: org.mule.api.security.UnauthorisedException: Registered authentication is set to org.mule.transport.http.filters.HttpBasicAuthenticationFilter but there was no security context on the session. Authentication denied on endpoint none. Message payload is of type: NullPayload at org.mule.transport.http.filters.HttpBasicAuthenticationFilter.authenticateInbound(HttpBasicAuthenticationFilter.java:156) at org.mule.security.AbstractEndpointSecurityFilter.authenticate(AbstractEndpointSecurityFilter.java:54) at org.mule.security.AbstractAuthenticationFilter.doFilter(AbstractAuthenticationFilter.java:52) + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything) Below fragment of HttpBasicAuthenticationFilter class: else if (header == null) { setUnauthenticated(event); throw new UnauthorisedException(event, event.getSession().getSecurityContext(), this); } where header is fetch as: String header = event.getMessage().getInboundProperty(HttpConstants.HEADER_AUTHORIZATION); cause HttpConstants.HEADER_AUTHORIZATION value is "Authorization".

    MuleSoft JIRA | 2 years ago | Sylwester Zieliński
    org.mule.api.security.UnauthorisedException: Registered authentication is set to org.mule.transport.http.filters.HttpBasicAuthenticationFilter but there was no security context on the session. Authentication denied on endpoint none. Message payload is of type: NullPayload
  2. 0

    new wersion of mule runtime has a bug in http connector. When http connector receive request http attributes are: Headers[http.version, accept-encoding, connection, http.remote.address, http.uri.params, content-type, soapaction, http.listener.path, authorization, http.request.uri, content-length, http.method, http.query.params, host, user-agent, http.scheme, http.request.path, http.query.string] -- The main problem of basic auth is that, mule passed attribute authorization instead of Authorization, and if you configure <http:basic-security-filter realm="mule-realm"/> and then is thrown exception: org.mule.api.security.UnauthorisedException: Registered authentication is set to org.mule.transport.http.filters.HttpBasicAuthenticationFilter but there was no security context on the session. Authentication denied on endpoint none. Message payload is of type: NullPayload at org.mule.transport.http.filters.HttpBasicAuthenticationFilter.authenticateInbound(HttpBasicAuthenticationFilter.java:156) at org.mule.security.AbstractEndpointSecurityFilter.authenticate(AbstractEndpointSecurityFilter.java:54) at org.mule.security.AbstractAuthenticationFilter.doFilter(AbstractAuthenticationFilter.java:52) + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything) Below fragment of HttpBasicAuthenticationFilter class: else if (header == null) { setUnauthenticated(event); throw new UnauthorisedException(event, event.getSession().getSecurityContext(), this); } where header is fetch as: String header = event.getMessage().getInboundProperty(HttpConstants.HEADER_AUTHORIZATION); cause HttpConstants.HEADER_AUTHORIZATION value is "Authorization".

    MuleSoft JIRA | 2 years ago | Sylwester Zieliński
    org.mule.api.security.UnauthorisedException: Registered authentication is set to org.mule.transport.http.filters.HttpBasicAuthenticationFilter but there was no security context on the session. Authentication denied on endpoint none. Message payload is of type: NullPayload
  3. 0

    How to get HTTP status code for REST service in Mule

    Stack Overflow | 2 years ago | Anirban Sen Chowdhary
    org.mule.api.security.UnauthorisedException: Registered authentication is set to org.mule.module.spring.security.filters.http.HttpBasicAuthenticationFilter but there was no security context on the session. Authentication denied on endpoint http://localhost:8083. Message payload is of type: String
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Mule Flow fails on first try but works after with the LDAP connector

    Stack Overflow | 2 years ago
    org.mule.api.security.UnauthorisedException: Registered authentication is set to org.mule.module.spring.security.filters.http.HttpBasicAuthenticationFilter but there was no security context on the session. Authentication denied on endpoint none. Message payload is of type: NullPayload
  6. 0

    Mule LDAP bug Socket Connection reset (java.net.SocketException) - MuleSoft

    mulesoft.com | 11 months ago
    org.mule.api.security.UnauthorisedException: Registered authentication is set to org.mule.module.spring.security.filters.http.HttpBasicAuthenticationFilter but there was no security context on the session. Authentication denied on endpoint none. Message payload is of type: NullPayload

    3 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.mule.api.security.UnauthorisedException

      Registered authentication is set to org.mule.transport.http.filters.HttpBasicAuthenticationFilter but there was no security context on the session. Authentication denied on endpoint none. Message payload is of type: NullPayload

      at org.mule.transport.http.filters.HttpBasicAuthenticationFilter.authenticateInbound()
    2. HTTP Transport
      HttpBasicAuthenticationFilter.authenticateInbound
      1. org.mule.transport.http.filters.HttpBasicAuthenticationFilter.authenticateInbound(HttpBasicAuthenticationFilter.java:156)
      1 frame
    3. Mule Core
      AbstractAuthenticationFilter.doFilter
      1. org.mule.security.AbstractEndpointSecurityFilter.authenticate(AbstractEndpointSecurityFilter.java:54)
      2. org.mule.security.AbstractAuthenticationFilter.doFilter(AbstractAuthenticationFilter.java:52)
      2 frames