Role management library with resource scoping