systemUserName = String.format("system_%s_%s_%d", hostname, state.getPid(), System.currentTimeMillis());
tableUserName = String.format("table_%s_%s_%d", hostname, state.getPid(), System.currentTimeMillis());
secTableName = String.format("security_%s_%s_%d", hostname, state.getPid(), System.currentTimeMillis());
byte[] sysUserPass = "sysUser".getBytes();
conn.securityOperations().createUser(systemUserName, sysUserPass, new Authorizations());
sysConn = instance.getConnector(systemUserName, sysUserPass);
SecurityHelper.setSystemConnector(state, sysConn);
SecurityHelper.setSysUserName(state, systemUserName);
SecurityHelper.setSysUserPass(state, sysUserPass);
SecurityHelper.setTableExists(state, false);
SecurityHelper.setTableExists(state, false);
SecurityHelper.setTabUserPass(state, new byte[0]);
SecurityHelper.setTableName(state, secTableName);
SecurityHelper.setTabUserName(state, tableUserName);
for (TablePermission tp : TablePermission.values()) {
SecurityHelper.setTabPerm(state, systemUserName, tp, false);
SecurityHelper.setTabPerm(state, tableUserName, tp, false);
}
for (SystemPermission sp : SystemPermission.values()) {
SecurityHelper.setSysPerm(state, systemUserName, sp, false);
SecurityHelper.setSysPerm(state, tableUserName, sp, false);
}
SecurityHelper.setUserAuths(state, tableUserName, new Authorizations());
SecurityHelper.setAuthsMap(state, new HashMap<String,Integer>());
}