quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.64k stars 2.64k forks source link

CredentialsProvider API should be asynchronous #32021

Open tsegismont opened 1 year ago

tsegismont commented 1 year ago

Description

A CredentialsProvider can be invoked several times over the application's lifetime, not just on startup. Besides, it can be invoked by an event loop thread.

But it has a synchronous API:

https://github.com/quarkusio/quarkus/blob/bc4955b027800abd07c066f63120bc37b532f634/extensions/credentials/runtime/src/main/java/io/quarkus/credentials/CredentialsProvider.java#L20

Given the implementation may read data on disk or from an external system, the API should be asynchronous (and the implementation non blocking).

Implementation ideas

See https://github.com/quarkusio/quarkus/pull/31873#issuecomment-1476534265

tsegismont commented 1 year ago

cc @cescoffier @geoand