-
Notifications
You must be signed in to change notification settings - Fork 4
Enabling Basic Auth configured at runtime #155
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but would like @carlesarnal to also review
@Dynamic(label = "HTTP basic authentication", description = "When selected, users are permitted to authenticate using HTTP basic authentication (in addition to OAuth).", requires = "apicurio.authn.enabled=true") | ||
@ConfigProperty(name = "apicurio.authn.basic-client-credentials.enabled", defaultValue = "false") | ||
@Info(category = "auth", description = "Enable basic auth client credentials", availableSince = "0.1.18-SNAPSHOT", registryAvailableSince = "2.1.0.Final", studioAvailableSince = "1.0.0") | ||
Supplier<Boolean> fakeBasicAuthEnabled; | ||
Supplier<Boolean> basicClientCredentialsAuthEnabled; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good, much better
public Uni<HttpCredentialTransport> getCredentialTransport(RoutingContext context) { | ||
var enabledAuth = selectEnabledAuth(); | ||
if (enabledAuth != null) { | ||
// TODO: was new HttpCredentialTransport(HttpCredentialTransport.Type.AUTHORIZATION, "bearer"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be changed to honour the configured auth type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is, I just need to remove the TODO comment which is a leftover
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh right, it's using the credential transport from the enabled auth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small question, otherwise, lgtm
Opening for visibility, I'll finish up this one at some point next week.