In accordance with moral or social standards; "that serves him right"; "do right by him".
With honesty; "he was rightly considered the greatest singer of his time".