Skip to content

Commit cc17faa

Browse files
committed
Add documentation for CredentialsProvider support
1 parent 551413a commit cc17faa

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/modules/ROOT/pages/developer-reference.adoc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,27 @@ The Quarkus GitHub App extension exposes the following configuration properties:
349349

350350
include::includes/quarkus-github-app.adoc[]
351351

352+
== Credentials provider
353+
354+
Quarkus GitHub App supports the usage of a https://quarkus.io/guides/credentials-provider[`CredentialsProvider`] to provide some of the configuration properties
355+
that you might not want to appear in a configuration file.
356+
357+
You can find all the information you need about ``CredentialsProvider``s in the https://quarkus.io/guides/credentials-provider[dedicated guide].
358+
359+
The basic principle is that you provide a CDI bean that will implement the `CredentialsProvider` and will provide the values for the supported configuration properties.
360+
It can either be provided by the https://github.com/quarkiverse/quarkus-vault[Vault extension] if you are using HashiCorp Vault or you can provide you own custom `CredentialsProvider` implementation.
361+
362+
Using a `CredentialsProvider` is easy:
363+
364+
- Make sure you have an implementation of `CredentialsProvider` and that it is a `@Singleton` or `@ApplicationScoped` CDI bean.
365+
- Set the `quarkus.github-app.credentials-provider` to define the name of the credentials provider.
366+
See it as the name of a keyring containing your Quarkus GitHub App secrets.
367+
- For the given name, your `CredentialsProvider` may return a `Map` containing entries for `githubAppPrivateKey` and/or `githubAppWebhookSecret`.
368+
You can use the constants present in `io.quarkiverse.githubapp.Credentials` for practicality.
369+
370+
That is all you need to do:
371+
Quarkus GitHub App will then automatically use the values provided by the `CredentialsProvider` for the private key and the webhook secret.
372+
352373
== Architecture Overview
353374

354375
image::architecture.png[Architecture]

0 commit comments

Comments
 (0)