XD-2235 Allow for 'security.basic.realm' to control the security realm

This is a minor fix, but without it, the realm will always default to null