A Constraint and Attribute Based Security Framework for Dynamic Role Assignment in Collaborative Environments