Sort allegiances in sec metadata