Commit f5f6946a by Tuomas Riihimäki

Whoops. Remove password logging.

1 parent 5fe73e18
......@@ -89,7 +89,7 @@ public class MoyaRealm extends AppservRealm {
*/
@Override
public String getAuthType() {
return "Omnia Lan system authentication Realm";
return "Moya authentication Realm";
}
/**
......
......@@ -117,13 +117,11 @@ public class JaasBean implements MoyaRealmBeanRemote {
@Override
public AuthenticationResult authUsername(String username, String password) {
logger.info("Trying jaas auth with '{}', '{}'", username, password);
AuthenticationResult ret = new AuthenticationResult();
ret.setUsertype(UserType.USER.name());
if ((username == null || username.isEmpty()) && password.startsWith("rest:")) {
logger.info("Trying to jaas auth rest call");
ret.setUsertype(UserType.REST.name());
ret.setUsername(restAuth(password));
......@@ -143,7 +141,6 @@ public class JaasBean implements MoyaRealmBeanRemote {
private String restAuth(String restauth) {
String[] authsplit = restauth.split(":");
logger.info("Auth split len {}, {}", authsplit.length, authsplit);
if (authsplit.length != 6 || !authsplit[0].equals("rest")) {
return null;
}
......@@ -152,7 +149,6 @@ public class JaasBean implements MoyaRealmBeanRemote {
@Override
public Enumeration<String> getGroupNames(String user, String usertype) {
logger.info("Fetching groupNames for user {} event {}", user, eventbean.getCurrentEvent().getName());
EventUser usr = eventUserFacade.findByLogin(user.toLowerCase().trim());
HashSet<String> roleset = new HashSet<String>();
roleset.add(UserPermission.ANYUSER.getFullName());
......@@ -216,7 +212,7 @@ public class JaasBean implements MoyaRealmBeanRemote {
Vector<String> retvect = new Vector<String>();
retvect.addAll(roleset);
logger.info("group names for user {}: {}", user, retvect);
logger.debug("group names for user {}: {}", user, retvect);
return retvect.elements();
}
......@@ -227,7 +223,6 @@ public class JaasBean implements MoyaRealmBeanRemote {
}
public String authenticateApp(String pathInfo, String appId, String userId, String appStamp, String mac) {
logger.info("pathInfo {}, appid {}, userId {}, appStamp {}, mac {}", pathInfo, appId, userId, appStamp, mac);
if (mac == null)
return null;
ApiApplication app = appfacade.findByAppid(appId);
......@@ -242,7 +237,6 @@ public class JaasBean implements MoyaRealmBeanRemote {
String ret = null;
String macSource = PasswordFunctions.mkSeparatedString("+", pathInfo, appId, userId, appStamp, apiInstance.getSecretKey());
String macHash = PasswordFunctions.calculateSha1(macSource);
logger.info("Calculated mac hash {} from mac source {}. Sould match {}", macHash, macSource, mac);
if (mac.equalsIgnoreCase(macHash))
{
switch (app.getAuthtype()) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!