From da1238fe75f112092dbfb6cb2da32fda8f5603a9 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 --- .../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 52667fd8878d90..ec9bd2f7adec5c 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; @@ -536,6 +538,7 @@ void gatherSecurityChecks(BuildProducer syntheticBeans, }).done()); } + @Consume(RuntimeConfigSetupCompleteBuildItem.class) @BuildStep @Record(ExecutionTime.RUNTIME_INIT) public void resolveConfigExpressionRoles(Optional configExpRolesChecks,