Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication failures return Server error #36

Open
enridaga opened this issue Oct 14, 2015 · 1 comment
Open

Authentication failures return Server error #36

enridaga opened this issue Oct 14, 2015 · 1 comment
Assignees
Labels

Comments

@enridaga
Copy link
Contributor

We should return a proper status and message instead

@enridaga enridaga changed the title Authentication error returns 500 Server error Authentication failures return Server error Oct 14, 2015
@enridaga
Copy link
Contributor Author

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.

@enridaga enridaga added the bug label Feb 23, 2016
@enridaga enridaga self-assigned this Feb 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant