In the Snowden movies I watched today, U.S. generals and spooks are concerned with being prepared for any fork in the timeline (e.g., they install malware on critical Japanese infrastructure in case one day Japan is no longer an ally).
Gandalf has the same attitude in The Hobbit, at least in the movie version. He wants to help the dwarves take back Erebor in case The Enemy returns: a dragon would be a powerful ally to such an adversary. Gandalf expresses this sentiment exactly.
I suppose Gandalf is a security consultant when you get right down to his job functions. Attached to no one organization or state actor, he articulates geopolitical narratives to state officials, presses for overarching strategies and particular courses of action, applies proprietary technology (magic) in intractable tactical situations, assembles groups of fighters or black operatives (the Fellowship!) to achieve the determined objectives...
Welcome to charmed.social, an instance of the free, open source, and decentralized microblogging network Mastodon.