  Time-Sensitive Networking (TSN) extends IEEE 802.1 Ethernet for
safety-critical and real-time applications in several areas, e.g., automotive,
aerospace or industrial automation. However, many of these systems also have
stringent security requirements, and security attacks may impair safety. Given
a TSN-based distributed architecture, a set of applications with tasks and
messages, as well as a set of security and redundancy requirements, we are
interested to synthesize a system configuration such that the real-time, safety
and security requirements are upheld. We use the Timed Efficient Stream
Loss-Tolerant Authentication (TESLA) low-resource multicast authentication
protocol to guarantee the security requirements, and redundant disjunct message
routes to tolerate link failures. We consider that tasks are dispatched using a
static cyclic schedule table and that the messages use the time-sensitive
traffic class in TSN, which relies on schedule tables (called Gate Control
Lists, GCLs) in the network switches. A configuration consists of the schedule
tables for tasks as well as the disjoint routes and GCLs for messages. We
propose a Constraint Programming-based formulation which can be used to find an
optimal solution with respect to our cost function. Additionally, we propose a
Simulated Annealing based metaheuristic, which can find good solution for large
test cases. We evaluate both approaches on several test cases.
