Skip to content

Authentication failures return Server error #36

Open

Description

@enridaga

We should return a proper status and message instead

Activity

  1. changed the title [-]Authentication error returns 500 Server error[/-] [+]Authentication failures return Server error[/+] on Oct 14, 2015
  2. enridaga commented on Oct 14, 2015

    @enridaga
    ContributorAuthor

    Trace is something like:

    org.apache.shiro.authc.UnknownAccountException: No account found for user [enrico]
        at org.apache.shiro.realm.jdbc.JdbcRealm.doGetAuthenticationInfo(JdbcRealm.java:238) ~[basil-server-0.4.0-SNAPSHOT.jar:?]
        at org.apache.shiro.realm.AuthenticatingRealm.getAuthenticationInfo(AuthenticatingRealm.java:568) ~[basil-server-0.4.0-SNAPSHOT.jar:?]
        at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doSingleRealmAuthentication(ModularRealmAuthenticator.java:180) ~[basil-server-0.4.0-SNAPSHOT.jar:?]
        at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doAuthenticate(ModularRealmAuthenticator.java:267) ~[basil-server-0.4.0-SNAPSHOT.jar:?]
        at org.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:198) ~[basil-server-0.4.0-SNAPSHOT.jar:?]
        at org.apache.shiro.mgt.AuthenticatingSecurityManager.authenticate(AuthenticatingSecurityManager.java:106) ~[basil-server-0.4.0-SNAPSHOT.jar:?]
        at org.apache.shiro.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:270) ~[basil-server-0.4.0-SNAPSHOT.jar:?]
        at org.apache.shiro.subject.support.DelegatingSubject.login(DelegatingSubject.java:256) ~[basil-server-0.4.0-SNAPSHOT.jar:?]
        at uk.ac.open.kmi.basil.rest.auth.Auth
    

    We should avoid to print this stacktrace as well, and not pollute the logs.

  3. self-assigned this
    on Feb 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions