Lightweight framework for PAM