Skip to content

Commit

Permalink
Merge pull request #31260 from sberyozkin/oidc_connect_log_messages
Browse files Browse the repository at this point in the history
Make OIDC connection error log messages more visible
  • Loading branch information
sberyozkin authored Feb 17, 2023
2 parents 82f6351 + 3b57836 commit e4d6fbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ public static Uni<JsonObject> discoverMetadata(WebClient client, String authServ
if (resp.statusCode() == 200) {
return resp.bodyAsJsonObject();
} else {
LOG.tracef("Discovery has failed, status code: %d", resp.statusCode());
LOG.warnf("Discovery has failed, status code: %d", resp.statusCode());
throw new OidcEndpointAccessException(resp.statusCode());
}
}).onFailure(oidcEndpointNotAvailable())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ private TenantConfigContext createStaticTenantContext(Vertx vertx,
@Override
public TenantConfigContext apply(Throwable t) {
if (t instanceof OIDCException) {
// OIDC server is not available yet - try to create the connection when the first request arrives
LOG.debugf("Tenant '%s': '%s'."
LOG.warnf("Tenant '%s': '%s'."
+ " OIDC server is not available yet, an attempt to connect will be made duiring the first request."
+ " Access to resources protected by this tenant may fail"
+ " if OIDC server will not become available",
tenantId, t.getMessage());
Expand Down Expand Up @@ -257,7 +257,7 @@ public static Optional<ProxyOptions> toProxyOptions(OidcCommonConfig.Proxy proxy

protected static OIDCException toOidcException(Throwable cause, String authServerUrl) {
final String message = OidcCommonUtils.formatConnectionErrorMessage(authServerUrl);
LOG.debug(message);
LOG.warn(message);
return new OIDCException("OIDC Server is not available", cause);
}

Expand Down

0 comments on commit e4d6fbf

Please sign in to comment.