Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into new-saml-0530
Browse files Browse the repository at this point in the history
  • Loading branch information
duanemay committed Jul 26, 2024
2 parents f61f842 + fb4ec9f commit 8f682fa
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ public void debug(String message) {
}
}

public void debug(String message, Object... params) {
if (fallback.isDebugEnabled()) {
fallback.debug(LogSanitizerUtil.sanitize(message), params);
}
}

public void debug(String message, Throwable t) {
if (fallback.isDebugEnabled()) {
fallback.debug(LogSanitizerUtil.sanitize(message), t);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.cloudfoundry.identity.uaa.client.UaaClientDetails;
import org.cloudfoundry.identity.uaa.constants.OriginKeys;
import org.cloudfoundry.identity.uaa.error.UaaException;
import org.cloudfoundry.identity.uaa.logging.SanitizedLogFactory;
import org.cloudfoundry.identity.uaa.provider.ClientAlreadyExistsException;
import org.cloudfoundry.identity.uaa.provider.IdentityProvider;
import org.cloudfoundry.identity.uaa.provider.IdentityProviderProvisioning;
Expand All @@ -14,8 +15,6 @@
import org.cloudfoundry.identity.uaa.scim.ScimGroup;
import org.cloudfoundry.identity.uaa.scim.ScimGroupProvisioning;
import org.cloudfoundry.identity.uaa.util.UaaStringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationEventPublisherAware;
Expand Down Expand Up @@ -64,7 +63,7 @@
@RequestMapping("/identity-zones")
public class IdentityZoneEndpoints implements ApplicationEventPublisherAware {

private static final Logger logger = LoggerFactory.getLogger(IdentityZoneEndpoints.class);
private static final SanitizedLogFactory.SanitizedLog logger = SanitizedLogFactory.getLog(IdentityZoneEndpoints.class);
private static final String ID_SUBDOMAIN_LOGGING = "[{}] subdomain [{}]";

private final IdentityZoneProvisioning zoneDao;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public void testSanitizeDebug() {
when(mockLog.isDebugEnabled()).thenReturn(true);
log.debug(dirtyMessage);
verify(mockLog).debug(sanitizedMsg);
log.debug(dirtyMessage, true);
verify(mockLog).debug(sanitizedMsg);
log.debug(dirtyMessage, ex);
verify(mockLog).debug(sanitizedMsg, ex);
}
Expand Down
78 changes: 42 additions & 36 deletions uaa/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions uaa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"author": "CloudFoundry",
"license": "Apache-2.0",
"dependencies": {
"jasmine": "^5.1.0",
"jasmine-core": "5.1.2"
"jasmine": "^5.2.0",
"jasmine-core": "5.2.0"
}
}
4 changes: 2 additions & 2 deletions uaa/slate/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ GEM
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.6.0)
rexml (3.2.8)
strscan (>= 3.0.9)
rexml (3.3.2)
strscan
rouge (3.30.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ public void testRequestRejectedExceptionErrorPage() throws IOException {
private String CallErrorPageAndCheckHttpStatusCode(String errorPath, String method, int codeExpected) throws IOException {
HttpURLConnection cn = (HttpURLConnection)new URL(baseUrl + errorPath).openConnection();
cn.setRequestMethod(method);
cn.setRequestProperty("Accept", "text/html");
// connection initiate
cn.connect();
Assert.assertEquals("Check status code from " + errorPath + " is " + codeExpected, cn.getResponseCode(), codeExpected);
Assert.assertEquals("Check status code from " + errorPath + " is " + codeExpected, codeExpected, cn.getResponseCode());
return getResponseBody(cn);
}

Expand Down

0 comments on commit 8f682fa

Please sign in to comment.