Software architecture plays a central role in developing software systems that satisfy functionality and security requirements. However, little has been done to integrate system design with security enforcement, which would otherwise benefits both development process and system’s quality of service (QoS). This paper proposes a formal method to integrate security administration into software architecture design. We use the Software Architecture Model (SAM), a general software architecture model combining Petri nets and temporal logic, as the underlying formalism. Several techniques for designing functionality of software architectures are presented. Security modeling and administration methods are proposed. As such, SAM serves as a common platform for modeling, design and analysis of secure software architectures.