[SPARK-23476][CORE] Generate secret in local mode when authentication on