openshift / openshift-restclient-java

Other
78 stars 112 forks source link

Error message: Failed to determine authorization- & token-endpoint: got 403 #450

Closed gionn closed 4 years ago

gionn commented 4 years ago

Hi,

since upgrading from 8.1.0.Final to 9.0.0.Final we found this error during the startup of the client, however it's harmless.

Is this an issue or not?

Failed to determine authorization- & token-endpoint: got 403
    at com.openshift.internal.restclient.RequestingSupplier.request(RequestingSupplier.java:75)
    at com.openshift.internal.restclient.RequestingSupplier.requestIfRequired(RequestingSupplier.java:55)
    at com.openshift.internal.restclient.RequestingSupplier.get(RequestingSupplier.java:49)
    at com.openshift.internal.restclient.AuthorizationEndpoints.getEndpoint(AuthorizationEndpoints.java:59)
    at com.openshift.internal.restclient.AuthorizationEndpoints.getAuthorizationEndpoint(AuthorizationEndpoints.java:49)
    at com.openshift.internal.restclient.DefaultClient.getAuthorizationEndpoint(DefaultClient.java:470)
    at com.openshift.internal.restclient.okhttp.AuthenticatorInterceptor.isUrlWithoutAuthorization(AuthenticatorInterceptor.java:87)
    at com.openshift.internal.restclient.okhttp.AuthenticatorInterceptor.intercept(AuthenticatorInterceptor.java:55)
adietish commented 4 years ago

Hi @gionn

This looks very similar to https://github.com/openshift/openshift-restclient-java/issues/439#issuecomment-613424974 which should have been fixed in 8.1.2.Final. The behaviour that was introduced back then was to try to discover the authorization endpoint and fall back to the default endpoint otherwise. Failing to discover would spit the above purely informative output. If you have no troubles logging in, then things behave as expected and there's no reason to worry. If not we'd be facing a bug. Is logging in working for you?

gionn commented 4 years ago

Failing to discover would spit the above purely informative output.

If it's purely informative it's better to lower logging severity from error to info, at least.

Is logging in working for you?

Yeah, It's working, but the error message let me think that something was not ok.

Thanks.

adietish commented 4 years ago

Failing to discover would spit the above purely informative output.

If it's purely informative it's better to lower logging severity from error to info, at least.

fair point, fully agree, created PR: #458

Is logging in working for you?

Yeah, It's working, but the error message let me think that something was not ok.

Thanks.

great if things work fine beside the scary logging :)