A Distributed Intrusion Detection Approach for Secure Software Architecture