From 703be265d446029aadf06f6d201734ea64d46cf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Vav=C5=99=C3=ADk?= Date: Tue, 14 Feb 2023 09:50:25 +0100 Subject: [PATCH] Resolve roles allowed configuration expression after config setup fixes: #30988 (cherry picked from commit 3c19ad3de0b092e78ee238e449629f43e8f3951e) --- .../java/io/quarkus/security/deployment/SecurityProcessor.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extensions/security/deployment/src/main/java/io/quarkus/security/deployment/SecurityProcessor.java b/extensions/security/deployment/src/main/java/io/quarkus/security/deployment/SecurityProcessor.java index 1b8d98a392ae0..1e5caf7772d78 100644 --- a/extensions/security/deployment/src/main/java/io/quarkus/security/deployment/SecurityProcessor.java +++ b/extensions/security/deployment/src/main/java/io/quarkus/security/deployment/SecurityProcessor.java @@ -46,6 +46,7 @@ import io.quarkus.deployment.Feature; import io.quarkus.deployment.annotations.BuildProducer; import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.annotations.Consume; import io.quarkus.deployment.annotations.ExecutionTime; import io.quarkus.deployment.annotations.Record; import io.quarkus.deployment.builditem.ApplicationClassPredicateBuildItem; @@ -54,6 +55,7 @@ import io.quarkus.deployment.builditem.LaunchModeBuildItem; import io.quarkus.deployment.builditem.NativeImageFeatureBuildItem; import io.quarkus.deployment.builditem.RunTimeConfigBuilderBuildItem; +import io.quarkus.deployment.builditem.RuntimeConfigSetupCompleteBuildItem; import io.quarkus.deployment.builditem.nativeimage.JPMSExportBuildItem; import io.quarkus.deployment.builditem.nativeimage.NativeImageSecurityProviderBuildItem; import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; @@ -528,6 +530,7 @@ void gatherSecurityChecks(BuildProducer syntheticBeans, }).done()); } + @Consume(RuntimeConfigSetupCompleteBuildItem.class) @BuildStep @Record(ExecutionTime.RUNTIME_INIT) public void resolveConfigExpressionRoles(Optional configExpRolesChecks,