The origin of much contention in contemporary politics is the presence of discrimination of protected attributes. For instance, affirmative action, insurance or credit provision via models for individual default rates, and equal pay for women are hot-button topics in many countries.
Obviously, discrimination in it of itself is in some sense acceptable when applied to certain attributes: when hiring a nurse, for instance, one would be found reasonable in hiring a candidate who comes off as caring as opposed to one that believes cruelty is good for children. Borrowing the language from the answer by @NanheeByrnesPhD in this question, there appears to be a delineation between basic and non-basic rights derived from absolute and proportional notions of justice, respectively.
We define a protected attribute as an attribute of an individual such that anyone's basic rights should be invariant to changes in that protected attribute. Let a delineation be a partition of attributes into protected or unprotected attributes (more broadly, a partition of domains covered by absolute or proportional notions of justice).
Given that a slightly different delineation may result in greatly different social policy, it seems that we should have a solid answer for what constitutes a protected attribute. The linked answer gives a descriptive explanation for the delineation above (calling such a delineation "circumstantial"). Indeed, as mentioned in the answer, one hundred years ago gender was not protected, yet now it is. However, it seems unsatisfactory to let protected attributes be merely what society deems should be protected at the time. Have any foundational principles from which we can assess or construct a delineation been studied? Are any widely accepted (by philosophers at least)?