-
Hello, I'm following this guide and trying to expose an endpoint on a management interface that is secured using Basic auth. However, as soon as I enable
Am I missing a dependency or something? Or do I have to register a provider for this bean? https://github.com/quarkusio/quarkus/blob/7f5029944a47906715a32addac682435147c7f5e/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/ManagementInterfaceHttpAuthorizer.java#L22C78-L22C78 Using Quarkus |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 2 replies
-
Beta Was this translation helpful? Give feedback.
-
Hi @grigala, can you check the tests please, https://github.com/quarkusio/quarkus/tree/main/integration-tests/management-interface-auth, may be some dependency is missing ? |
Beta Was this translation helpful? Give feedback.
-
3.2.6.Final upstream tag: https://github.com/quarkusio/quarkus/tree/3.2.6.Final/integration-tests/management-interface-auth |
Beta Was this translation helpful? Give feedback.
-
@sberyozkin small example project with the same dependencies as in the test: https://github.com/grigala/quarkus-management-interface-demo application.properties quarkus.management.enabled=true
quarkus.management.auth.basic=true Registering management endpoint as shown on https://quarkus.io/guides/management-interface-reference#management-endpoint-application: public void registerManagementRoutes(@Observes ManagementInterface mi) {
mi.router().get("/test").handler(ctx -> {
if (ctx.user() != null) {
ctx.response().setStatusCode(200).end("Ok");
} else {
ctx.response().setStatusCode(401).end("Unauthorized");
}
});
} Running ![]() |
Beta Was this translation helpful? Give feedback.
-
Ok I think I found the issue. The users have to be defined in the properties files otherwise the bean is not injected.
|
Beta Was this translation helpful? Give feedback.
-
@grigala Right, I'll get the docs fixed and we also need to make sure in the docs that this is only an example, and that either security jpa or LDAP should be used to manage the users/secrets, thanks |
Beta Was this translation helpful? Give feedback.
Ok I think I found the issue. The users have to be defined in the properties files otherwise the bean is not injected.