The rapid proliferation of the Internet and the cost-effective growth of its key enabling technologies are revolutionizing information technology and creating unpredicted opportunities for developing large scale distributed applications. In this paper, an efficient method for managing security policies using XML and role-based access control are presented. The driving motivation of this research is to simplify security policy administration on web-based applications such as e-commerce. Moreover, a general procedure for web-based applications is described.