[auth] Support refresh tokens for OAuth
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- java
- Domínio
- api, authentication, backend
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- Java
- Estrelas
- 1.6k
- Forks
- 640
- Merge médio
- 1d 12h
- PRs com merge (30d)
- 42
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de ClickHouse/clickhouse-java
-
bug jdbc-v2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
ClickHouse/clickhouse-java#3214 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
ClickHouse/clickhouse-java#3212 ·
Mantenedores costumam responder em até 1 dia
-
bug client-api-v2 test
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 92/100
ClickHouse/clickhouse-java#3076 ·
Mantenedores costumam responder em até 1 dia
-
area:sql-parser bug client-v1
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 92/100
ClickHouse/clickhouse-java#3066 ·
Mantenedores costumam responder em até 1 dia
-
bug client-api-v2 jdbc-v2
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 78/100
ClickHouse/clickhouse-java#2957 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de ClickHouse/clickhouse-java
Issues semelhantes
-
NullPointerException when a `DeserializationProblemHandler` returns `null` for `byte[]` (single value unwrapped) and `char[]` elementsTalvez já em andamento @Marti2203 assumiu hoje. Aberta
Dificuldade 2/5 Meio dia Facilidade para iniciantes 88/100
FasterXML/jackson-databind#6300 ·
Mantenedores costumam responder em até 1 dia
-
content good first issue
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 95/100
cpinitiative/usaco-guide#6699 ·
Mantenedores costumam responder em até 1 dia
-
BC remittance upload: a claim MSP refused (S03) is saved with a blank status instead of refused (F)Abertatype: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
carlos-emr/carlos#4933 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
apache/rocketmq-dashboard#6925 ·
Mantenedores costumam responder em até 3 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Vakore/ZappierGames#147 ·