BACKLOG-5239: Add ThreadLocal variable to get the current external session + Add external session variables map