OpenID Connect (OIDC) マルチテナンシーの使用
このガイドでは、OpenID Connect (OIDC) アプリケーションがマルチテナンシーをサポートして、単一のアプリケーションから複数のテナントにサービスを提供する方法を説明します。テナントは、同じ OpenID プロバイダー内の個別のレルムまたはセキュリティードメイン、あるいは個別の OpenID プロバイダーです。
同じアプリケーション (例: SaaS) から複数の顧客にサービスを提供する場合、各顧客はテナントです。アプリケーションに対してマルチテナンシーサポートを有効にすることで、Keycloak や Google などのさまざまな OpenID プロバイダーに対する認証であっても、テナントごとに異なる認証ポリシーをサポートできます。
Bearer Token Authorization を使用してテナントを承認する必要がある場合は、OpenID Connect によるサービスアプリケーションの保護 ガイドを参照してください。
OpenID Connect Authorization Code Flow を使用してテナントの認証と認可を行う必要がある場合は、 OpenID Connect を使用したウェブアプリケーションの保護 ガイドをお読みください。
前提条件
このガイドを完成させるには、以下が必要です:
-
約15分
-
IDE
-
JDK 11+ がインストールされ、
JAVA_HOMEが適切に設定されていること -
Apache Maven 3.8.6
-
動作するコンテナランタイム(Docker, Podman)
-
使用したい場合は、 Quarkus CLI
-
ネイティブ実行可能ファイルをビルドしたい場合、MandrelまたはGraalVM(あるいはネイティブなコンテナビルドを使用する場合はDocker)をインストールし、 適切に設定していること
アーキテクチャ
この例では、2つのリソースメソッドをサポートする非常にシンプルなアプリケーションを構築します:
-
/{tenant}
OpenID Providerが発行するIDトークンから取得した、認証されたユーザと現在のテナントに関する情報を返すリソースです。
-
/{tenant}/bearer
OpenID Providerが発行するアクセストークンから取得した、認証されたユーザと現在のテナントに関する情報を返すリソースです。
ソリューション
次の章で紹介する手順に沿って、ステップを踏んでアプリを作成することをお勧めします。ただし、完成した例にそのまま進んでも構いません。
Gitレポジトリをクローンするか git clone https://github.com/quarkusio/quarkus-quickstarts.git 、 アーカイブ をダウンロードします。
ソリューションは、 security-openid-connect-multi-tenancy-quickstart ディレクトリー にあります。
Mavenプロジェクトの作成
まず、新しいプロジェクトが必要です。以下のコマンドで新規プロジェクトを作成します。
すでにQuarkusプロジェクトが設定されている場合は、プロジェクトのベースディレクトリーで以下のコマンドを実行することで、プロジェクトに oidc エクステンションを追加することができます。
quarkus extension add 'oidc'
./mvnw quarkus:add-extension -Dextensions='oidc'
./gradlew addExtension --extensions='oidc'
これにより、 pom.xml に以下が追加されます:
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-oidc</artifactId>
</dependency>
implementation("io.quarkus:quarkus-oidc")
アプリケーションの記述
まずは /{tenant} エンドポイントを実装してみましょう。下のソースコードを見るとわかるように、これは通常の JAX-RS リソースです。
package org.acme.quickstart.oidc;
import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import org.eclipse.microprofile.jwt.JsonWebToken;
import io.quarkus.oidc.IdToken;
@Path("/{tenant}")
public class HomeResource {
/**
* Injection point for the ID Token issued by the OpenID Connect Provider
*/
@Inject
@IdToken
JsonWebToken idToken;
/**
* Injection point for the Access Token issued by the OpenID Connect Provider
*/
@Inject
JsonWebToken accessToken;
/**
* Returns the ID Token info. This endpoint exists only for demonstration purposes, you should not
* expose this token in a real application.
*
* @return ID Token info
*/
@GET
@Produces("text/html")
public String getIdTokenInfo() {
StringBuilder response = new StringBuilder().append("<html>")
.append("<body>");
response.append("<h2>Welcome, ").append(this.idToken.getClaim("email").toString()).append("</h2>\n");
response.append("<h3>You are accessing the application within tenant <b>").append(idToken.getIssuer()).append(" boundaries</b></h3>");
return response.append("</body>").append("</html>").toString();
}
/**
* Returns the Access Token info. This endpoint exists only for demonstration purposes, you should not
* expose this token in a real application.
*
* @return Access Token info
*/
@GET
@Produces("text/html")
@Path("bearer")
public String getAccessTokenInfo() {
StringBuilder response = new StringBuilder().append("<html>")
.append("<body>");
response.append("<h2>Welcome, ").append(this.accessToken.getClaim("email").toString()).append("</h2>\n");
response.append("<h3>You are accessing the application within tenant <b>").append(accessToken.getIssuer()).append(" boundaries</b></h3>");
return response.append("</body>").append("</html>").toString();
}
}
受信リクエストからテナントを解決し、application.propertiesで特定の quarkus-oidc テナント設定にマッピングするためには、テナント設定を動的に解決するために使用できる io.quarkus.oidc.TenantConfigResolver インターフェイスの実装を作成する必要があります:
package org.acme.quickstart.oidc;
import javax.enterprise.context.ApplicationScoped;
import org.eclipse.microprofile.config.ConfigProvider;
import io.quarkus.oidc.OidcRequestContext;
import io.quarkus.oidc.OidcTenantConfig;
import io.quarkus.oidc.OidcTenantConfig.ApplicationType;
import io.quarkus.oidc.TenantConfigResolver;
import io.smallrye.mutiny.Uni;
import io.vertx.ext.web.RoutingContext;
@ApplicationScoped
public class CustomTenantResolver implements TenantConfigResolver {
@Override
public Uni<OidcTenantConfig> resolve(RoutingContext context, OidcRequestContext<OidcTenantConfig> requestContext) {
String path = context.request().path();
if (path.startsWith("/tenant-a")) {
String keycloakUrl = ConfigProvider.getConfig().getValue("keycloak.url", String.class);
OidcTenantConfig config = new OidcTenantConfig();
config.setTenantId("tenant-a");
config.setAuthServerUrl(keycloakUrl + "/realms/tenant-a");
config.setClientId("multi-tenant-client");
config.getCredentials().setSecret("secret");
config.setApplicationType(ApplicationType.HYBRID);
return Uni.createFrom().item(config);
} else {
// resolve to default tenant config
return Uni.createFrom().nullItem();
}
}
}
上記の実装から、テナントはリクエストパスから解決されるため、テナントを推測できなかった場合は、デフォルトのテナント設定を使用する必要があることを示すために null が返されます。
tenant-a アプリケーションタイプは hybrid であることに注意してください。HTTPベアラートークンが提供された場合はそれを受け入れることができますが、そうでない場合は認証が必要なときに認可コードフローが開始されます。
アプリケーションの設定
# Default Tenant Configuration
%prod.quarkus.oidc.auth-server-url=http://localhost:8180/realms/quarkus
quarkus.oidc.client-id=multi-tenant-client
quarkus.oidc.application-type=web-app
# Tenant A Configuration is created dynamically in CustomTenantConfigResolver
# HTTP Security Configuration
quarkus.http.auth.permission.authenticated.paths=/*
quarkus.http.auth.permission.authenticated.policy=authenticated
The first configuration is the default tenant configuration that should be used when the tenant can not be inferred from the request. Note that a %prod profile prefix is used with quarkus.oidc.auth-server-url - it is done to support testing a multi-tenant application with Dev Services For Keycloak. This configuration is using a Keycloak instance to authenticate users.
2つ目の設定は TenantConfigResolver によって提供されます。これは、受信リクエストがテナント tenant-a にマッピングされるときに使用される設定です。
どちらの設定でも、異なる realms を使用しばら、同じ Keycloak サーバーインスタンスにマップされることに注意してください。
または、 application.properties で直接テナント tenant-a を設定することもできます:
# Default Tenant Configuration
%prod.quarkus.oidc.auth-server-url=http://localhost:8180/realms/quarkus
quarkus.oidc.client-id=multi-tenant-client
quarkus.oidc.application-type=web-app
# Tenant A Configuration
quarkus.oidc.tenant-a.auth-server-url=http://localhost:8180/realms/tenant-a
quarkus.oidc.tenant-a.client-id=multi-tenant-client
quarkus.oidc.tenant-a.application-type=web-app
# HTTP Security Configuration
quarkus.http.auth.permission.authenticated.paths=/*
quarkus.http.auth.permission.authenticated.policy=authenticated
そして、カスタム TenantConfigResolver を使って解決します:
package org.acme.quickstart.oidc;
import javax.enterprise.context.ApplicationScoped;
import io.quarkus.oidc.TenantResolver;
import io.vertx.ext.web.RoutingContext;
@ApplicationScoped
public class CustomTenantResolver implements TenantResolver {
@Override
public String resolve(RoutingContext context) {
String path = context.request().path();
String[] parts = path.split("/");
if (parts.length == 0) {
// resolve to default tenant configuration
return null;
}
return parts[1];
}
}
設定ファイルで複数のテナントを定義できます。 TenantResolver 実装からテナントを解決するときに適切にマップできるように、それらに一意のエイリアスがあることを確認してください。
しかし、静的なテナント解決( application.properties でテナントを設定し、 TenantResolver で解決する)を使用すると、 Dev Services for Keycloak でエンドポイントをテストすることができません。 Dev Services for Keycloak は、リクエストが個々のテナントにどのようにマッピングされるかを知らないため、テナント固有の quarkus.oidc.<tenant-id>.auth-server-url 値を動的に提供できず、したがって %prod プレフィックスを使用して application.properties のテナントに固有の URL を使用するとテストや開発モードで動作しません。
|
現在のテナントが OIDC の
同様の手法は、 |
|
Hibernate ORM マルチテナンシー も使用し、OIDC と Hibernate ORM の両方のテナント ID が同じであり、Vert.x の
|
Keycloak サーバーの起動と設定
Keycloak サーバーを起動するにはDockerを使用し、以下のコマンドを実行するだけです。
docker run --name keycloak -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin -p 8180:8080 quay.io/keycloak/keycloak:{keycloak.version} start-dev
ここで、 keycloak.version は 17.0.0 以上に設定する必要があります。
localhost:8180 で Keycloak サーバーにアクセスできるはずです。
Keycloak 管理コンソールにアクセスするには、 admin ユーザーとしてログインしてください。ユーザー名は admin 、パスワードは admin です。
さて、以下の手順に従って、2つのテナントのためのレルムをインポートします。
-
default-tenant-realm.json をインポートし、デフォルトのレルムを作成します。
-
tenant-a-realm.json をインポートし、テナント
tenant-aのレルムを作成します。
詳細は、 新規レルムの作成 方法に関する Keycloak ドキュメントを参照してください。
アプリケーションの実行と使用
デベロッパーモードでの実行
マイクロサービスをdevモードで実行するには:
quarkus dev
./mvnw quarkus:dev
./gradlew --console=plain quarkusDev
JVMモードでの動作
「開発モード」で遊び終わったら、標準のJavaアプリケーションとして実行することができます。
まずコンパイルします。
quarkus build
./mvnw install
./gradlew build
次に、以下を実行してください。
java -jar target/quarkus-app/quarkus-run.jar
ネイティブモードでの実行
同じデモをネイティブコードにコンパイルすることができます。
これは、生成されたバイナリーにランタイム技術が含まれており、最小限のリソースオーバーヘッドで実行できるように最適化されているため、本番環境にJVMをインストールする必要がないことを意味します。
コンパイルには少し時間がかかるので、このステップはデフォルトで無効になっています。ネイティブビルドを有効にして再度ビルドしてみましょう。
quarkus build --native
./mvnw install -Dnative
./gradlew build -Dquarkus.package.type=native
コーヒーを飲み終わると、このバイナリーは以下のように直接実行出来るようになります:
./target/security-openid-connect-multi-tenancy-quickstart-runner
アプリケーションのテスト
Dev Services for Keycloakの使用
Keycloakに対する統合テストには、 Dev Services for Keycloak の使用を推奨します。 Dev Services for Keycloak はテストコンテナを起動し初期化します。設定されたレルムをインポートし、このクイックスタートで使用される CustomTenantResolver のベース Keycloak URL を設定して、レルム固有の URL を計算します。
まず、以下の依存関係を追加する必要があります:
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-test-keycloak-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<scope>test</scope>
</dependency>
testImplementation("io.quarkus:quarkus-test-keycloak-server")
testImplementation("io.rest-assured:rest-assured")
testImplementation("net.sourceforge.htmlunit:htmlunit")
quarkus-test-keycloak-server は、レルム固有のアクセストークンを取得するためのユーティリティクラス io.quarkus.test.keycloak.client.KeycloakTestClient を提供し、 RestAssured と共にベアラアクセストークンを期待する /{tenant}/bearer エンドポイントのテストに使用できます。 HtmlUnit は /{tenant} エンドポイントと認可コードフローのテストに使用します。
次に、必要なレルムを設定します:
# Default Tenant Configuration
%prod.quarkus.oidc.auth-server-url=http://localhost:8180/realms/quarkus
quarkus.oidc.client-id=multi-tenant-client
quarkus.oidc.application-type=web-app
# Tenant A Configuration is created dynamically in CustomTenantConfigResolver
# HTTP Security Configuration
quarkus.http.auth.permission.authenticated.paths=/*
quarkus.http.auth.permission.authenticated.policy=authenticated
quarkus.keycloak.devservices.realm-path=default-tenant-realm.json,tenant-a-realm.json
最後に、JVM モードで実行されるテストを作成します。
package org.acme.quickstart.oidc;
import static org.hamcrest.Matchers.containsString;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.IOException;
import org.junit.jupiter.api.Test;
import com.gargoylesoftware.htmlunit.SilentCssErrorHandler;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlForm;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.keycloak.client.KeycloakTestClient;
import io.restassured.RestAssured;
@QuarkusTest
public class CodeFlowTest {
KeycloakTestClient keycloakClient = new KeycloakTestClient();
@Test
public void testLogInDefaultTenant() throws IOException {
try (final WebClient webClient = createWebClient()) {
HtmlPage page = webClient.getPage("http://localhost:8081/default");
assertEquals("Sign in to quarkus", page.getTitleText());
HtmlForm loginForm = page.getForms().get(0);
loginForm.getInputByName("username").setValueAttribute("alice");
loginForm.getInputByName("password").setValueAttribute("alice");
page = loginForm.getInputByName("login").click();
assertTrue(page.asText().contains("tenant"));
}
}
@Test
public void testLogInTenantAWebApp() throws IOException {
try (final WebClient webClient = createWebClient()) {
HtmlPage page = webClient.getPage("http://localhost:8081/tenant-a");
assertEquals("Sign in to tenant-a", page.getTitleText());
HtmlForm loginForm = page.getForms().get(0);
loginForm.getInputByName("username").setValueAttribute("alice");
loginForm.getInputByName("password").setValueAttribute("alice");
page = loginForm.getInputByName("login").click();
assertTrue(page.asText().contains("alice@tenant-a.org"));
}
}
@Test
public void testLogInTenantABearerToken() throws IOException {
RestAssured.given().auth().oauth2(getAccessToken()).when()
.get("/tenant-a/bearer").then().body(containsString("alice@tenant-a.org"));
}
private String getAccessToken() {
return keycloakClient.getRealmAccessToken("tenant-a", "alice", "alice", "multi-tenant-client", "secret");
}
private WebClient createWebClient() {
WebClient webClient = new WebClient();
webClient.setCssErrorHandler(new SilentCssErrorHandler());
return webClient;
}
}
および、ネイティブモードで以下を実行します。
package org.acme.quickstart.oidc;
import io.quarkus.test.junit.QuarkusIntegrationTest;
@QuarkusIntegrationTest
public class CodeFlowIT extends CodeFlowTest {
}
初期化および設定方法の詳細については、Dev Services for Keycloak を参照してください。
ブラウザの使用
テストするには、ブラウザを開いて以下のURLにアクセスする必要があります。
すべてが期待どおりに機能している場合は、認証のために Keycloak サーバーにリダイレクトする必要があります。リクエストされたパスは、設定ファイルにマップされていない default テナントを定義していることに注意してください。この場合、デフォルトの設定が使用されます。
アプリケーションを認証するためには、Keycloakのログインページで以下の認証情報を入力する必要があります。
-
Username: alice
-
Password: alice
Login ボタンをクリックすると、アプリケーションにリダイレクトされます。
次の URL でアプリケーションにアクセスを試みます。
Keycloak のログインページに再度リダイレクトされます。ただし、ここでは別の realm を使用して認証します。
どちらの場合も、ユーザーが正常に認証されると、ランディングページにユーザーの名前と電子メールが表示されます。ユーザー alice は両方のテナントに存在しますが、アプリケーションにおいて、それらは異なるレルム/テナントに属する別個のユーザーです。
アノテーション付きテナント識別子の解決
quarkus.oidc.TenantResolver を使用する代わりに、アノテーションと CDI インターセプターを使用してテナント識別子を解決できます。これは、現在の RoutingContext のキー OidcUtils.TENANT_ID_ATTRIBUTE の値を設定することで実行できます。
アプリケーションが 2 つの OIDC テナント (hr とデフォルト) をサポートしていると仮定した場合、最初にデフォルト以外のテナント ID ごとに 1 つのアノテーションを定義する必要があります。
|
Proactive HTTP authentication needs to be disabled ( |
@Inherited
@InterceptorBinding
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
public @interface HrTenant {
}
次に、これらのアノテーションごとに 1 つのインターセプターが必要になります。
@Interceptor
@HrTenant
public class HrTenantInterceptor {
@Inject
RoutingContext routingContext;
@AroundInvoke
Object setTenant(InvocationContext context) throws Exception {
routingContext.put(OidcUtils.TENANT_ID_ATTRIBUTE, "hr");
return context.proceed();
}
}
これで、 @HrTenant を運ぶすべてのメソッドとクラスは、 quarkus.oidc.hr.auth-server-url によって設定された OIDC プロバイダーを使用して認証されますが、他のすべてのクラスとメソッドは、デフォルトの OIDC プロバイダーを使用して認証されます。
テナントの設定をプログラムで解決
サポートしたいさまざまなテナントに対して、より動的な設定が必要で、設定ファイルに複数のエントリーを入れたくない場合は、 io.quarkus.oidc.TenantConfigResolver が利用出来ます。
このインターフェイスを使用すると、実行時にテナント設定を動的に作成することができます。
package io.quarkus.it.keycloak;
import javax.enterprise.context.ApplicationScoped;
import java.util.function.Supplier;
import io.smallrye.mutiny.Uni;
import io.quarkus.oidc.OidcTenantConfig;
import io.quarkus.oidc.TenantConfigResolver;
import io.vertx.ext.web.RoutingContext;
@ApplicationScoped
public class CustomTenantConfigResolver implements TenantConfigResolver {
@Override
public Uni<OidcTenantConfig> resolve(RoutingContext context, TenantConfigResolver.TenantConfigRequestContext requestContext) {
String path = context.request().path();
String[] parts = path.split("/");
if (parts.length == 0) {
// resolve to default tenant configuration
return null;
}
if ("tenant-c".equals(parts[1])) {
// Do 'return requestContext.runBlocking(createTenantConfig());'
// if a blocking call is required to create a tenant config
return Uni.createFromItem(createTenantConfig());
}
// resolve to default tenant configuration
return null;
}
private Supplier<OidcTenantConfig> createTenantConfig() {
final OidcTenantConfig config = new OidcTenantConfig();
config.setTenantId("tenant-c");
config.setAuthServerUrl("http://localhost:8180/realms/tenant-c");
config.setClientId("multi-tenant-client");
OidcTenantConfig.Credentials credentials = new OidcTenantConfig.Credentials();
credentials.setSecret("my-secret");
config.setCredentials(credentials);
// any other setting support by the quarkus-oidc extension
return () -> config;
}
}
このメソッドから返される OidcTenantConfig は、 application.properties から oidc 名前空間設定を解析するために使用されるものと同じです。 quarkus-oidc エクステンションでサポートされている任意の設定を使用してデータを入力できます。
OIDCの "web-app" アプリケーションのためのテナント解決
service と web-app の両方の OIDC アプリケーションの現在の HTTP リクエストを保護するために使用する必要があるテナント設定を選択する際には、次のようないくつかのオプションを使用できます。
-
URL パスを確認します。たとえば、"/service" パスには
tenant-service設定を使用する必要がありますが、 "/management" パスにはtenant-manage設定を使用する必要があります。 -
たとえば、URL パスが常に '/service' である HTTP ヘッダーを確認します。"Realm: service" や "Realm: management" などのヘッダーは、
tenant-service設定やtenant-manage設定のいずれかを選択する場合に役立ちます。 -
URL クエリーパラメーターを確認します。ヘッダーを使用してテナント設定を選択するのと同じように機能します
これらのオプションはすべて、OIDC service アプリケーションのカスタムの TenantResolver 実装や TenantConfigResolver 実装を使用して簡単に実装できます。
ただし、OIDC web-app アプリケーションのコード認証フローを完了するために HTTP リダイレクトが必要なため、次の理由により、このリダイレクトリクエストの前後に同じテナント設定を選択するためにカスタム HTTP Cookie が必要になる場合があります。
-
単一のリダイレクト URL が OIDC プロバイダーに登録されている場合、リダイレクトリクエスト後の URL パスは同じではない可能性があります。元のリクエストパスは復元できますが、それはテナント設定が解決された後です。
-
元のリクエスト中に使用された HTTP ヘッダーは、リダイレクト後に使用できなくなります。
-
カスタム URL クエリーパラメーターは、リダイレクト後、テナント設定が解決された後に復元されます。
リダイレクトの前後に web-app アプリケーションのテナント設定を解決するための情報を確実に利用できるようにするための 1 つのオプションは、Cookie を使用することです。以下はその例です。
package org.acme.quickstart.oidc;
import java.util.List;
import javax.enterprise.context.ApplicationScoped;
import io.quarkus.oidc.TenantResolver;
import io.vertx.core.http.Cookie;
import io.vertx.ext.web.RoutingContext;
@ApplicationScoped
public class CustomTenantResolver implements TenantResolver {
@Override
public String resolve(RoutingContext context) {
List<String> tenantIdQuery = context.queryParam("tenantId");
if (!tenantIdQuery.isEmpty()) {
String tenantId = tenantIdQuery.get(0);
context.addCookie(Cookie.cookie("tenant", tenantId));
return tenantId;
} else if (context.cookieMap().containsKey("tenant")) {
return context.getCookie("tenant").getValue();
}
return null;
}
}
テナント設定を無効にする
カスタムの TenantResolver および TenantConfigResolver の実装では、現在のリクエストからテナントを推測できず、デフォルトのテナント設定へのフォールバックが必要な場合は null を返すことがあります。
カスタムリゾルバが常にテナントを推論することが予想される場合、デフォルトのテナント設定は必要ありません。 quarkus.oidc.tenant-enabled=false の設定で無効にすることができます。
テナント固有の設定を無効にすることもできます。例: quarkus.oidc.tenant-a.tenant-enabled=false
設定リファレンス
ビルド時に固定される設定プロパティ - 他のすべての設定プロパティは実行時にオーバーライド可能
タイプ |
デフォルト |
|
|---|---|---|
If DevServices has been explicitly enabled or disabled. When DevServices is enabled Quarkus will attempt to automatically configure and start Keycloak when running in Dev or Test mode and when Docker is running. Environment variable: Show more |
boolean |
|
The container image name to use, for container based DevServices providers. Image with a Quarkus based distribution is used by default. Image with a WildFly based distribution can be selected instead, for example: 'quay.io/keycloak/keycloak:19.0.3-legacy'. Note Keycloak Quarkus and Keycloak WildFly images are initialized differently. By default, Dev Services for Keycloak will assume it is a Keycloak Quarkus image if the image version does not end with a '-legacy' string. Set 'quarkus.keycloak.devservices.keycloak-x-image' to override this check. Environment variable: Show more |
string |
|
If Keycloak-X image is used. By default, Dev Services for Keycloak will assume a Keycloak-X image is used if the image name contains a 'keycloak-x' string. Set 'quarkus.keycloak.devservices.keycloak-x-image' to override this check which may be necessary if you build custom Keycloak-X or Keycloak images. You do not need to set this property if the default check works. Environment variable: Show more |
boolean |
|
Indicates if the Keycloak container managed by Quarkus Dev Services is shared. When shared, Quarkus looks for running containers using label-based service discovery. If a matching container is found, it is used, and so a second one is not started. Otherwise, Dev Services for Keycloak starts a new container.
The discovery uses the Environment variable: Show more |
boolean |
|
The value of the Environment variable: Show more |
string |
|
The comma-separated list of class or file system paths to Keycloak realm files which will be used to initialize Keycloak. The first value in this list will be used to initialize default tenant connection properties. Environment variable: Show more |
文字列のリスト |
|
The JAVA_OPTS passed to the keycloak JVM Environment variable: Show more |
string |
|
Show Keycloak log messages with a "Keycloak:" prefix. Environment variable: Show more |
boolean |
|
Keycloak start command. Use this property to experiment with Keycloak start options, see Environment variable: Show more |
string |
|
The Keycloak realm name. This property will be used to create the realm if the realm file pointed to by the 'realm-path' property does not exist, default value is 'quarkus' in this case. If the realm file pointed to by the 'realm-path' property exists then it is still recommended to set this property for Dev Services for Keycloak to avoid parsing the realm file in order to determine the realm name. Environment variable: Show more |
string |
|
Indicates if the Keycloak realm has to be created when the realm file pointed to by the 'realm-path' property does not exist. Disable it if you’d like to create a realm using Keycloak Administration Console or Keycloak Admin API from Environment variable: Show more |
boolean |
|
Optional fixed port the dev service will listen to. If not defined, the port will be chosen randomly. Environment variable: Show more |
int |
|
The Keycloak users map containing the username and password pairs. If this map is empty then two users, 'alice' and 'bob' with the passwords matching their names will be created. This property will be used to create the Keycloak users if the realm file pointed to by the 'realm-path' property does not exist. Environment variable: Show more |
|
|
The Keycloak user roles. If this map is empty then a user named 'alice' will get 'admin' and 'user' roles and all other users will get a 'user' role. This property will be used to create the Keycloak roles if the realm file pointed to by the 'realm-path' property does not exist. Environment variable: Show more |
|
|
If the OIDC extension is enabled. Environment variable: Show more |
boolean |
|
Grant type which will be used to acquire a token to test the OIDC 'service' applications Environment variable: Show more |
|
|
The WebClient timeout. Use this property to configure how long an HTTP client used by Dev UI handlers will wait for a response when requesting tokens from OpenId Connect Provider and sending them to the service endpoint. Environment variable: Show more |
|
|
Enable the registration of the Default TokenIntrospection and UserInfo Cache implementation bean. Note it only allows to use the default implementation, one needs to configure it in order to activate it, please see Environment variable: Show more |
boolean |
|
The base URL of the OpenID Connect (OIDC) server, for example, Environment variable: Show more |
string |
|
Enables OIDC discovery. If the discovery is disabled then the OIDC endpoint URLs must be configured individually. Environment variable: Show more |
boolean |
|
Relative path or absolute URL of the OIDC token endpoint which issues access and refresh tokens. Environment variable: Show more |
string |
|
Relative path or absolute URL of the OIDC token revocation endpoint. Environment variable: Show more |
string |
|
The client-id of the application. Each application has a client-id that is used to identify the application Environment variable: Show more |
string |
|
The maximum amount of time connecting to the currently unavailable OIDC server will be attempted for. The number of times the connection request will be repeated is calculated by dividing the value of this property by 2. For example, setting it to Environment variable: Show more |
||
The number of times an attempt to re-establish an already available connection will be repeated for. Note this property is different to the Environment variable: Show more |
int |
|
The amount of time after which the current OIDC connection request will time out. Environment variable: Show more |
|
|
The maximum size of the connection pool used by the WebClient Environment variable: Show more |
int |
|
Client secret which is used for a Environment variable: Show more |
string |
|
The client secret value - it will be ignored if 'secret.key' is set Environment variable: Show more |
string |
|
The CredentialsProvider name which should only be set if more than one CredentialsProvider is registered Environment variable: Show more |
string |
|
The CredentialsProvider client secret key Environment variable: Show more |
string |
|
Authentication method. Environment variable: Show more |
|
|
If provided, indicates that JWT is signed using a secret key Environment variable: Show more |
string |
|
The CredentialsProvider name which should only be set if more than one CredentialsProvider is registered Environment variable: Show more |
string |
|
The CredentialsProvider client secret key Environment variable: Show more |
string |
|
If provided, indicates that JWT is signed using a private key in PEM or JWK format. You can use the Environment variable: Show more |
string |
|
If provided, indicates that JWT is signed using a private key from a key store Environment variable: Show more |
string |
|
A parameter to specify the password of the key store file. If not given, the default ("password") is used. Environment variable: Show more |
string |
|
The private key id/alias Environment variable: Show more |
string |
|
The private key password Environment variable: Show more |
string |
|
JWT audience ('aud') claim value. By default, the audience is set to the address of the OpenId Connect Provider’s token endpoint. Environment variable: Show more |
string |
|
Key identifier of the signing key added as a JWT 'kid' header Environment variable: Show more |
string |
|
Issuer of the signing key added as a JWT 'iss' claim (default: client id) Environment variable: Show more |
string |
|
Subject of the signing key added as a JWT 'sub' claim (default: client id) Environment variable: Show more |
string |
|
Signature algorithm, also used for the Environment variable: Show more |
string |
|
JWT life-span in seconds. It will be added to the time it was issued at to calculate the expiration time. Environment variable: Show more |
int |
|
The host (name or IP address) of the Proxy. Note: If OIDC adapter needs to use a Proxy to talk with OIDC server (Provider), then at least the "host" config item must be configured to enable the usage of a Proxy. Environment variable: Show more |
string |
|
The port number of the Proxy. Default value is 80. Environment variable: Show more |
int |
|
The username, if Proxy needs authentication. Environment variable: Show more |
string |
|
The password, if Proxy needs authentication. Environment variable: Show more |
string |
|
Certificate validation and hostname verification, which can be one of the following values from enum Environment variable: Show more |
|
|
An optional key store which holds the certificate information instead of specifying separate files. Environment variable: Show more |
path |
|
An optional parameter to specify type of the key store file. If not given, the type is automatically detected based on the file name. Environment variable: Show more |
string |
|
An optional parameter to specify a provider of the key store file. If not given, the provider is automatically detected based on the key store file type. Environment variable: Show more |
string |
|
A parameter to specify the password of the key store file. If not given, the default ("password") is used. Environment variable: Show more |
string |
|
An optional parameter to select a specific key in the key store. When SNI is disabled, if the key store contains multiple keys and no alias is specified, the behavior is undefined. Environment variable: Show more |
string |
|
An optional parameter to define the password for the key, in case it’s different from Environment variable: Show more |
string |
|
An optional trust store which holds the certificate information of the certificates to trust Environment variable: Show more |
path |
|
A parameter to specify the password of the trust store file. Environment variable: Show more |
string |
|
A parameter to specify the alias of the trust store certificate. Environment variable: Show more |
string |
|
An optional parameter to specify type of the trust store file. If not given, the type is automatically detected based on the file name. Environment variable: Show more |
string |
|
An optional parameter to specify a provider of the trust store file. If not given, the provider is automatically detected based on the trust store file type. Environment variable: Show more |
string |
|
A unique tenant identifier. It must be set by Environment variable: Show more |
string |
|
If this tenant configuration is enabled. Environment variable: Show more |
boolean |
|
The application type, which can be one of the following values from enum Environment variable: Show more |
|
|
Relative path or absolute URL of the OIDC authorization endpoint which authenticates the users. This property must be set for the 'web-app' applications if OIDC discovery is disabled. This property will be ignored if the discovery is enabled. Environment variable: Show more |
string |
|
Relative path or absolute URL of the OIDC userinfo endpoint. This property must only be set for the 'web-app' applications if OIDC discovery is disabled and 'authentication.user-info-required' property is enabled. This property will be ignored if the discovery is enabled. Environment variable: Show more |
string |
|
Relative path or absolute URL of the OIDC RFC7662 introspection endpoint which can introspect both opaque and JWT tokens. This property must be set if OIDC discovery is disabled and 1) the opaque bearer access tokens have to be verified or 2) JWT tokens have to be verified while the cached JWK verification set with no matching JWK is being refreshed. This property will be ignored if the discovery is enabled. Environment variable: Show more |
string |
|
Relative path or absolute URL of the OIDC JWKS endpoint which returns a JSON Web Key Verification Set. This property should be set if OIDC discovery is disabled and the local JWT verification is required. This property will be ignored if the discovery is enabled. Environment variable: Show more |
string |
|
Relative path or absolute URL of the OIDC end_session_endpoint. This property must be set if OIDC discovery is disabled and RP Initiated Logout support for the 'web-app' applications is required. This property will be ignored if the discovery is enabled. Environment variable: Show more |
string |
|
Public key for the local JWT token verification. OIDC server connection will not be created when this property is set. Environment variable: Show more |
string |
|
Name Environment variable: Show more |
string |
|
Secret Environment variable: Show more |
string |
|
Include OpenId Connect Client ID configured with 'quarkus.oidc.client-id' Environment variable: Show more |
boolean |
|
List of paths to claims containing an array of groups. Each path starts from the top level JWT JSON object and can contain multiple segments where each segment represents a JSON object name only, example: "realm/groups". Use double quotes with the namespace qualified claim names. This property can be used if a token has no 'groups' claim but has the groups set in one or more different claims. Environment variable: Show more |
文字列のリスト |
|
Separator for splitting a string which may contain multiple group values. It will only be used if the "role-claim-path" property points to one or more custom claims whose values are strings. A single space will be used by default because the standard 'scope' claim may contain a space separated sequence. Environment variable: Show more |
string |
|
Source of the principal roles. Environment variable: Show more |
|
|
Expected issuer 'iss' claim value. Note this property overrides the Environment variable: Show more |
string |
|
Expected audience 'aud' claim value which may be a string or an array of strings. Environment variable: Show more |
文字列のリスト |
|
Expected token type Environment variable: Show more |
string |
|
Life span grace period in seconds. When checking token expiry, current time is allowed to be later than token expiration time by at most the configured number of seconds. When checking token issuance, current time is allowed to be sooner than token issue time by at most the configured number of seconds. Environment variable: Show more |
int |
|
Token age. It allows for the number of seconds to be specified that must not elapse since the Environment variable: Show more |
||
Name of the claim which contains a principal name. By default, the 'upn', 'preferred_username' and Environment variable: Show more |
string |
|
Refresh expired authorization code flow ID or access tokens. If this property is enabled then a refresh token request will be performed if the authorization code ID or access token has expired and, if successful, the local session will be updated with the new set of tokens. Otherwise, the local session will be invalidated and the user redirected to the OpenID Provider to re-authenticate. In this case the user may not be challenged again if the OIDC provider session is still active. For this option be effective the Environment variable: Show more |
boolean |
|
Refresh token time skew in seconds. If this property is enabled then the configured number of seconds is added to the current time when checking if the authorization code ID or access token should be refreshed. If the sum is greater than the authorization code ID or access token’s expiration time then a refresh is going to happen. This property will be ignored if the 'refresh-expired' property is not enabled. Environment variable: Show more |
||
Forced JWK set refresh interval in minutes. Environment variable: Show more |
|
|
Custom HTTP header that contains a bearer token. This option is valid only when the application is of type Environment variable: Show more |
string |
|
Decryption key location. JWT tokens can be inner-signed and encrypted by OpenId Connect providers. However, it is not always possible to remotely introspect such tokens because the providers may not control the private decryption keys. In such cases set this property to point to the file containing the decryption private key in PEM or JSON Web Key (JWK) format. Note that if a 'private_key_jwt' client authentication method is used then the private key which is used to sign client authentication JWT tokens will be used to try to decrypt an encrypted ID token if this property is not set. Environment variable: Show more |
string |
|
Allow the remote introspection of JWT tokens when no matching JWK key is available. Note this property is set to 'true' by default for backward-compatibility reasons and will be set to Environment variable: Show more |
boolean |
|
Require that JWT tokens are only introspected remotely. Environment variable: Show more |
boolean |
|
Allow the remote introspection of the opaque tokens. Set this property to 'false' if only JWT tokens are expected. Environment variable: Show more |
boolean |
|
Indirectly verify that the opaque (binary) access token is valid by using it to request UserInfo. Opaque access token is considered valid if the provider accepted this token and returned a valid UserInfo. You should only enable this option if the opaque access tokens have to be accepted but OpenId Connect provider does not have a token introspection endpoint. This property will have no effect when JWT tokens have to be verified. Environment variable: Show more |
boolean |
|
The relative path of the logout endpoint at the application. If provided, the application is able to initiate the logout through this endpoint in conformance with the OpenID Connect RP-Initiated Logout specification. Environment variable: Show more |
string |
|
Relative path of the application endpoint where the user should be redirected to after logging out from the OpenID Connect Provider. This endpoint URI must be properly registered at the OpenID Connect Provider as a valid redirect URI. Environment variable: Show more |
string |
|
Name of the post logout URI parameter which will be added as a query parameter to the logout redirect URI. Environment variable: Show more |
string |
|
The relative path of the Back-Channel Logout endpoint at the application. Environment variable: Show more |
string |
|
The relative path of the Front-Channel Logout endpoint at the application. Environment variable: Show more |
string |
|
Authorization code flow response mode Environment variable: Show more |
|
|
Relative path for calculating a "redirect_uri" query parameter. It has to start from a forward slash and will be appended to the request URI’s host and port. For example, if the current request URI is 'https://localhost:8080/service' then a 'redirect_uri' parameter will be set to 'https://localhost:8080/' if this property is set to '/' and be the same as the request URI if this property has not been configured. Note the original request URI will be restored after the user has authenticated if 'restorePathAfterRedirect' is set to 'true'. Environment variable: Show more |
string |
|
If this property is set to 'true' then the original request URI which was used before the authentication will be restored after the user has been redirected back to the application. Note if Environment variable: Show more |
boolean |
|
Remove the query parameters such as 'code' and 'state' set by the OIDC server on the redirect URI after the user has authenticated by redirecting a user to the same URI but without the query parameters. Environment variable: Show more |
boolean |
|
Relative path to the public endpoint which will process the error response from the OIDC authorization endpoint. If the user authentication has failed then the OIDC provider will return an 'error' and an optional 'error_description' parameters, instead of the expected authorization 'code'. If this property is set then the user will be redirected to the endpoint which can return a user-friendly error description page. It has to start from a forward slash and will be appended to the request URI’s host and port. For example, if it is set as '/error' and the current request URI is 'https://localhost:8080/callback?error=invalid_scope' then a redirect will be made to 'https://localhost:8080/error?error=invalid_scope'. If this property is not set then HTTP 401 status will be returned in case of the user authentication failure. Environment variable: Show more |
string |
|
Both ID and access tokens are fetched from the OIDC provider as part of the authorization code flow. ID token is always verified on every user request as the primary token which is used to represent the principal and extract the roles. Access token is not verified by default since it is meant to be propagated to the downstream services. The verification of the access token should be enabled if it is injected as a JWT token. Access tokens obtained as part of the code flow will always be verified if Environment variable: Show more |
boolean |
|
Force 'https' as the 'redirect_uri' parameter scheme when running behind an SSL terminating reverse proxy. This property, if enabled, will also affect the logout Environment variable: Show more |
boolean |
|
List of scopes Environment variable: Show more |
文字列のリスト |
|
Add the 'openid' scope automatically to the list of scopes. This is required for OpenId Connect providers but will not work for OAuth2 providers such as Twitter OAuth2 which does not accept that scope and throws an error. Environment variable: Show more |
boolean |
|
Request URL query parameters which, if present, will be added to the authentication redirect URI. Environment variable: Show more |
文字列のリスト |
|
If enabled the state, session and post logout cookies will have their 'secure' parameter set to 'true' when HTTP is used. It may be necessary when running behind an SSL terminating reverse proxy. The cookies will always be secure if HTTPS is used even if this property is set to false. Environment variable: Show more |
boolean |
|
Cookie name suffix. For example, a session cookie name for the default OIDC tenant is 'q_session' but can be changed to 'q_session_test' if this property is set to 'test'. Environment variable: Show more |
string |
|
Cookie path parameter value which, if set, will be used to set a path parameter for the session, state and post logout cookies. The Environment variable: Show more |
string |
|
Cookie path header parameter value which, if set, identifies the incoming HTTP header whose value will be used to set a path parameter for the session, state and post logout cookies. If the header is missing then the Environment variable: Show more |
string |
|
Cookie domain parameter value which, if set, will be used for the session, state and post logout cookies. Environment variable: Show more |
string |
|
SameSite attribute for the session cookie. Environment variable: Show more |
|
|
If this property is set to 'true' then an OIDC UserInfo endpoint will be called. Environment variable: Show more |
boolean |
|
Session age extension in minutes. The user session age property is set to the value of the ID token life-span by default and the user will be redirected to the OIDC provider to re-authenticate once the session has expired. If this property is set to a non-zero value then the expired ID token can be refreshed before the session has expired. This property will be ignored if the Environment variable: Show more |
|
|
If this property is set to 'true' then a normal 302 redirect response will be returned if the request was initiated via JavaScript API such as XMLHttpRequest or Fetch and the current user needs to be (re)authenticated which may not be desirable for Single Page Applications since it automatically following the redirect may not work given that OIDC authorization endpoints typically do not support CORS. If this property is set to Environment variable: Show more |
boolean |
|
Requires that ID token is available when the authorization code flow completes. Disable this property only when you need to use the authorization code flow with OAuth2 providers which do not return ID token - an internal IdToken will be generated in such cases. Environment variable: Show more |
boolean |
|
Internal ID token lifespan. This property is only checked when an internal IdToken is generated when Oauth2 providers do not return IdToken. Environment variable: Show more |
|
|
Requires that a Proof Key for Code Exchange (PKCE) is used. Environment variable: Show more |
boolean |
|
Secret which will be used to encrypt a Proof Key for Code Exchange (PKCE) code verifier in the code flow state. This secret must be set if PKCE is required but no client secret is set. The length of the secret which will be used to encrypt the code verifier must be 32 characters long. Environment variable: Show more |
string |
|
Default TokenStateManager strategy. Environment variable: Show more |
|
|
Default TokenStateManager keeps all tokens (ID, access and refresh) returned in the authorization code grant response in a single session cookie by default. Enable this property to minimize a session cookie size Environment variable: Show more |
boolean |
|
Requires that the tokens are encrypted before being stored in the cookies. Environment variable: Show more |
boolean |
|
Secret which will be used to encrypt the tokens. This secret must be set if the token encryption is required but no client secret is set. The length of the secret which will be used to encrypt the tokens must be 32 characters long. Environment variable: Show more |
string |
|
Allow caching the token introspection data. Note enabling this property does not enable the cache itself but only permits to cache the token introspection for a given tenant. If the default token cache can be used then please see Environment variable: Show more |
boolean |
|
Allow caching the user info data. Note enabling this property does not enable the cache itself but only permits to cache the user info data for a given tenant. If the default token cache can be used then please see Environment variable: Show more |
boolean |
|
Allow inlining UserInfo in IdToken instead of caching it in the token cache. This property is only checked when an internal IdToken is generated when Oauth2 providers do not return IdToken. Inlining UserInfo in the generated IdToken allows to store it in the session cookie and avoids introducing a cached state. Environment variable: Show more |
boolean |
|
Well known OpenId Connect provider identifier Environment variable: Show more |
|
|
Maximum number of cache entries. Set it to a positive value if the cache has to be enabled. Environment variable: Show more |
int |
|
Maximum amount of time a given cache entry is valid for. Environment variable: Show more |
|
|
Clean up timer interval. If this property is set then a timer will check and remove the stale entries periodically. Environment variable: Show more |
||
Grant options Environment variable: Show more |
|
|
A map of required claims and their expected values. For example, Environment variable: Show more |
|
|
Additional properties which will be added as the query parameters to the logout redirect URI. Environment variable: Show more |
|
|
Additional properties which will be added as the query parameters to the authentication redirect URI. Environment variable: Show more |
|
|
Additional parameters, in addition to the required Environment variable: Show more |
|
|
Custom HTTP headers which have to be sent to complete the authorization code grant request. Environment variable: Show more |
|
|
タイプ |
デフォルト |
|
The base URL of the OpenID Connect (OIDC) server, for example, Environment variable: Show more |
string |
|
Enables OIDC discovery. If the discovery is disabled then the OIDC endpoint URLs must be configured individually. Environment variable: Show more |
boolean |
|
Relative path or absolute URL of the OIDC token endpoint which issues access and refresh tokens. Environment variable: Show more |
string |
|
Relative path or absolute URL of the OIDC token revocation endpoint. Environment variable: Show more |
string |
|
The client-id of the application. Each application has a client-id that is used to identify the application Environment variable: Show more |
string |
|
The maximum amount of time connecting to the currently unavailable OIDC server will be attempted for. The number of times the connection request will be repeated is calculated by dividing the value of this property by 2. For example, setting it to Environment variable: Show more |
||
The number of times an attempt to re-establish an already available connection will be repeated for. Note this property is different to the Environment variable: Show more |
int |
|
The amount of time after which the current OIDC connection request will time out. Environment variable: Show more |
|
|
The maximum size of the connection pool used by the WebClient Environment variable: Show more |
int |
|
Client secret which is used for a Environment variable: Show more |
string |
|
The client secret value - it will be ignored if 'secret.key' is set Environment variable: Show more |
string |
|
The CredentialsProvider name which should only be set if more than one CredentialsProvider is registered Environment variable: Show more |
string |
|
The CredentialsProvider client secret key Environment variable: Show more |
string |
|
Authentication method. Environment variable: Show more |
|
|
If provided, indicates that JWT is signed using a secret key Environment variable: Show more |
string |
|
The CredentialsProvider name which should only be set if more than one CredentialsProvider is registered Environment variable: Show more |
string |
|
The CredentialsProvider client secret key Environment variable: Show more |
string |
|
If provided, indicates that JWT is signed using a private key in PEM or JWK format. You can use the Environment variable: Show more |
string |
|
If provided, indicates that JWT is signed using a private key from a key store Environment variable: Show more |
string |
|
A parameter to specify the password of the key store file. If not given, the default ("password") is used. Environment variable: Show more |
string |
|
The private key id/alias Environment variable: Show more |
string |
|
The private key password Environment variable: Show more |
string |
|
JWT audience ('aud') claim value. By default, the audience is set to the address of the OpenId Connect Provider’s token endpoint. Environment variable: Show more |
string |
|
Key identifier of the signing key added as a JWT 'kid' header Environment variable: Show more |
string |
|
Issuer of the signing key added as a JWT 'iss' claim (default: client id) Environment variable: Show more |
string |
|
Subject of the signing key added as a JWT 'sub' claim (default: client id) Environment variable: Show more |
string |
|
Signature algorithm, also used for the Environment variable: Show more |
string |
|
JWT life-span in seconds. It will be added to the time it was issued at to calculate the expiration time. Environment variable: Show more |
int |
|
The host (name or IP address) of the Proxy. Note: If OIDC adapter needs to use a Proxy to talk with OIDC server (Provider), then at least the "host" config item must be configured to enable the usage of a Proxy. Environment variable: Show more |
string |
|
The port number of the Proxy. Default value is 80. Environment variable: Show more |
int |
|
The username, if Proxy needs authentication. Environment variable: Show more |
string |
|
The password, if Proxy needs authentication. Environment variable: Show more |
string |
|
Certificate validation and hostname verification, which can be one of the following values from enum Environment variable: Show more |
|
|
An optional key store which holds the certificate information instead of specifying separate files. Environment variable: Show more |
path |
|
An optional parameter to specify type of the key store file. If not given, the type is automatically detected based on the file name. Environment variable: Show more |
string |
|
An optional parameter to specify a provider of the key store file. If not given, the provider is automatically detected based on the key store file type. Environment variable: Show more |
string |
|
A parameter to specify the password of the key store file. If not given, the default ("password") is used. Environment variable: Show more |
string |
|
An optional parameter to select a specific key in the key store. When SNI is disabled, if the key store contains multiple keys and no alias is specified, the behavior is undefined. Environment variable: Show more |
string |
|
An optional parameter to define the password for the key, in case it’s different from Environment variable: Show more |
string |
|
An optional trust store which holds the certificate information of the certificates to trust Environment variable: Show more |
path |
|
A parameter to specify the password of the trust store file. Environment variable: Show more |
string |
|
A parameter to specify the alias of the trust store certificate. Environment variable: Show more |
string |
|
An optional parameter to specify type of the trust store file. If not given, the type is automatically detected based on the file name. Environment variable: Show more |
string |
|
An optional parameter to specify a provider of the trust store file. If not given, the provider is automatically detected based on the trust store file type. Environment variable: Show more |
string |
|
A unique tenant identifier. It must be set by Environment variable: Show more |
string |
|
If this tenant configuration is enabled. Environment variable: Show more |
boolean |
|
The application type, which can be one of the following values from enum Environment variable: Show more |
|
|
Relative path or absolute URL of the OIDC authorization endpoint which authenticates the users. This property must be set for the 'web-app' applications if OIDC discovery is disabled. This property will be ignored if the discovery is enabled. Environment variable: Show more |
string |
|
Relative path or absolute URL of the OIDC userinfo endpoint. This property must only be set for the 'web-app' applications if OIDC discovery is disabled and 'authentication.user-info-required' property is enabled. This property will be ignored if the discovery is enabled. Environment variable: Show more |
string |
|
Relative path or absolute URL of the OIDC RFC7662 introspection endpoint which can introspect both opaque and JWT tokens. This property must be set if OIDC discovery is disabled and 1) the opaque bearer access tokens have to be verified or 2) JWT tokens have to be verified while the cached JWK verification set with no matching JWK is being refreshed. This property will be ignored if the discovery is enabled. Environment variable: Show more |
string |
|
Relative path or absolute URL of the OIDC JWKS endpoint which returns a JSON Web Key Verification Set. This property should be set if OIDC discovery is disabled and the local JWT verification is required. This property will be ignored if the discovery is enabled. Environment variable: Show more |
string |
|
Relative path or absolute URL of the OIDC end_session_endpoint. This property must be set if OIDC discovery is disabled and RP Initiated Logout support for the 'web-app' applications is required. This property will be ignored if the discovery is enabled. Environment variable: Show more |
string |
|
Public key for the local JWT token verification. OIDC server connection will not be created when this property is set. Environment variable: Show more |
string |
|
Name Environment variable: Show more |
string |
|
Secret Environment variable: Show more |
string |
|
Include OpenId Connect Client ID configured with 'quarkus.oidc.client-id' Environment variable: Show more |
boolean |
|
List of paths to claims containing an array of groups. Each path starts from the top level JWT JSON object and can contain multiple segments where each segment represents a JSON object name only, example: "realm/groups". Use double quotes with the namespace qualified claim names. This property can be used if a token has no 'groups' claim but has the groups set in one or more different claims. Environment variable: Show more |
文字列のリスト |
|
Separator for splitting a string which may contain multiple group values. It will only be used if the "role-claim-path" property points to one or more custom claims whose values are strings. A single space will be used by default because the standard 'scope' claim may contain a space separated sequence. Environment variable: Show more |
string |
|
Source of the principal roles. Environment variable: Show more |
|
|
Expected issuer 'iss' claim value. Note this property overrides the Environment variable: Show more |
string |
|
Expected audience 'aud' claim value which may be a string or an array of strings. Environment variable: Show more |
文字列のリスト |
|
A map of required claims and their expected values. For example, Environment variable: Show more |
|
|
Expected token type Environment variable: Show more |
string |
|
Life span grace period in seconds. When checking token expiry, current time is allowed to be later than token expiration time by at most the configured number of seconds. When checking token issuance, current time is allowed to be sooner than token issue time by at most the configured number of seconds. Environment variable: Show more |
int |
|
Token age. It allows for the number of seconds to be specified that must not elapse since the Environment variable: Show more |
||
Name of the claim which contains a principal name. By default, the 'upn', 'preferred_username' and Environment variable: Show more |
string |
|
Refresh expired authorization code flow ID or access tokens. If this property is enabled then a refresh token request will be performed if the authorization code ID or access token has expired and, if successful, the local session will be updated with the new set of tokens. Otherwise, the local session will be invalidated and the user redirected to the OpenID Provider to re-authenticate. In this case the user may not be challenged again if the OIDC provider session is still active. For this option be effective the Environment variable: Show more |
boolean |
|
Refresh token time skew in seconds. If this property is enabled then the configured number of seconds is added to the current time when checking if the authorization code ID or access token should be refreshed. If the sum is greater than the authorization code ID or access token’s expiration time then a refresh is going to happen. This property will be ignored if the 'refresh-expired' property is not enabled. Environment variable: Show more |
||
Forced JWK set refresh interval in minutes. Environment variable: Show more |
|
|
Custom HTTP header that contains a bearer token. This option is valid only when the application is of type Environment variable: Show more |
string |
|
Decryption key location. JWT tokens can be inner-signed and encrypted by OpenId Connect providers. However, it is not always possible to remotely introspect such tokens because the providers may not control the private decryption keys. In such cases set this property to point to the file containing the decryption private key in PEM or JSON Web Key (JWK) format. Note that if a 'private_key_jwt' client authentication method is used then the private key which is used to sign client authentication JWT tokens will be used to try to decrypt an encrypted ID token if this property is not set. Environment variable: Show more |
string |
|
Allow the remote introspection of JWT tokens when no matching JWK key is available. Note this property is set to 'true' by default for backward-compatibility reasons and will be set to Environment variable: Show more |
boolean |
|
Require that JWT tokens are only introspected remotely. Environment variable: Show more |
boolean |
|
Allow the remote introspection of the opaque tokens. Set this property to 'false' if only JWT tokens are expected. Environment variable: Show more |
boolean |
|
Indirectly verify that the opaque (binary) access token is valid by using it to request UserInfo. Opaque access token is considered valid if the provider accepted this token and returned a valid UserInfo. You should only enable this option if the opaque access tokens have to be accepted but OpenId Connect provider does not have a token introspection endpoint. This property will have no effect when JWT tokens have to be verified. Environment variable: Show more |
boolean |
|
The relative path of the logout endpoint at the application. If provided, the application is able to initiate the logout through this endpoint in conformance with the OpenID Connect RP-Initiated Logout specification. Environment variable: Show more |
string |
|
Relative path of the application endpoint where the user should be redirected to after logging out from the OpenID Connect Provider. This endpoint URI must be properly registered at the OpenID Connect Provider as a valid redirect URI. Environment variable: Show more |
string |
|
Name of the post logout URI parameter which will be added as a query parameter to the logout redirect URI. Environment variable: Show more |
string |
|
Additional properties which will be added as the query parameters to the logout redirect URI. Environment variable: Show more |
|
|
The relative path of the Back-Channel Logout endpoint at the application. Environment variable: Show more |
string |
|
The relative path of the Front-Channel Logout endpoint at the application. Environment variable: Show more |
string |
|
Authorization code flow response mode Environment variable: Show more |
|
|
Relative path for calculating a "redirect_uri" query parameter. It has to start from a forward slash and will be appended to the request URI’s host and port. For example, if the current request URI is 'https://localhost:8080/service' then a 'redirect_uri' parameter will be set to 'https://localhost:8080/' if this property is set to '/' and be the same as the request URI if this property has not been configured. Note the original request URI will be restored after the user has authenticated if 'restorePathAfterRedirect' is set to 'true'. Environment variable: Show more |
string |
|
If this property is set to 'true' then the original request URI which was used before the authentication will be restored after the user has been redirected back to the application. Note if Environment variable: Show more |
boolean |
|
Remove the query parameters such as 'code' and 'state' set by the OIDC server on the redirect URI after the user has authenticated by redirecting a user to the same URI but without the query parameters. Environment variable: Show more |
boolean |
|
Relative path to the public endpoint which will process the error response from the OIDC authorization endpoint. If the user authentication has failed then the OIDC provider will return an 'error' and an optional 'error_description' parameters, instead of the expected authorization 'code'. If this property is set then the user will be redirected to the endpoint which can return a user-friendly error description page. It has to start from a forward slash and will be appended to the request URI’s host and port. For example, if it is set as '/error' and the current request URI is 'https://localhost:8080/callback?error=invalid_scope' then a redirect will be made to 'https://localhost:8080/error?error=invalid_scope'. If this property is not set then HTTP 401 status will be returned in case of the user authentication failure. Environment variable: Show more |
string |
|
Both ID and access tokens are fetched from the OIDC provider as part of the authorization code flow. ID token is always verified on every user request as the primary token which is used to represent the principal and extract the roles. Access token is not verified by default since it is meant to be propagated to the downstream services. The verification of the access token should be enabled if it is injected as a JWT token. Access tokens obtained as part of the code flow will always be verified if Environment variable: Show more |
boolean |
|
Force 'https' as the 'redirect_uri' parameter scheme when running behind an SSL terminating reverse proxy. This property, if enabled, will also affect the logout Environment variable: Show more |
boolean |
|
List of scopes Environment variable: Show more |
文字列のリスト |
|
Add the 'openid' scope automatically to the list of scopes. This is required for OpenId Connect providers but will not work for OAuth2 providers such as Twitter OAuth2 which does not accept that scope and throws an error. Environment variable: Show more |
boolean |
|
Additional properties which will be added as the query parameters to the authentication redirect URI. Environment variable: Show more |
|
|
Request URL query parameters which, if present, will be added to the authentication redirect URI. Environment variable: Show more |
文字列のリスト |
|
If enabled the state, session and post logout cookies will have their 'secure' parameter set to 'true' when HTTP is used. It may be necessary when running behind an SSL terminating reverse proxy. The cookies will always be secure if HTTPS is used even if this property is set to false. Environment variable: Show more |
boolean |
|
Cookie name suffix. For example, a session cookie name for the default OIDC tenant is 'q_session' but can be changed to 'q_session_test' if this property is set to 'test'. Environment variable: Show more |
string |
|
Cookie path parameter value which, if set, will be used to set a path parameter for the session, state and post logout cookies. The Environment variable: Show more |
string |
|
Cookie path header parameter value which, if set, identifies the incoming HTTP header whose value will be used to set a path parameter for the session, state and post logout cookies. If the header is missing then the Environment variable: Show more |
string |
|
Cookie domain parameter value which, if set, will be used for the session, state and post logout cookies. Environment variable: Show more |
string |
|
SameSite attribute for the session cookie. Environment variable: Show more |
|
|
If this property is set to 'true' then an OIDC UserInfo endpoint will be called. Environment variable: Show more |
boolean |
|
Session age extension in minutes. The user session age property is set to the value of the ID token life-span by default and the user will be redirected to the OIDC provider to re-authenticate once the session has expired. If this property is set to a non-zero value then the expired ID token can be refreshed before the session has expired. This property will be ignored if the Environment variable: Show more |
|
|
If this property is set to 'true' then a normal 302 redirect response will be returned if the request was initiated via JavaScript API such as XMLHttpRequest or Fetch and the current user needs to be (re)authenticated which may not be desirable for Single Page Applications since it automatically following the redirect may not work given that OIDC authorization endpoints typically do not support CORS. If this property is set to Environment variable: Show more |
boolean |
|
Requires that ID token is available when the authorization code flow completes. Disable this property only when you need to use the authorization code flow with OAuth2 providers which do not return ID token - an internal IdToken will be generated in such cases. Environment variable: Show more |
boolean |
|
Internal ID token lifespan. This property is only checked when an internal IdToken is generated when Oauth2 providers do not return IdToken. Environment variable: Show more |
|
|
Requires that a Proof Key for Code Exchange (PKCE) is used. Environment variable: Show more |
boolean |
|
Secret which will be used to encrypt a Proof Key for Code Exchange (PKCE) code verifier in the code flow state. This secret must be set if PKCE is required but no client secret is set. The length of the secret which will be used to encrypt the code verifier must be 32 characters long. Environment variable: Show more |
string |
|
Additional parameters, in addition to the required Environment variable: Show more |
|
|
Custom HTTP headers which have to be sent to complete the authorization code grant request. Environment variable: Show more |
|
|
Default TokenStateManager strategy. Environment variable: Show more |
|
|
Default TokenStateManager keeps all tokens (ID, access and refresh) returned in the authorization code grant response in a single session cookie by default. Enable this property to minimize a session cookie size Environment variable: Show more |
boolean |
|
Requires that the tokens are encrypted before being stored in the cookies. Environment variable: Show more |
boolean |
|
Secret which will be used to encrypt the tokens. This secret must be set if the token encryption is required but no client secret is set. The length of the secret which will be used to encrypt the tokens must be 32 characters long. Environment variable: Show more |
string |
|
Allow caching the token introspection data. Note enabling this property does not enable the cache itself but only permits to cache the token introspection for a given tenant. If the default token cache can be used then please see Environment variable: Show more |
boolean |
|
Allow caching the user info data. Note enabling this property does not enable the cache itself but only permits to cache the user info data for a given tenant. If the default token cache can be used then please see Environment variable: Show more |
boolean |
|
Allow inlining UserInfo in IdToken instead of caching it in the token cache. This property is only checked when an internal IdToken is generated when Oauth2 providers do not return IdToken. Inlining UserInfo in the generated IdToken allows to store it in the session cookie and avoids introducing a cached state. Environment variable: Show more |
boolean |
|
Well known OpenId Connect provider identifier Environment variable: Show more |
|
|
期間フォーマットについて
期間のフォーマットは標準の 数値で始まる期間の値を指定することもできます。この場合、値が数値のみで構成されている場合、コンバーターは値を秒として扱います。そうでない場合は、 |