How to evolve authorization in your application lifecycle
Evolving resources and application roles
Backwards-compatible migration steps to change a resource or an application role are required to transition access to an API, UI, or domain object. |
By changing or restructuring access to resources, organization roles may have more or less privileges than originally intended. Proposal to successfully migrate a restricted API, UI, or domain object from resource A to B without problems:
Assume n is the software version before changing resources.
-
In application version n+1
-
Introduce new resource B (registration, authorization decisions).
-
Adapt application role privileges.
-
Allow access to an API, UI, or domain object by either new resource B or old resource A.
-
Document that an authorized person has to update all organization roles that currently allow access by resource A to also contain resource B before the next version upgrade.
-
-
In application version n+2
-
Allow access only by resource B (removing resource A from that API, UI, or domain object).
-
Remove resource A (as appropriate).
-
Document that resource A now ceases to function (if used in organization roles).
-
If any resources or roles are not used at all anymore, remove them in a setup step or at application startup — don’t just leave them "lying around".
-