I am building an extension to support my company's internal and external SSO options. All other things being equal... given this sample block of code...
@QuarkusTestResource(OidcWiremockTestResource.class)
class SsoAutowiredTest {
@RegisterExtension
static final QuarkusUnitTest UNIT_TEST = QuarkusUnitTest.withSecuredConnection()
// config option 1
.overrideConfigKey("quarkus.oidc.auth-server-url", "${keycloak.url}/realms/quarkus/")
// config option 2
//.overrideConfigKey("security.oidc.sso.internal.auth-server-url", "${keycloak.url}/realms/quarkus/")
.setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)
.addClass(SecureResource.class));
@Test
void test() {
}
}
The code as is, with "option 1" uncommented works. However, if I comment out "option 1", and uncomment "option 2", I get the following exception:
Caused by: io.smallrye.config.ConfigValidationException: Configuration validation failed: java.util.NoSuchElementException: SRCFG00011: Could not expand value keycloak.url in property security.oidc.sso.internal.auth-server-url
Why is that? There is otherwise no difference. I am not sure why the substituted ${keycloak.url} should care how it is used.
Thank you in advance, Dennis