Many resource allocation problems can be formulated as a constrained maximization of a utility function. Network Utility Maximization (NUM) applies optimization techniques to achieve decomposition by duality or the primal-dual method. Several important problems, for example joint source rate control, routing, and scheduling design, can be optimized by using this framework. In this work, we introduce an important network security concept, "trust", into the NUM formulation and we integrate nodes' trust values in the optimization framework. These trust values are based on the interaction history between network entities and community based monitoring. Our objective is to avoid routing packets though paths with large percentage of malicious nodes. We also add end-to-end delay constraints for each of the traffic flows. The delay constraints are introduced to capture the imposed quality of service (QoS) requirements for each traffic flow.