Skip to content

Do not try an validate Oauth tokens that are known to be invalid #15890

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

Open
Emyrk opened this issue Dec 16, 2024 · 1 comment
Open

Do not try an validate Oauth tokens that are known to be invalid #15890

Emyrk opened this issue Dec 16, 2024 · 1 comment
Labels
customer-reported Bugs reported by enterprise customers. Only humans may set this. need-backend Issues that need backend work s2 Broken use cases or features (with a workaround). Only humans may set this. security Area: security

Comments

@Emyrk
Copy link
Member

Emyrk commented Dec 16, 2024

Related to #14982

Problem

At present, every time a request for an external auth token is made, ValidateToken is called. If the jwt is not expired, but revoked on the IdP side, then Coder will consistently retry to use the token.

This can cause excessive IdP requests, and hit rate limits.

Failed refreshes were fixed such that they are not retried here: #15608

Solution

Do not reuse invalid tokens, caching the invalid error and preventing them from causing duplicate failed requests.

Notes

@coder-labeler coder-labeler bot added bug risk Prone to bugs needs-triage Issue that require triage labels Dec 16, 2024
@bpmct
Copy link
Member

bpmct commented Jan 4, 2025

Moving this as a candidate for the next sprint, as it's related to several tickets.

@spikecurtis spikecurtis added security Area: security s2 Broken use cases or features (with a workaround). Only humans may set this. customer-reported Bugs reported by enterprise customers. Only humans may set this. need-backend Issues that need backend work and removed bug risk Prone to bugs labels Jan 6, 2025
@matifali matifali removed the needs-triage Issue that require triage label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Bugs reported by enterprise customers. Only humans may set this. need-backend Issues that need backend work s2 Broken use cases or features (with a workaround). Only humans may set this. security Area: security
Projects
None yet
Development

No branches or pull requests

4 participants