DDF-211: Made security manager service optional.

Also added unit tests to verify.