The DefaultVOMSTrustStore#loadLSCFromDirectory parses .lsc file is a loop and fails to initialize the trust store if a single file is broken:
LSCInfo info = null;
info = lscParser.parse(voName, hostname, lsc);
Set<LSCInfo> localLscForVo = localLSCInfo.get(voName);
if (localLscForVo == null) {
localLscForVo = new HashSet<LSCInfo>();
localLSCInfo.put(voName, localLscForVo);
}
localLscForVo.add(info);
listener.notifyLSCLoadEvent(info, lsc);
}
The correct behaviour should be ignoring the broken file (with an appropriate log message) and keeping the trust store functional:
try {
LSCInfo info = lscParser.parse(voName, hostname, lsc);
Set<LSCInfo> localLscForVo = localLSCInfo.get(voName);
if (localLscForVo == null) {
localLscForVo = new HashSet<LSCInfo>();
localLSCInfo.put(voName, localLscForVo);
}
localLscForVo.add(info);
listener.notifyLSCLoadEvent(info, lsc);
} catch (VOMSError e) {
// log the broken LSC file
}
}
See: dCache/dcache#7428
The
DefaultVOMSTrustStore#loadLSCFromDirectoryparses.lscfile is a loop and fails to initialize the trust store if a single file is broken:The correct behaviour should be ignoring the broken file (with an appropriate log message) and keeping the trust store functional:
See: dCache/dcache#7428