A few guidelines we've given DD:
MOST strangers and people we don't know well are "kind". An overwhelming majority. (I really stress this with DD, and it seems to have helped prevent anxiety.) Only a few are "not kind." We have to be careful, though, because you can't tell if a stranger is "kind" by looking at them, so we use the same rules with EVERYBODY we don't know well. (This leads into discussions about accepting gifts, getting into cars, etc.)
Anytime you're with Mommy or Daddy, it's safe to interact with people you don't know. (DD telling a lady she likes her shirt, while holding Daddy's hand, for example. Totally safe.)
And though she hasn't yet linked the above stuff with the following subject, and doesn't know that the two topics could be related, we've also given her a keen sense of which parts of her body are private- we've stressed the "parts that are ONLY for you" angle, so that there's a sort of pride of ownership in the privacy, instead of wondering why those parts are so shameful they have to be secret.
Kind of a rambling answer, but these things combined have made for a four year old who is outgoing without being blindly trusting, and aware without being frightened.