security: Make getDefaultIdentity throw an exception if the default is not defined.