Configure pac4j "readTimeout"

42 views
Skip to first unread message

Peyo Tzolov

unread,
Jul 22, 2019, 1:00:46 PM7/22/19
to CAS Community
Hey guys,

How can I configure the pac4j readTimeout through the cas configuration?

I keep getting timeout exceptions when trying to delegated auth:

 2019-07-22 16:44:57,370 DEBUG [org.pac4j.oidc.client.OidcClient] - <Credentials validation took: 9095 ms>
aod_cas.1.pve7vht5lqc6@ptzolov-leader    | 2019-07-22 16:44:57,372 INFO [org.apereo.cas.web.flow.DelegatedClientAuthenticationAction] - <java.net.SocketTimeoutException: Read timed out>
aod_cas.1.pve7vht5lqc6@ptzolov-leader    | org.pac4j.core.exception.TechnicalException: java.net.SocketTimeoutException: Read timed out
aod_cas.1.pve7vht5lqc6@ptzolov-leader    | at org.pac4j.oidc.credentials.authenticator.OidcAuthenticator.validate(OidcAuthenticator.java:159) ~[pac4j-oidc-3.6.1.jar!/:?]
aod_cas.1.pve7vht5lqc6@ptzolov-leader    | at org.pac4j.oidc.credentials.authenticator.OidcAuthenticator.validate(OidcAuthenticator.java:35) ~[pac4j-oidc-3.6.1.jar!/:?]
aod_cas.1.pve7vht5lqc6@ptzolov-leader    | at org.pac4j.core.client.BaseClient.retrieveCredentials(BaseClient.java:71) ~[pac4j-core-3.6.1.jar!/:?]
aod_cas.1.pve7vht5lqc6@ptzolov-leader    | at org.pac4j.core.client.IndirectClient.getCredentials(IndirectClient.java:140) ~[pac4j-core-3.6.1.jar!/:?]
aod_cas.1.pve7vht5lqc6@ptzolov-leader    | at org.apereo.cas.web.flow.DelegatedClientAuthenticationAction.getCredentialsFromDelegatedClient(DelegatedClientAuthenticationAction.java:277) ~[cas-server-support-pac4j-webflow-6.0.3.jar!


The OIDClient object I have is:
<Created client [#OidcClient# | name: OpenIDTest | callbackUrl: null | callbackUrlResolver: org.pac4j.core.http.callback.PathParameterCallbackUrlResolver@da34eb0 | ajaxRequestResolver: null | redirectActionBuilder: null | credentialsExtractor: null | authenticator: null | profileCreator: org.pac4j.core.profile.creator.AuthenticatorProfileCreator@785a4557 | logoutActionBuilder: org.pac4j.core.logout.NoLogoutActionBuilder@2bf3ec4 | authorizationGenerators: [] | configuration: #OidcConfiguration# | clientId: dhtest1 | secret: [protected] | discoveryURI: https:... | scope: openid | customParams: {} | clientAuthenticationMethod: null | useNonce: false | preferredJwsAlgorithm: RS256 | maxAge: null | maxClockSkew: 100000 | connectTimeout: 500 | readTimeout: 5000 | resourceRetriever: null | responseType: code | responseMode: null | logoutUrl: null | withState: false | stateGenerator: org.pac4j.core.state.StaticOrRandomStateGenerator@3b5da0b0 | |]>


Note the : readTimeout: 5000

How can I configure this parameter through a config file?

Thanks!
Reply all
Reply to author
Forward
0 new messages