Constraint-based Analysis of Security Properties