final Iterator iter = principals.iterator();
while (iter.hasNext()) {
final Object obj = iter.next();
// instanceof rejects nulls
if (obj instanceof GlobusPrincipal) {
final GlobusPrincipal gp = (GlobusPrincipal)obj;
final String name = gp.getName();
// ugh
if (name != null && name.equals("<anonymous>")) {
principals.remove(gp);
break;
}