diff --git a/deploy-service/universal/src/main/java/com/pinterest/teletraan/universal/security/ScriptTokenAuthenticator.java b/deploy-service/universal/src/main/java/com/pinterest/teletraan/universal/security/ScriptTokenAuthenticator.java index 4db40ac741..096bd4c1d3 100644 --- a/deploy-service/universal/src/main/java/com/pinterest/teletraan/universal/security/ScriptTokenAuthenticator.java +++ b/deploy-service/universal/src/main/java/com/pinterest/teletraan/universal/security/ScriptTokenAuthenticator.java @@ -22,6 +22,7 @@ import io.dropwizard.auth.Authenticator; import io.micrometer.core.instrument.Counter; import io.micrometer.core.instrument.Metrics; +import java.util.Objects; import java.util.Optional; /** @@ -55,7 +56,7 @@ public Optional> authenticate(String credentials) "principal", principal.get().getName(), "env", - principal.get().getResource().getEnvName()) + Objects.toString(principal.get().getResource().getEnvName(), "NA")) .register(Metrics.globalRegistry) .increment(); } else {