 The writers had advisors who had worked within the government and  many of the stories were based on real situations. For example, in  episode #3.4 (The Moral Dimension) they go to an arab state where  alcohol is not allowed and so they set up a "communications room" in  the embassy where they keep a stash of booze so they could slip out  and have a drink. This really happened.