Skip to content

OpenShiftOAuthInterceptor should not refresh on 403 response code #4970

@rohanKanojia

Description

@rohanKanojia

Is your task related to a problem? Please describe

Originally posted by @shawkins in an internal conversation:

the openshift logic will force a refresh for 401 and 403, but the kuberentes logic is only for 401 - do you know if this is intentional or should we do some digging in kubectl and oc

OpenShiftOAuthInterceptor seems to proceed with token refresh on either getting 401 (UNAUTHORIZED) or 403 (FORBIDDEN) response codes:

return response.code() != HTTP_UNAUTHORIZED && response.code() != HTTP_FORBIDDEN;

However, there is no mention of handing 403 in RFC 6749.

In kubectl source I only see 401 being handled for refresh.

In oc source, I'm not able to see 403 referenced either.

Describe the solution you'd like

OpenShiftOAuthInterceptor should only refresh when 401 status code is encountered.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions