Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[auth] Support refresh tokens for OAuth

Aperta
#3,145 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java

Direzione di ricerca

The issue describes adding OAuth refresh token support to the ClickHouse Java client. Start by examining the existing authentication and connection handling code, likely in packages related to client configuration and HTTP/API communication. Look for where JWT tokens are currently managed and where token expiration errors are thrown. The solution involves designing a callback interface, a default implementation, and integrating this with the JDBC driver. Check for existing tests around authentication to understand the current behavior and add tests for the new refresh flow.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:integration client-api-v2 jdbc-v2
Description

ClickHouse Cloud supports JWT for Authentication. This opens a way to support OAuth 2.0. This standard is used to authenticate users for accessing service (and more). There is a thing called "Refresh token" that helps to reduce life of access token and avoid frequent user interactions. It is all needed because JWT is signed "key" to access something and by designed it cannot be invalidated in real time until it expires. So short TTL would solve problem of invalidating tokens faster but it creates problem of requesting new access token too frequently. Thus another "refresh" token comes into play - it is used to request next pair of access token / refresh token from authentication provider without user interaction. If user has no more access to resources / service it tries to reach then refresh fails.

Read more https://auth0.com/docs/secure/tokens/refresh-tokens

There is a mostly standard procedure of getting tokens described here

Client should handled expired token error from ClickHouse Cloud and call the procedure.
Documentation should state that if operation has some timeout this refresh will make request to fail but anyway.

Design

  • there should be callback for token expiration errors. Just a callback that can be implemented by user
  • there should be a default callback implementation with own config that can do "standard" refresh. config should be prefixed with "ouath_refresh_".
  • when callback is not set exception is thrown to application
  • token refresh code should be usable to run in timer when application want to avoid expiration of a previous JWT (useful when need to have strict timeout on operation and handle auto-refresh)
  • there should be a solution for JDBC
Lingua principale
Java
Stelle
1.6k
Fork
637
Merge medio
2g 17h
PR unite (30g)
29

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ClickHouse/clickhouse-java

Tutte le issue di ClickHouse/clickhouse-java

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.