-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate that the injected config class has to be the entry point of the @ConfigMapping #39431
Comments
cc @radcortez |
I'll have a look. |
Thanks. I hope I didn't overlook something in my changes, but it was really weird. |
I had a look, and the issue here is that This does work, but the reference you need to use is the actual public Runnable loadRealm(RuntimeValue<SecurityRealm> realm, SecurityUsersConfig securityUsersConfig) { I guess we should throw a meaningful error if you try to inject a config class that is not the entry point to the mapping. |
+1 for validation error |
and thanks for analysis |
Changing this to an enhancement to validate that the injected config class has to be the entry point of the mapping. |
FYI I've checked already finished security migrations and this behavior does not affect them:
/cc @gsmet as we discussed that in relation to 3.9 release |
Describe the bug
I'm trying to migrate Elytron Security extensions and I can see that inside buildstep
io.quarkus.elytron.security.properties.deployment.ElytronPropertiesProcessor#configureFileRealmAuthConfig
values are fine, but when I put breakpoint inside recorded methodio.quarkus.elytron.security.runtime.ElytronPropertiesFileRecorder#loadRealm(io.quarkus.runtime.RuntimeValue<org.wildfly.security.auth.server.SecurityRealm>, io.quarkus.elytron.security.runtime.PropertiesRealmConfig)
values are gone.This is commit that causes the issue 840ac57
UPDATE: see Roberto explanation below.
Expected behavior
Worked for config classes.
Actual behavior
Passed config interface is not null, however when methods are called, they provide none or false (for booleans). I tried to add the
RuntimeConfigSetupCompleteBuildItem
without success. Inside buildstep, values are correct.How to Reproduce?
Reproducer:
git clone
cd quarkus
git checkout feature/migrate-elytron-config-classes
mvn -Dquickly
mvn clean test -f extensions/elytron-security-properties-file/deployment/ -Dtest=BasicAuthTestCase
Please note there are other failures as result of config migration when you run all the tests in the deployment module, but I'm yet to analyze them. I checked code several times and I can't see what is wrong in my migration.
Output of
uname -a
orver
Fedora 38
Output of
java -version
21
Quarkus version or git rev
999-SNAPSHOT
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.3
Additional information
No response
The text was updated successfully, but these errors were encountered: