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

feat(jans-auth-server): hide 302 redirect exception in logs #1294

Closed
yuriyz opened this issue May 5, 2022 · 1 comment
Closed

feat(jans-auth-server): hide 302 redirect exception in logs #1294

yuriyz opened this issue May 5, 2022 · 1 comment
Assignees
Labels
comp-jans-auth-server Component affected by issue or PR kind-feature Issue or PR is a new feature request

Comments

@yuriyz
Copy link
Contributor

yuriyz commented May 5, 2022

Description

No need to print verbose exception for 302 redirect.

2022-05-05 16:27:58,652 ERROR [qtp966739377-13] ae256f4e-5c42-4cd7-b404-91e19c80ab99 [org.jboss.resteasy.core.ExceptionHandler] (ExceptionHandler.java:292) - RESTEASY002010: Failed to execute
jakarta.ws.rs.WebApplicationException: HTTP 302 Found
	at io.jans.as.server.authorize.ws.rs.AuthorizeRestWebServiceImpl.ifUserIsNull(AuthorizeRestWebServiceImpl.java:728) ~[classes/:?]
	at io.jans.as.server.authorize.ws.rs.AuthorizeRestWebServiceImpl.authorize(AuthorizeRestWebServiceImpl.java:366) ~[classes/:?]
	at io.jans.as.server.authorize.ws.rs.AuthorizeRestWebServiceImpl.requestAuthorization(AuthorizeRestWebServiceImpl.java:288) ~[classes/:?]
	at io.jans.as.server.authorize.ws.rs.AuthorizeRestWebServiceImpl.requestAuthorizationGet(AuthorizeRestWebServiceImpl.java:231) ~[classes/:?]
	at io.jans.as.server.authorize.ws.rs.AuthorizeRestWebServiceImpl$Proxy$_$$_WeldClientProxy.requestAuthorizationGet(Unknown Source) ~[classes/:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:170) ~[resteasy-core-6.0.0.Final.jar:6.0.0.Final]

Also have to check another place where silent method is called however still verbose exception is printed:

2022-05-05 16:33:04,070 ERROR [qtp966739377-20] [io.jans.as.server.service.GrantService] (GrantService.java:161) - Failed to find entry: tknCde=4dfa203840bc584c86ee7a153f74d0bbf02f1b8912ff63a64bee84a29780316c,ou=tokens,o=jans
io.jans.orm.exception.EntryPersistenceException: Failed to find entry: tknCde=4dfa203840bc584c86ee7a153f74d0bbf02f1b8912ff63a64bee84a29780316c,ou=tokens,o=jans
	at io.jans.orm.ldap.impl.LdapEntryManager.find(LdapEntryManager.java:405) ~[jans-orm-ldap-1.0.0-SNAPSHOT.jar:?]
	at io.jans.orm.impl.BaseEntryManager.find(BaseEntryManager.java:712) ~[jans-orm-core-1.0.0-SNAPSHOT.jar:?]
	at io.jans.orm.impl.BaseEntryManager.find(BaseEntryManager.java:591) ~[jans-orm-core-1.0.0-SNAPSHOT.jar:?]
	at io.jans.orm.impl.BaseEntryManager.find(BaseEntryManager.java:578) ~[jans-orm-core-1.0.0-SNAPSHOT.jar:?]
	at jdk.internal.reflect.GeneratedMethodAccessor73.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
	at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:38) ~[weld-core-impl-4.0.3.Final.jar:4.0.3.Final]
	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:106) ~[weld-core-impl-4.0.3.Final.jar:4.0.3.Final]
	at io.jans.orm.PersistenceEntryManager$EntityManager$2057902728$Proxy$_$$_WeldClientProxy.find(Unknown Source) ~[jans-orm-core-1.0.0-SNAPSHOT.jar:?]
	at io.jans.as.server.service.GrantService.load(GrantService.java:159) ~[classes/:?]
	at io.jans.as.server.service.GrantService.getGrantByCode(GrantService.java:153) ~[classes/:?]
	at io.jans.as.server.service.GrantService.removeByCode(GrantService.java:224) ~[classes/:?]
	at io.jans.as.server.token.ws.rs.TokenRestWebServiceImpl.processDeviceCodeGrantType(TokenRestWebServiceImpl.java:686) ~[classes/:?]
	at io.jans.as.server.token.ws.rs.TokenRestWebServiceImpl.requestAccessToken(TokenRestWebServiceImpl.java:584) ~[classes/:?]
	at io.jans.as.server.token.ws.rs.TokenRestWebServiceImpl$Proxy$_$$_WeldClientProxy.requestAccessToken(Unknown Source) ~[classes/:?]
@yuriyz yuriyz added comp-jans-auth-server Component affected by issue or PR kind-feature Issue or PR is a new feature request labels May 5, 2022
@yuriyz yuriyz self-assigned this May 5, 2022
yuriyz added a commit that referenced this issue May 10, 2022
feat(jans-auth-server): hide 302 redirect exception in logs #1294
@yuriyz
Copy link
Contributor Author

yuriyz commented May 10, 2022

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-jans-auth-server Component affected by issue or PR kind-feature Issue or PR is a new feature request
Projects
None yet
Development

No branches or pull requests

1 participant