Configuring device security