Removed auditing (closes #611)

Change-Id: I67d0fd0278ff848781ca23b09b07a473ce880d44
diff --git a/full/Changes b/full/Changes
index ab083b4..2135576 100644
--- a/full/Changes
+++ b/full/Changes
@@ -1,5 +1,8 @@
 # version 0.71
 
+- Removed auditing (closes #611)
+
+
 # version 0.70.1
 
 - Renamed entity and service packages in core
diff --git a/full/src/main/java/de/ids_mannheim/korap/auditing/AuditRecord.java b/full/src/main/java/de/ids_mannheim/korap/auditing/AuditRecord.java
deleted file mode 100644
index 5370c9f..0000000
--- a/full/src/main/java/de/ids_mannheim/korap/auditing/AuditRecord.java
+++ /dev/null
@@ -1,173 +0,0 @@
-package de.ids_mannheim.korap.auditing;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.databind.JsonNode;
-
-import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.utils.JsonUtils;
-import de.ids_mannheim.korap.utils.TimeUtils;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.Arrays;
-import java.util.Date;
-
-/**
- * @author hanl
- *         <p/>
- *         Record holder for auditing requests. Holds the data until
- *         it can be persisted to a database
- */
-@Getter
-@Setter
-public class AuditRecord {
-
-    // todo: handle via status codes
-    @Deprecated
-    public enum Operation {
-        GET, INSERT, UPDATE, DELETE, CREATE
-    }
-
-    public enum CATEGORY {
-        SECURITY, DATABASE, RESOURCE, QUERY, SERVICE
-    }
-
-    @JsonIgnore
-    private Integer id;
-    //security access describes changes in user authorities and access control permissions of resources
-    private String userid;
-    private String target;
-
-    //fixme: replace with more specific error codes
-    private CATEGORY category;
-    private String loc;
-    private Long timestamp;
-    private Integer status = -1;
-    private String args;
-    private String field_1 = "None";
-
-
-    private AuditRecord () {
-        this.timestamp = TimeUtils.getNow().getMillis();
-    }
-
-
-    public AuditRecord (CATEGORY category) {
-        this();
-        this.category = category;
-    }
-
-
-    public AuditRecord (CATEGORY cat, Object userID, Integer status) {
-        this(cat);
-        this.status = status;
-        if (userID != null) {
-            //todo: client info!
-            //            this.loc = clientInfoToString(user.getTokenContext().getHostAddress(),
-            //                    user.getTokenContext().getUserAgent());
-            this.loc = clientInfoToString("null", "null");
-            userid = String.valueOf(userID);
-        }
-        else {
-            this.loc = clientInfoToString("null", "null");
-            userid = "-1";
-        }
-    }
-
-
-    public static AuditRecord serviceRecord (Object user, Integer status,
-            String ... args) {
-        AuditRecord r = new AuditRecord(CATEGORY.SERVICE);
-        r.setArgs(Arrays.asList(args).toString());
-        r.setUserid(String.valueOf(user));
-        r.setStatus(status);
-        return r;
-    }
-
-
-    public static AuditRecord dbRecord (Object user, Integer status,
-            String ... args) {
-        AuditRecord r = new AuditRecord(CATEGORY.DATABASE);
-        r.setArgs(Arrays.asList(args).toString());
-        r.setUserid(String.valueOf(user));
-        r.setStatus(status);
-        return r;
-    }
-
-
-    public AuditRecord fromJson (String json) throws KustvaktException {
-        JsonNode n = JsonUtils.readTree(json);
-        AuditRecord r = new AuditRecord();
-        r.setCategory(CATEGORY.valueOf(n.path("category").asText()));
-        r.setTarget(n.path("target").asText());
-        r.setField_1(n.path("field_1").asText());
-        r.setUserid(n.path("account").asText());
-        r.setStatus(n.path("status").asInt());
-        r.setLoc(n.path("loc").asText());
-        return r;
-    }
-
-
-    private String clientInfoToString (String IP, String userAgent) {
-        return userAgent + "@" + IP;
-    }
-
-
-    // fixme: add id, useragent
-    @Override
-    public String toString () {
-        StringBuilder b = new StringBuilder();
-        b.append(category.toString().toLowerCase() + " audit : ")
-                .append(userid + "@" + new Date(timestamp)).append("\n")
-                .append("Status " + status).append("; ");
-
-        if (this.args != null)
-            b.append("Args " + field_1).append("; ");
-        if (this.loc != null)
-            b.append("Location " + loc).append("; ");
-        return b.toString();
-    }
-
-
-    @Override
-    public boolean equals (Object o) {
-        if (this == o)
-            return true;
-        if (o == null || getClass() != o.getClass())
-            return false;
-
-        AuditRecord that = (AuditRecord) o;
-
-        if (userid != null ? !userid.equals(that.userid) : that.userid != null)
-            return false;
-        if (category != that.category)
-            return false;
-        if (status != null ? !status.equals(that.status) : that.status != null)
-            return false;
-        if (field_1 != null ? !field_1.equals(that.field_1)
-                : that.field_1 != null)
-            return false;
-        if (loc != null ? !loc.equals(that.loc) : that.loc != null)
-            return false;
-        if (target != null ? !target.equals(that.target) : that.target != null)
-            return false;
-        if (timestamp != null ? !timestamp.equals(that.timestamp)
-                : that.timestamp != null)
-            return false;
-
-        return true;
-    }
-
-
-    @Override
-    public int hashCode () {
-        int result = userid != null ? userid.hashCode() : 0;
-        result = 31 * result + (target != null ? target.hashCode() : 0);
-        result = 31 * result + category.hashCode();
-        result = 31 * result + (loc != null ? loc.hashCode() : 0);
-        result = 31 * result + (timestamp != null ? timestamp.hashCode() : 0);
-        result = 31 * result + (status != null ? status.hashCode() : 0);
-        result = 31 * result + (field_1 != null ? field_1.hashCode() : 0);
-        return result;
-    }
-}
diff --git a/full/src/main/java/de/ids_mannheim/korap/authentication/KustvaktAuthenticationManager.java b/full/src/main/java/de/ids_mannheim/korap/authentication/KustvaktAuthenticationManager.java
index fefa17c..af55b3e 100644
--- a/full/src/main/java/de/ids_mannheim/korap/authentication/KustvaktAuthenticationManager.java
+++ b/full/src/main/java/de/ids_mannheim/korap/authentication/KustvaktAuthenticationManager.java
@@ -19,7 +19,6 @@
 //Using JAR from unboundID:
 import com.unboundid.ldap.sdk.LDAPException;
 
-import de.ids_mannheim.korap.auditing.AuditRecord;
 import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.config.BeansFactory;
 import de.ids_mannheim.korap.config.FullConfiguration;
@@ -33,7 +32,6 @@
 import de.ids_mannheim.korap.exceptions.WrappedException;
 import de.ids_mannheim.korap.interfaces.EncryptionIface;
 import de.ids_mannheim.korap.interfaces.EntityHandlerIface;
-import de.ids_mannheim.korap.interfaces.db.AuditingIface;
 import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
 import de.ids_mannheim.korap.security.context.TokenContext;
 import de.ids_mannheim.korap.user.DemoUser;
@@ -64,7 +62,6 @@
 	private EntityHandlerIface entHandler;
 	@Autowired
 	private AdminDao adminDao;
-	private AuditingIface auditing;
 	private FullConfiguration config;
 	@Deprecated
 	private Collection userdatadaos;
@@ -73,12 +70,11 @@
 	private Validator validator;
 	
 	public KustvaktAuthenticationManager(EntityHandlerIface userdb, EncryptionIface crypto,
-			FullConfiguration config, AuditingIface auditer, Collection<UserDataDbIface> userdatadaos) {
+			FullConfiguration config, Collection<UserDataDbIface> userdatadaos) {
 	    super("id_tokens");
 		this.entHandler = userdb;
 		this.config = config;
 		this.crypto = crypto;
-		this.auditing = auditer;
 		this.counter = new LoginCounter(config);
 		this.userdatadaos = userdatadaos;
 		// todo: load via beancontext
@@ -210,7 +206,6 @@
 			user = authenticate(username, password, attributes);
 			break;
 		}
-		auditing.audit(AuditRecord.serviceRecord(user.getId(), StatusCodes.LOGIN_SUCCESSFUL, user.toString()));
 		return user;
 	}
 
@@ -559,6 +554,7 @@
 
 	} // authenticateIdM
 
+	@Deprecated
 	public boolean isRegistered(String username) {
 		User user;
 		if (username == null || username.isEmpty())
@@ -582,6 +578,7 @@
 		return user != null;
 	}
 
+	@Deprecated
 	public void logout(TokenContext context) throws KustvaktException {
 		try {
 			AuthenticationIface provider = getProvider(context.getTokenType(), null);
@@ -594,11 +591,10 @@
 		} catch (KustvaktException e) {
 			throw new WrappedException(e, StatusCodes.LOGOUT_FAILED, context.toString());
 		}
-		auditing.audit(
-				AuditRecord.serviceRecord(context.getUsername(), StatusCodes.LOGOUT_SUCCESSFUL, context.toString()));
 		this.removeCacheEntry(context.getToken());
 	}
 
+	@Deprecated
 	private void processLoginFail(User user) throws KustvaktException {
 		counter.registerFail(user.getUsername());
 		if (!counter.validate(user.getUsername())) {
@@ -613,6 +609,7 @@
 		}
 	}
 
+	@Deprecated
 	public void lockAccount(User user) throws KustvaktException {
 		if (!(user instanceof KorAPUser))
 			throw new KustvaktException(StatusCodes.REQUEST_INVALID);
@@ -678,6 +675,7 @@
 	 * @throws KustvaktException
 	 */
 	// todo:
+	@Deprecated
 	public void accountLink(User current, String for_name, int transstrat) throws KustvaktException {
 		// User foreign = entHandler.getAccount(for_name);
 
@@ -704,6 +702,7 @@
 		// }
 	}
 
+	@Deprecated
 	// todo: test and rest usage?!
 	public boolean updateAccount(User user) throws KustvaktException {
 		boolean result;
@@ -719,14 +718,10 @@
 				throw new WrappedException(e, StatusCodes.UPDATE_ACCOUNT_FAILED);
 			}
 		}
-		if (result) {
-			// this.removeCacheEntry(user.getUsername());
-			auditing.audit(
-					AuditRecord.serviceRecord(user.getId(), StatusCodes.UPDATE_ACCOUNT_SUCCESSFUL, user.toString()));
-		}
 		return result;
 	}
 
+	@Deprecated
 	public boolean deleteAccount(User user) throws KustvaktException {
 		boolean result;
 		if (user instanceof DemoUser)
@@ -739,11 +734,6 @@
 				throw new WrappedException(e, StatusCodes.DELETE_ACCOUNT_FAILED);
 			}
 		}
-		if (result) {
-			// this.removeCacheEntry(user.getUsername());
-			auditing.audit(AuditRecord.serviceRecord(user.getUsername(), StatusCodes.DELETE_ACCOUNT_SUCCESSFUL,
-					user.toString()));
-		}
 		return result;
 	}
 
diff --git a/full/src/main/java/de/ids_mannheim/korap/config/ContextHolder.java b/full/src/main/java/de/ids_mannheim/korap/config/ContextHolder.java
index 99c54ae..f2e22ab 100644
--- a/full/src/main/java/de/ids_mannheim/korap/config/ContextHolder.java
+++ b/full/src/main/java/de/ids_mannheim/korap/config/ContextHolder.java
@@ -5,7 +5,6 @@
 import org.springframework.beans.factory.NoSuchBeanDefinitionException;
 import org.springframework.context.ApplicationContext;
 
-import de.ids_mannheim.korap.interfaces.db.AuditingIface;
 import de.ids_mannheim.korap.interfaces.db.PersistenceClient;
 import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
 import de.ids_mannheim.korap.web.CoreResponseHandler;
@@ -37,7 +36,7 @@
         this.handler = new DefaultHandler();
         this.context = context;
         // todo: better method?!
-        new CoreResponseHandler(getAuditingProvider());
+        new CoreResponseHandler();
     }
 
 
@@ -70,11 +69,6 @@
     }
 
 
-    public AuditingIface getAuditingProvider () {
-        return (AuditingIface) getBean(KUSTVAKT_AUDITING);
-    }
-
-
     @Deprecated
     public <T extends KustvaktConfiguration> T getConfiguration () {
         return (T) getBean(KUSTVAKT_CONFIG);
@@ -92,7 +86,6 @@
     }
 
     private void close () {
-        this.getAuditingProvider().finish();
         this.context = null;
     }
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/exceptions/DatabaseException.java b/full/src/main/java/de/ids_mannheim/korap/exceptions/DatabaseException.java
index 26190cc..a142ea7 100644
--- a/full/src/main/java/de/ids_mannheim/korap/exceptions/DatabaseException.java
+++ b/full/src/main/java/de/ids_mannheim/korap/exceptions/DatabaseException.java
@@ -1,7 +1,5 @@
 package de.ids_mannheim.korap.exceptions;
 
-import de.ids_mannheim.korap.auditing.AuditRecord;
-
 import java.util.Arrays;
 
 /**
@@ -23,21 +21,11 @@
     public DatabaseException (Exception e, Object userid, String target, Integer status, String message,
                         String ... args) {
         this(userid, status, message, Arrays.asList(args).toString(), e);
-        AuditRecord record = new AuditRecord(AuditRecord.CATEGORY.DATABASE);
-        record.setUserid(String.valueOf(userid));
-        record.setStatus(status);
-        record.setTarget(target);
-        record.setArgs(this.getEntity());
-        this.records.add(record);
     }
 
 
     public DatabaseException (KustvaktException e, Integer status, String ... args) {
         this(e.getUserid(), e.getStatusCode(), e.getMessage(), e.getEntity(), e);
-        AuditRecord record = AuditRecord.dbRecord(e.getUserid(), status, args);
-        record.setField_1(e.string());
-        this.records.addAll(e.getRecords());
-        this.records.add(record);
     }
 
 
diff --git a/full/src/main/java/de/ids_mannheim/korap/exceptions/KustvaktException.java b/full/src/main/java/de/ids_mannheim/korap/exceptions/KustvaktException.java
index 6ccbbce..efe9338 100644
--- a/full/src/main/java/de/ids_mannheim/korap/exceptions/KustvaktException.java
+++ b/full/src/main/java/de/ids_mannheim/korap/exceptions/KustvaktException.java
@@ -1,11 +1,8 @@
 package de.ids_mannheim.korap.exceptions;
 
 import java.net.URI;
-import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.List;
 
-import de.ids_mannheim.korap.auditing.AuditRecord;
 //import de.ids_mannheim.korap.constant.TokenType;
 import lombok.Getter;
 import lombok.Setter;
@@ -19,7 +16,6 @@
 public class KustvaktException extends Exception {
 
     private static final long serialVersionUID = -1955783565699446322L;
-    protected List<AuditRecord> records = new ArrayList<>();
     private String userid;
     private Integer statusCode;
     private int responseStatus;
diff --git a/full/src/main/java/de/ids_mannheim/korap/exceptions/ServiceException.java b/full/src/main/java/de/ids_mannheim/korap/exceptions/ServiceException.java
deleted file mode 100644
index 99ddebe..0000000
--- a/full/src/main/java/de/ids_mannheim/korap/exceptions/ServiceException.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package de.ids_mannheim.korap.exceptions;
-
-import de.ids_mannheim.korap.auditing.AuditRecord;
-import lombok.AccessLevel;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-/**
- * @author hanl
- * @date 08/04/2015
- */
-// should be a http exception that responds to a service point
-// is the extension of the notauthorized exception!
-@Setter(AccessLevel.PROTECTED)
-@Getter(AccessLevel.PROTECTED)
-public class ServiceException extends Exception {
-
-    protected List<AuditRecord> records = new ArrayList<>();
-    private static final Logger jlog = LogManager
-            .getLogger(ServiceException.class);
-
-    private int status;
-    private String entity;
-    private Object userid;
-
-
-    protected ServiceException (Object userid, Integer status, String message,
-                                String args) {
-        super(message);
-        this.userid = userid;
-        this.status = status;
-        this.entity = args;
-        AuditRecord record = AuditRecord.serviceRecord(userid, status, args);
-        this.records.add(record);
-    }
-
-
-    @Deprecated
-    public ServiceException (Object userid, Integer status, String ... args) {
-        this(userid, status, StatusCodes.getMessage(status), Arrays
-                .asList(args).toString());
-    }
-
-
-    public ServiceException (Integer status, KustvaktException ex) {
-        this(ex.getUserid(), ex.getStatusCode(), ex.getMessage(), ex
-                .getEntity());
-        AuditRecord record = AuditRecord.serviceRecord(ex.getUserid(), status,
-                ex.getEntity());
-        record.setField_1(ex.toString());
-        this.records.add(record);
-        jlog.error("Exception: " + ex.toString());
-    }
-
-}
diff --git a/full/src/main/java/de/ids_mannheim/korap/exceptions/WrappedException.java b/full/src/main/java/de/ids_mannheim/korap/exceptions/WrappedException.java
index 534419a..ed091f3 100644
--- a/full/src/main/java/de/ids_mannheim/korap/exceptions/WrappedException.java
+++ b/full/src/main/java/de/ids_mannheim/korap/exceptions/WrappedException.java
@@ -1,7 +1,5 @@
 package de.ids_mannheim.korap.exceptions;
 
-import de.ids_mannheim.korap.auditing.AuditRecord;
-
 import java.util.Arrays;
 
 /**
@@ -12,6 +10,9 @@
 // is the extension of the notauthorized exception!
 public class WrappedException extends KustvaktException {
 
+    private static final long serialVersionUID = 1L;
+
+
     private WrappedException (Object userid, Integer status, String message,
                               String args, Exception rootCause) {
         super(String.valueOf(userid), status, message, args, rootCause);
@@ -20,19 +21,12 @@
 
     public WrappedException (Object userid, Integer status, String ... args) {
         this(userid, status, "", Arrays.asList(args).toString(), null);
-        AuditRecord record = AuditRecord.serviceRecord(userid, status, args);
-        this.records.add(record);
     }
 
 
     public WrappedException (KustvaktException e, Integer status,
                              String ... args) {
         this(e.getUserid(), e.getStatusCode(), e.getMessage(), e.getEntity(), e);
-        AuditRecord record = AuditRecord.serviceRecord(e.getUserid(), status,
-                args);
-        record.setField_1(e.string());
-        this.records.addAll(e.getRecords());
-        this.records.add(record);
     }
 
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/handlers/JDBCAuditing.java b/full/src/main/java/de/ids_mannheim/korap/handlers/JDBCAuditing.java
deleted file mode 100644
index 57e9eb1..0000000
--- a/full/src/main/java/de/ids_mannheim/korap/handlers/JDBCAuditing.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package de.ids_mannheim.korap.handlers;
-
-import java.sql.Timestamp;
-import java.util.List;
-
-import org.joda.time.DateTime;
-import org.joda.time.LocalDate;
-import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
-import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
-import org.springframework.jdbc.core.namedparam.SqlParameterSource;
-
-import de.ids_mannheim.korap.auditing.AuditRecord;
-import de.ids_mannheim.korap.interfaces.db.AuditingIface;
-import de.ids_mannheim.korap.interfaces.db.PersistenceClient;
-import de.ids_mannheim.korap.user.User;
-
-/**
- * @author hanl
- * @date 13/01/2014
- */
-public class JDBCAuditing extends AuditingIface {
-
-    private NamedParameterJdbcTemplate template;
-
-    public JDBCAuditing (PersistenceClient client) {
-        this.template = (NamedParameterJdbcTemplate) client.getSource();
-    }
-
-
-    @Override
-    public <T extends AuditRecord> List<T> retrieveRecords (
-            AuditRecord.CATEGORY category, DateTime day, DateTime until,
-            boolean dayOnly, int limit) {
-        MapSqlParameterSource p = new MapSqlParameterSource();
-        p.addValue("limit", limit);
-        p.addValue("cat", category.toString());
-
-        String sql = "select * from audit_records where aud_timestamp > :today AND"
-                + " aud_timestamp < :tomorr AND aud_category=:cat limit :limit;";
-
-        if (dayOnly) {
-            LocalDate today = day.toLocalDate();
-            DateTime start = today.toDateTimeAtStartOfDay(day.getZone());
-            DateTime end = today.plusDays(1).toDateTimeAtStartOfDay(
-                    day.getZone());
-            p.addValue("today", start.getMillis());
-            p.addValue("tomorr", end.getMillis());
-        }
-        else {
-            p.addValue("today", day.getMillis());
-            p.addValue("tomorr", until.getMillis());
-        }
-        return (List<T>) this.template.query(sql, p,
-                new RowMapperFactory.AuditMapper());
-    }
-
-
-    @Override
-    public <T extends AuditRecord> List<T> retrieveRecords (
-            AuditRecord.CATEGORY category, User user, int limit) {
-        MapSqlParameterSource p = new MapSqlParameterSource();
-        p.addValue("limit", limit);
-        p.addValue("us", user.getUsername());
-        p.addValue("cat", category.toString());
-
-        String sql = "select * from audit_records where aud_category=:cat and aud_user=:us "
-                + "order by aud_timestamp desc limit :limit;";
-
-        return (List<T>) this.template.query(sql, p,
-                new RowMapperFactory.AuditMapper());
-    }
-
-
-    @Override
-    public <T extends AuditRecord> List<T> retrieveRecords (LocalDate day,
-            int hitMax) {
-        return null;
-    }
-
-
-    @Override
-    public <T extends AuditRecord> List<T> retrieveRecords (String userID,
-            LocalDate start, LocalDate end, int hitMax) {
-        return null;
-    }
-
-
-    @Override
-    public void apply () {
-//        String sql;
-//        sql = "INSERT INTO audit_records (aud_target, aud_category, aud_user, aud_location, aud_timestamp, "
-//                + "aud_status, aud_field_1, aud_args) "
-//                + "VALUES (:target, :category, :account, :loc, :timestamp, :status, :field, :args);";
-        List<AuditRecord> records = getRecordsToSave();
-//        SqlParameterSource[] s = new SqlParameterSource[records.size()];
-//        for (int i = 0; i < records.size(); i++) {
-//            AuditRecord rec = records.get(i);
-//            MapSqlParameterSource source = new MapSqlParameterSource();
-//            source.addValue("category", rec.getCategory().toString());
-//            source.addValue("account", rec.getUserid());
-//            source.addValue("target", rec.getTarget());
-//            source.addValue("loc", rec.getLoc());
-//            source.addValue("timestamp", new Timestamp(rec.getTimestamp()));
-//            source.addValue("status", rec.getStatus());
-//            source.addValue("field", rec.getField_1());
-//            source.addValue("args", rec.getArgs());
-//            s[i] = source;
-//        }
-//        this.template.batchUpdate(sql, s);
-        records.clear();
-    }
-
-
-    @Override
-    public void finish () {
-
-    }
-
-}
diff --git a/full/src/main/java/de/ids_mannheim/korap/handlers/RowMapperFactory.java b/full/src/main/java/de/ids_mannheim/korap/handlers/RowMapperFactory.java
index 2b52228..d2240ed 100644
--- a/full/src/main/java/de/ids_mannheim/korap/handlers/RowMapperFactory.java
+++ b/full/src/main/java/de/ids_mannheim/korap/handlers/RowMapperFactory.java
@@ -7,7 +7,6 @@
 
 import org.springframework.jdbc.core.RowMapper;
 
-import de.ids_mannheim.korap.auditing.AuditRecord;
 import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.config.URIParam;
 import de.ids_mannheim.korap.user.KorAPUser;
@@ -79,21 +78,4 @@
 
     }
 
-    public static class AuditMapper implements RowMapper<AuditRecord> {
-
-        @Override
-        public AuditRecord mapRow (ResultSet rs, int rowNum)
-                throws SQLException {
-            AuditRecord r = new AuditRecord(AuditRecord.CATEGORY.valueOf(rs
-                    .getString("aud_category")));
-            r.setUserid(rs.getString("aud_user"));
-            r.setField_1(rs.getString("aud_field_1"));
-            r.setTimestamp(rs.getTimestamp("aud_timestamp").getTime());
-            r.setId(rs.getInt("aud_id"));
-            r.setStatus(rs.getInt("aud_status"));
-            r.setLoc(rs.getString("aud_location"));
-            return r;
-        }
-    }
-
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/interfaces/db/AuditingIface.java b/full/src/main/java/de/ids_mannheim/korap/interfaces/db/AuditingIface.java
deleted file mode 100644
index 5e6866b..0000000
--- a/full/src/main/java/de/ids_mannheim/korap/interfaces/db/AuditingIface.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package de.ids_mannheim.korap.interfaces.db;
-
-import de.ids_mannheim.korap.auditing.AuditRecord;
-import de.ids_mannheim.korap.user.User;
-import edu.emory.mathcs.backport.java.util.Collections;
-import org.joda.time.DateTime;
-import org.joda.time.LocalDate;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * User: hanl
- * Date: 8/20/13
- * Time: 10:45 AM
- */
-//fixme: move table to different database!
-public abstract class AuditingIface {
-
-    protected static int BATCH_SIZE = 15;
-    private final List<AuditRecord> records = Collections
-            .synchronizedList(new ArrayList<>(BATCH_SIZE + 5));
-    private final List<AuditRecord> buffer = new ArrayList<>(BATCH_SIZE + 5);
-
-
-    public abstract <T extends AuditRecord> List<T> retrieveRecords (
-            AuditRecord.CATEGORY category, DateTime day, DateTime until,
-            boolean exact, int limit);
-
-
-    public abstract <T extends AuditRecord> List<T> retrieveRecords (
-            AuditRecord.CATEGORY category, User user, int limit);
-
-
-    public abstract <T extends AuditRecord> List<T> retrieveRecords (
-            LocalDate day, int hitMax);
-
-
-    public abstract <T extends AuditRecord> List<T> retrieveRecords (
-            String userID, LocalDate start, LocalDate end, int hitMax);
-
-
-    private void addAndRun (AuditRecord record) {
-        if (buffer.size() > BATCH_SIZE) {
-            records.clear();
-            records.addAll(buffer);
-            new Thread(new Runnable() {
-                @Override
-                public void run () {
-                    apply();
-                }
-            }).start();
-            buffer.clear();
-        }
-        if (buffer.size() <= BATCH_SIZE)
-            buffer.add(record);
-    }
-
-
-    public <T extends AuditRecord> void audit (T request) {
-        addAndRun(request);
-    }
-
-
-    public <T extends AuditRecord> void audit (List<T> requests) {
-        for (T rec : requests)
-            addAndRun(rec);
-    }
-
-
-    public abstract void apply ();
-
-
-    protected List<AuditRecord> getRecordsToSave () {
-        return this.records;
-    }
-
-
-    public abstract void finish ();
-}
diff --git a/full/src/main/java/de/ids_mannheim/korap/interfaces/defaults/DefaultAuditing.java b/full/src/main/java/de/ids_mannheim/korap/interfaces/defaults/DefaultAuditing.java
deleted file mode 100644
index 86e533e..0000000
--- a/full/src/main/java/de/ids_mannheim/korap/interfaces/defaults/DefaultAuditing.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package de.ids_mannheim.korap.interfaces.defaults;
-
-import de.ids_mannheim.korap.auditing.AuditRecord;
-import de.ids_mannheim.korap.config.ContextHolder;
-import de.ids_mannheim.korap.config.Configurable;
-import de.ids_mannheim.korap.interfaces.db.AuditingIface;
-import de.ids_mannheim.korap.user.User;
-import org.joda.time.DateTime;
-import org.joda.time.LocalDate;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.List;
-
-/**
- * @author hanl
- * @date 05/06/2015
- */
-@Configurable(ContextHolder.KUSTVAKT_AUDITING)
-public class DefaultAuditing extends AuditingIface {
-
-    private FileOutputStream stream;
-
-
-    public DefaultAuditing () {
-        try {
-            File f = new File("logs");
-            f.mkdirs();
-            stream = new FileOutputStream(new File(f, "default_audit.log"));
-        }
-        catch (FileNotFoundException e) {
-            e.printStackTrace();
-        }
-    }
-
-
-    @Override
-    public <T extends AuditRecord> List<T> retrieveRecords (
-            AuditRecord.CATEGORY category, DateTime day, DateTime until,
-            boolean exact, int limit) {
-        throw new UnsupportedOperationException("Operation not supported!");
-    }
-
-
-    @Override
-    public <T extends AuditRecord> List<T> retrieveRecords (
-            AuditRecord.CATEGORY category, User user, int limit) {
-        throw new UnsupportedOperationException("Operation not supported!");
-    }
-
-
-    @Override
-    public <T extends AuditRecord> List<T> retrieveRecords (LocalDate day,
-            int hitMax) {
-        throw new UnsupportedOperationException("Operation not supported!");
-    }
-
-
-    @Override
-    public <T extends AuditRecord> List<T> retrieveRecords (String userID,
-            LocalDate start, LocalDate end, int hitMax) {
-        throw new UnsupportedOperationException("Operation not supported!");
-    }
-
-
-    @Override
-    public void apply () {
-        List<AuditRecord> rcs = getRecordsToSave();
-        try {
-            for (AuditRecord r : rcs)
-                stream.write((r.toString() + "\n").getBytes());
-        }
-        catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-
-    @Override
-    public void finish () {
-        try {
-            stream.flush();
-            stream.close();
-        }
-        catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-}
diff --git a/full/src/main/java/de/ids_mannheim/korap/server/KustvaktLiteServer.java b/full/src/main/java/de/ids_mannheim/korap/server/KustvaktLiteServer.java
index 0a733a0..e229cfe 100644
--- a/full/src/main/java/de/ids_mannheim/korap/server/KustvaktLiteServer.java
+++ b/full/src/main/java/de/ids_mannheim/korap/server/KustvaktLiteServer.java
@@ -32,7 +32,7 @@
         config = new KustvaktConfiguration();
         config.loadBasicProperties(properties);
 
-        springConfig =  "lite-config.xml";
+        springConfig =  "default-lite-config.xml";
         
         rootPackages = "de.ids_mannheim.korap.core.web; "
                 + "de.ids_mannheim.korap.web.filter; "
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/CoreResponseHandler.java b/full/src/main/java/de/ids_mannheim/korap/web/CoreResponseHandler.java
index a94d0b3..b0553d6 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/CoreResponseHandler.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/CoreResponseHandler.java
@@ -1,14 +1,10 @@
 package de.ids_mannheim.korap.web;
 
-import java.util.List;
-
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.Response;
 
-import de.ids_mannheim.korap.auditing.AuditRecord;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.exceptions.StatusCodes;
-import de.ids_mannheim.korap.interfaces.db.AuditingIface;
 import de.ids_mannheim.korap.response.Notifications;
 
 /**
@@ -18,20 +14,6 @@
  */
 public class CoreResponseHandler {
 
-    private AuditingIface auditing;
-
-    public CoreResponseHandler (AuditingIface iface) {
-        this.auditing = iface;
-    }
-
-    private void register (List<AuditRecord> records) {
-        if (auditing != null && !records.isEmpty())
-            auditing.audit(records);
-        else if (auditing == null)
-            throw new RuntimeException("Auditing handler must be set!");
-    }
-
-
     public WebApplicationException throwit (KustvaktException e) {
         Response s;
         if (e.hasNotification()) {
@@ -70,7 +52,6 @@
     }
 
     protected String buildNotification (KustvaktException e) {
-        register(e.getRecords());
         return buildNotification(e.getStatusCode(), e.getMessage(),
                 e.getEntity());
     }
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/KustvaktResponseHandler.java b/full/src/main/java/de/ids_mannheim/korap/web/KustvaktResponseHandler.java
index 8a7e2f3..6fe0cc1 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/KustvaktResponseHandler.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/KustvaktResponseHandler.java
@@ -10,7 +10,6 @@
 import de.ids_mannheim.korap.constant.AuthenticationScheme;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.exceptions.StatusCodes;
-import de.ids_mannheim.korap.interfaces.db.AuditingIface;
 
 /**
  * KustvaktResponseHandler includes exceptions regarding
@@ -21,10 +20,6 @@
  */
 public class KustvaktResponseHandler extends CoreResponseHandler {
 
-    public KustvaktResponseHandler (AuditingIface iface) {
-        super(iface);
-    }
-
     @Override
     public WebApplicationException throwit (KustvaktException e) {
         Response r;
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/OAuth2ResponseHandler.java b/full/src/main/java/de/ids_mannheim/korap/web/OAuth2ResponseHandler.java
index 2b2dd8e..a1f7c67 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/OAuth2ResponseHandler.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/OAuth2ResponseHandler.java
@@ -18,7 +18,6 @@
 
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.exceptions.StatusCodes;
-import de.ids_mannheim.korap.interfaces.db.AuditingIface;
 import de.ids_mannheim.korap.oauth2.constant.OAuth2Error;
 
 /**
@@ -38,10 +37,6 @@
  */
 public class OAuth2ResponseHandler extends KustvaktResponseHandler {
 
-    public OAuth2ResponseHandler (AuditingIface iface) {
-        super(iface);
-    }
-
     public WebApplicationException throwit (OAuthSystemException e) {
         return throwit(StatusCodes.OAUTH2_SYSTEM_ERROR, e.getMessage());
     }
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/OpenIdResponseHandler.java b/full/src/main/java/de/ids_mannheim/korap/web/OpenIdResponseHandler.java
index ce467a8..3cf7d1c 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/OpenIdResponseHandler.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/OpenIdResponseHandler.java
@@ -23,7 +23,6 @@
 import com.nimbusds.openid.connect.sdk.AuthenticationErrorResponse;
 
 import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.interfaces.db.AuditingIface;
 import de.ids_mannheim.korap.oauth2.constant.OAuth2Error;
 import net.minidev.json.JSONObject;
 
@@ -69,10 +68,6 @@
                 BearerTokenError.INVALID_REQUEST);
     }
 
-    public OpenIdResponseHandler (AuditingIface iface) {
-        super(iface);
-    }
-
     /**
      * According to OpenID connect core 1.0 specification, all
      * authentication errors must be represented through
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/AdminController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/AdminController.java
deleted file mode 100644
index f3dac49..0000000
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/AdminController.java
+++ /dev/null
@@ -1,172 +0,0 @@
-package de.ids_mannheim.korap.web.controller;
-
-import java.util.Locale;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.joda.time.DateTime;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-
-import de.ids_mannheim.korap.web.utils.ResourceFilters;
-
-import de.ids_mannheim.korap.auditing.AuditRecord;
-import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.exceptions.StatusCodes;
-import de.ids_mannheim.korap.interfaces.db.AuditingIface;
-import de.ids_mannheim.korap.utils.JsonUtils;
-import de.ids_mannheim.korap.utils.TimeUtils;
-import de.ids_mannheim.korap.web.KustvaktResponseHandler;
-import de.ids_mannheim.korap.web.filter.APIVersionFilter;
-import de.ids_mannheim.korap.web.filter.AdminFilter;
-import de.ids_mannheim.korap.web.filter.PiwikFilter;
-
-/**
- * @author hanl, margaretha 
- * Created date 6/11/14. 
- * Last update: 08/11/2017
- * Last changes:
- *  - removed DocumentDao (EM)
- *  - added API version filter (EM)
- */
-@Deprecated
-@Controller
-@Path("/v0.1/admin")
-@ResourceFilters({APIVersionFilter.class, AdminFilter.class, PiwikFilter.class })
-@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
-public class AdminController {
-
-    private static Logger jlog = LogManager.getLogger(AdminController.class);
-    @Autowired
-    private AuditingIface auditingController;
-
-    @Autowired
-    private KustvaktResponseHandler kustvaktResponseHandler;
-
-    // EM: not documented and tested, not sure what the purpose of the service is
-    @GET
-    @Path("audit/{type}")
-    public Response getAudits (@PathParam("type") String type,
-            @QueryParam("from") String from, @QueryParam("until") String until,
-            @QueryParam("day") Boolean day, @QueryParam("limit") String limit,
-            @Context Locale locale) {
-        DateTime from_date, until_date;
-
-        if (from == null)
-            from_date = TimeUtils.getNow();
-        else
-            from_date = TimeUtils.getTime(from);
-        if (until == null)
-            until_date = TimeUtils.getNow();
-        else
-            until_date = TimeUtils.getTime(until);
-
-        int integer_limit;
-        boolean dayOnly = Boolean.valueOf(day);
-        try {
-            integer_limit = Integer.valueOf(limit);
-        }
-        catch (NumberFormatException | NullPointerException e) {
-            throw kustvaktResponseHandler.throwit(StatusCodes.ILLEGAL_ARGUMENT);
-        }
-        String result="";
-        try {
-            result = JsonUtils.toJSON(auditingController.retrieveRecords(
-                    AuditRecord.CATEGORY.valueOf(type.toUpperCase()), from_date,
-                    until_date, dayOnly, integer_limit));
-        }
-        catch (KustvaktException e) {
-            throw kustvaktResponseHandler.throwit(e);
-        }
-        // limit number of records to return
-        return Response.ok(result).build();
-    }
-
-
-//    @Deprecated
-//    @POST
-//    @Path("createPolicies/{id}")
-//    public Response addResourcePolicy (@PathParam("id") String persistentid,
-//            @QueryParam("type") String type, @QueryParam("name") String name,
-//            @QueryParam("description") String description,
-//            @QueryParam("group") String group,
-//            @QueryParam("perm") List<String> permissions,
-//            @QueryParam("loc") String loc,
-//            @QueryParam("expire") String duration, @Context HttpContext context)
-//            throws KustvaktException {
-//
-//        if (type == null | type.isEmpty()) {
-//            KustvaktException e = new KustvaktException(
-//                    StatusCodes.MISSING_ARGUMENT,
-//                    "The value of parameter type is missing.");
-//            throw kustvaktResponseHandler.throwit(e);
-//        }
-//        else if (name == null | name.isEmpty()) {
-//            KustvaktException e = new KustvaktException(
-//                    StatusCodes.MISSING_ARGUMENT,
-//                    "The value of parameter name is missing.");
-//            throw kustvaktResponseHandler.throwit(e);
-//        }
-//        else if (description == null | description.isEmpty()) {
-//            KustvaktException e = new KustvaktException(
-//                    StatusCodes.MISSING_ARGUMENT,
-//                    "The value of parameter description is missing.");
-//            throw kustvaktResponseHandler.throwit(e);
-//        }
-//        else if (group == null | group.isEmpty()) {
-//            KustvaktException e = new KustvaktException(
-//                    StatusCodes.MISSING_ARGUMENT,
-//                    "The value of parameter group is missing.");
-//            throw kustvaktResponseHandler.throwit(e);
-//        }
-//        else if (permissions == null | permissions.isEmpty()) {
-//            KustvaktException e = new KustvaktException(
-//                    StatusCodes.MISSING_ARGUMENT,
-//                    "The value of parameter permissions is missing.");
-//            throw kustvaktResponseHandler.throwit(e);
-//        }
-//
-//
-//        try {
-//            KustvaktResource resource = ResourceFactory.getResource(type);
-//            resource.setPersistentID(persistentid);
-//            resource.setDescription(description);
-//            resource.setName(name);
-//
-//            Permissions.Permission[] p = Permissions
-//                    .read(permissions.toArray(new String[0]));
-//
-//            User user = (User) context.getProperties().get("user");
-//
-//            PolicyBuilder pb = new PolicyBuilder(user)
-//                    .setConditions(new PolicyCondition(group))
-//                    .setResources(resource);
-//
-//            if (loc != null && !loc.isEmpty()){
-//                pb.setLocation(loc);
-//            }
-//            if (duration != null && !duration.isEmpty()){
-//                long now = TimeUtils.getNow().getMillis();
-//                pb.setContext(now,
-//                        now + TimeUtils.convertTimeToSeconds(duration));
-//            }
-//            pb.setPermissions(p);
-//            pb.create();
-//        }
-//        catch (KustvaktException e) {
-//            throw kustvaktResponseHandler.throwit(e);
-//        }
-//
-//        return Response.ok().build();
-//    }
-
-}
diff --git a/full/src/main/resources/basic-config.xml b/full/src/main/resources/basic-config.xml
index 643a129..2ba0d1a 100644
--- a/full/src/main/resources/basic-config.xml
+++ b/full/src/main/resources/basic-config.xml
@@ -214,17 +214,11 @@
 		<constructor-arg ref="rewriteTasks"/>
 	</bean>
 
-	<bean id="kustvakt_auditing" class="de.ids_mannheim.korap.handlers.JDBCAuditing">
-		<constructor-arg ref="kustvakt_db" />
-	</bean>
-
 	<bean id="kustvaktResponseHandler" class="de.ids_mannheim.korap.web.KustvaktResponseHandler">
-		<constructor-arg index="0" name="iface" ref="kustvakt_auditing" />
 	</bean>
 
 	<!-- OAuth -->
 	<bean id="oauth2ResponseHandler" class="de.ids_mannheim.korap.web.OAuth2ResponseHandler">
-		<constructor-arg index="0" name="iface" ref="kustvakt_auditing" />
 	</bean>
 
 	<bean id="mdGenerator" class="org.apache.oltu.oauth2.as.issuer.MD5Generator">
@@ -300,8 +294,6 @@
 		<constructor-arg type="de.ids_mannheim.korap.interfaces.EncryptionIface"
 			ref="kustvakt_encryption" />
 		<constructor-arg ref="kustvakt_config" />
-		<constructor-arg type="de.ids_mannheim.korap.interfaces.db.AuditingIface"
-			ref="kustvakt_auditing" />
 		<constructor-arg ref="kustvakt_userdata" />
 		<!-- inject authentication providers to use -->
 		<property name="providers" ref="kustvakt_authproviders" />
diff --git a/full/src/main/resources/default-config.xml b/full/src/main/resources/default-config.xml
index f1fa31f..491dcdb 100644
--- a/full/src/main/resources/default-config.xml
+++ b/full/src/main/resources/default-config.xml
@@ -241,17 +241,11 @@
 		<constructor-arg ref="rewriteTasks"/>
 	</bean>
 
-	<bean id="kustvakt_auditing" class="de.ids_mannheim.korap.handlers.JDBCAuditing">
-		<constructor-arg ref="kustvakt_db" />
-	</bean>
-
 	<bean id="kustvaktResponseHandler" class="de.ids_mannheim.korap.web.KustvaktResponseHandler">
-		<constructor-arg index="0" name="iface" ref="kustvakt_auditing" />
 	</bean>
 
 	<!-- OAuth -->
 	<bean id="oauth2ResponseHandler" class="de.ids_mannheim.korap.web.OAuth2ResponseHandler">
-		<constructor-arg index="0" name="iface" ref="kustvakt_auditing" />
 	</bean>
 
 	<bean id="mdGenerator" class="org.apache.oltu.oauth2.as.issuer.MD5Generator">
@@ -319,8 +313,6 @@
 		<constructor-arg type="de.ids_mannheim.korap.interfaces.EncryptionIface"
 			ref="kustvakt_encryption" />
 		<constructor-arg ref="kustvakt_config" />
-		<constructor-arg type="de.ids_mannheim.korap.interfaces.db.AuditingIface"
-			ref="kustvakt_auditing" />
 		<constructor-arg ref="kustvakt_userdata" />
 		<!-- inject authentication providers to use -->
 		<property name="providers" ref="kustvakt_authproviders" />
diff --git a/full/src/main/resources/lite-config.xml b/full/src/main/resources/default-lite-config.xml
similarity index 97%
rename from full/src/main/resources/lite-config.xml
rename to full/src/main/resources/default-lite-config.xml
index 5c9b8ff..c4cdd96 100644
--- a/full/src/main/resources/lite-config.xml
+++ b/full/src/main/resources/default-lite-config.xml
@@ -152,7 +152,6 @@
 
 	<!-- Response handler -->
 	<bean id="kustvaktResponseHandler" class="de.ids_mannheim.korap.web.KustvaktResponseHandler">
-		<constructor-arg index="0" name="iface" ref="kustvakt_auditing" />
 	</bean>
 
 	<!-- Controllers -->
@@ -185,11 +184,4 @@
 	<bean id="rewriteHandler" class="de.ids_mannheim.korap.rewrite.RewriteHandler">
 		<constructor-arg ref="rewriteTasks" />
 	</bean>
-
-
-
-	<bean id="kustvakt_auditing"
-		class="de.ids_mannheim.korap.interfaces.defaults.DefaultAuditing">
-	</bean>
-
 </beans>
\ No newline at end of file
diff --git a/full/src/test/java/de/ids_mannheim/korap/misc/ClassLoaderTest.java b/full/src/test/java/de/ids_mannheim/korap/misc/ClassLoaderTest.java
deleted file mode 100644
index 9523bf6..0000000
--- a/full/src/test/java/de/ids_mannheim/korap/misc/ClassLoaderTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package de.ids_mannheim.korap.misc;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import de.ids_mannheim.korap.config.ContextHolder;
-import de.ids_mannheim.korap.config.DefaultHandler;
-import de.ids_mannheim.korap.config.SpringJerseyTest;
-import de.ids_mannheim.korap.handlers.JDBCAuditing;
-import de.ids_mannheim.korap.interfaces.db.AuditingIface;
-
-/**
- * @author hanl
- * @date 27/07/2015
- */
-public class ClassLoaderTest extends SpringJerseyTest {
-
-    @Autowired
-    AuditingIface audit;
-    
-    @Test
-    public void testDefaultCreationThrowsNoException () {
-        DefaultHandler pl = new DefaultHandler();
-        Object o = pl.getDefault(ContextHolder.KUSTVAKT_AUDITING);
-        assertNotNull(o);
-        assertTrue(o instanceof AuditingIface);
-    }
-
-    @Test
-    public void testDefaultInterfaceMatchThrowsNoException () {
-        assertNotNull(audit);
-        assertTrue(audit instanceof JDBCAuditing);
-    }
-}
diff --git a/full/src/test/java/de/ids_mannheim/korap/misc/FileAuditingTest.java b/full/src/test/java/de/ids_mannheim/korap/misc/FileAuditingTest.java
deleted file mode 100644
index 4fc673b..0000000
--- a/full/src/test/java/de/ids_mannheim/korap/misc/FileAuditingTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package de.ids_mannheim.korap.misc;
-
-import java.util.Date;
-
-import org.joda.time.LocalDate;
-import org.junit.Test;
-
-import de.ids_mannheim.korap.auditing.AuditRecord;
-import de.ids_mannheim.korap.exceptions.StatusCodes;
-import de.ids_mannheim.korap.interfaces.db.AuditingIface;
-import de.ids_mannheim.korap.interfaces.defaults.DefaultAuditing;
-
-/**
- * @author hanl
- * @date 27/07/2015
- */
-// todo: test audit commit in thread and that no concurrency issue
-// arrises
-public class FileAuditingTest {
-
-    @Test
-    public void testAdd () {
-        AuditingIface auditor = new DefaultAuditing();
-        for (int i = 0; i < 20; i++) {
-            AuditRecord record = AuditRecord.serviceRecord("MichaelHanl",
-                    StatusCodes.ILLEGAL_ARGUMENT, String.valueOf(i),
-                    "string value");
-            auditor.audit(record);
-        }
-    }
-
-    @Test(expected = UnsupportedOperationException.class)
-    public void testRetrieval () {
-        AuditingIface auditor = new DefaultAuditing();
-        auditor.retrieveRecords(new LocalDate(new Date().getTime()), 10);
-    }
-
-}
diff --git a/full/src/test/resources/test-config-icc.xml b/full/src/test/resources/test-config-icc.xml
index 1ff9ed0..072f5ff 100644
--- a/full/src/test/resources/test-config-icc.xml
+++ b/full/src/test/resources/test-config-icc.xml
@@ -227,17 +227,11 @@
 		<constructor-arg ref="rewriteTasks"/>
 	</bean>
 
-	<bean id="kustvakt_auditing" class="de.ids_mannheim.korap.handlers.JDBCAuditing">
-		<constructor-arg ref="kustvakt_db" />
-	</bean>
-
 	<bean id="kustvaktResponseHandler" class="de.ids_mannheim.korap.web.KustvaktResponseHandler">
-		<constructor-arg index="0" name="iface" ref="kustvakt_auditing" />
 	</bean>
 
 	<!-- OAuth -->
 	<bean id="oauth2ResponseHandler" class="de.ids_mannheim.korap.web.OAuth2ResponseHandler">
-		<constructor-arg index="0" name="iface" ref="kustvakt_auditing" />
 	</bean>
 
 	<bean id="mdGenerator" class="org.apache.oltu.oauth2.as.issuer.MD5Generator">
@@ -291,8 +285,6 @@
 		<constructor-arg type="de.ids_mannheim.korap.interfaces.EncryptionIface"
 			ref="kustvakt_encryption" />
 		<constructor-arg ref="kustvakt_config" />
-		<constructor-arg type="de.ids_mannheim.korap.interfaces.db.AuditingIface"
-			ref="kustvakt_auditing" />
 		<constructor-arg ref="kustvakt_userdata" />
 		<!-- inject authentication providers to use -->
 		<property name="providers" ref="kustvakt_authproviders" />
diff --git a/full/src/test/resources/test-config-lite.xml b/full/src/test/resources/test-config-lite.xml
index 46f46a2..7174998 100644
--- a/full/src/test/resources/test-config-lite.xml
+++ b/full/src/test/resources/test-config-lite.xml
@@ -142,7 +142,6 @@
 
 	<!-- Response handler -->
 	<bean id="kustvaktResponseHandler" class="de.ids_mannheim.korap.web.KustvaktResponseHandler">
-		<constructor-arg index="0" name="iface" ref="kustvakt_auditing" />
 	</bean>
 
 	<!-- Controllers -->
@@ -175,12 +174,4 @@
 	<bean id="rewriteHandler" class="de.ids_mannheim.korap.rewrite.RewriteHandler">
 		<constructor-arg ref="rewriteTasks" />
 	</bean>
-
-
-
-
-	<bean id="kustvakt_auditing"
-		class="de.ids_mannheim.korap.interfaces.defaults.DefaultAuditing">
-	</bean>
-
 </beans>
\ No newline at end of file
diff --git a/full/src/test/resources/test-config.xml b/full/src/test/resources/test-config.xml
index 84ba875..d86cb8d 100644
--- a/full/src/test/resources/test-config.xml
+++ b/full/src/test/resources/test-config.xml
@@ -223,17 +223,11 @@
 		<constructor-arg ref="rewriteTasks"/>
 	</bean>
 
-	<bean id="kustvakt_auditing" class="de.ids_mannheim.korap.handlers.JDBCAuditing">
-		<constructor-arg ref="kustvakt_db" />
-	</bean>
-
 	<bean id="kustvaktResponseHandler" class="de.ids_mannheim.korap.web.KustvaktResponseHandler">
-		<constructor-arg index="0" name="iface" ref="kustvakt_auditing" />
 	</bean>
 
 	<!-- OAuth -->
 	<bean id="oauth2ResponseHandler" class="de.ids_mannheim.korap.web.OAuth2ResponseHandler">
-		<constructor-arg index="0" name="iface" ref="kustvakt_auditing" />
 	</bean>
 
 	<bean id="mdGenerator" class="org.apache.oltu.oauth2.as.issuer.MD5Generator">
@@ -306,8 +300,6 @@
 		<constructor-arg type="de.ids_mannheim.korap.interfaces.EncryptionIface"
 			ref="kustvakt_encryption" />
 		<constructor-arg ref="kustvakt_config" />
-		<constructor-arg type="de.ids_mannheim.korap.interfaces.db.AuditingIface"
-			ref="kustvakt_auditing" />
 		<constructor-arg ref="kustvakt_userdata" />
 		<!-- inject authentication providers to use -->
 		<property name="providers" ref="kustvakt_authproviders" />