Fix auth not enabled #79
This commit is contained in:
parent
bda682b69e
commit
a24dd38bf8
@ -71,6 +71,11 @@ if [[ ! -z "${IGNORED_INTERFACES}" ]]; then
|
|||||||
JAVA_OPT="${JAVA_OPT} -Dnacos.inetutils.ignored-interfaces=${IGNORED_INTERFACES}"
|
JAVA_OPT="${JAVA_OPT} -Dnacos.inetutils.ignored-interfaces=${IGNORED_INTERFACES}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
### If turn on auth system:
|
||||||
|
if [[ ! -z "${NACOS_AUTH_ENABLE}" ]]; then
|
||||||
|
JAVA_OPT="${JAVA_OPT} -Dnacos.core.auth.enabled=${NACOS_AUTH_ENABLE}"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "${PREFER_HOST_MODE}" == "hostname" ]]; then
|
if [[ "${PREFER_HOST_MODE}" == "hostname" ]]; then
|
||||||
JAVA_OPT="${JAVA_OPT} -Dnacos.preferHostnameOverIp=true"
|
JAVA_OPT="${JAVA_OPT} -Dnacos.preferHostnameOverIp=true"
|
||||||
fi
|
fi
|
||||||
@ -80,7 +85,7 @@ if [[ "$JAVA_MAJOR_VERSION" -ge "9" ]] ; then
|
|||||||
JAVA_OPT="${JAVA_OPT} -cp .:${BASE_DIR}/plugins/cmdb/*.jar:${BASE_DIR}/plugins/mysql/*.jar"
|
JAVA_OPT="${JAVA_OPT} -cp .:${BASE_DIR}/plugins/cmdb/*.jar:${BASE_DIR}/plugins/mysql/*.jar"
|
||||||
JAVA_OPT="${JAVA_OPT} -Xlog:gc*:file=${BASE_DIR}/logs/nacos_gc.log:time,tags:filecount=10,filesize=102400"
|
JAVA_OPT="${JAVA_OPT} -Xlog:gc*:file=${BASE_DIR}/logs/nacos_gc.log:time,tags:filecount=10,filesize=102400"
|
||||||
else
|
else
|
||||||
JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${JAVA_HOME}/jre/lib/ext:${JAVA_HOME}/lib/ext:${BASE_DIR}/plugins/cmdb:${BASE_DIR}/plugins/mysql"
|
JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${JAVA_HOME}/jre/lib/ext:${JAVA_HOME}/lib/ext:${BASE_DIR}/plugins/health:${BASE_DIR}/plugins/cmdb:${BASE_DIR}/plugins/mysql"
|
||||||
JAVA_OPT="${JAVA_OPT} -Xloggc:${BASE_DIR}/logs/nacos_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
|
JAVA_OPT="${JAVA_OPT} -Xloggc:${BASE_DIR}/logs/nacos_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -15,8 +15,6 @@ db.password=${MYSQL_SERVICE_PASSWORD}
|
|||||||
### The auth system to use, currently only 'nacos' is supported:
|
### The auth system to use, currently only 'nacos' is supported:
|
||||||
nacos.core.auth.system.type=${NACOS_AUTH_SYSTEM_TYPE:nacos}
|
nacos.core.auth.system.type=${NACOS_AUTH_SYSTEM_TYPE:nacos}
|
||||||
|
|
||||||
### If turn on auth system:
|
|
||||||
nacos.core.auth.enabled=${NACOS_AUTH_ENABLE:false}
|
|
||||||
|
|
||||||
### The token expiration in seconds:
|
### The token expiration in seconds:
|
||||||
nacos.core.auth.default.token.expire.seconds=${NACOS_AUTH_TOKEN_EXPIRE_SECONDS:18000}
|
nacos.core.auth.default.token.expire.seconds=${NACOS_AUTH_TOKEN_EXPIRE_SECONDS:18000}
|
||||||
@ -33,8 +31,7 @@ server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D
|
|||||||
server.tomcat.basedir=
|
server.tomcat.basedir=
|
||||||
## spring security config
|
## spring security config
|
||||||
### turn off security
|
### turn off security
|
||||||
|
nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
|
||||||
nacos.security.ignore.urls=/,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/login,/v1/console/health/**,/v1/cs/**,/v1/ns/**,/v1/cmdb/**,/actuator/**,/v1/console/server/**
|
|
||||||
# metrics for elastic search
|
# metrics for elastic search
|
||||||
management.metrics.export.elastic.enabled=false
|
management.metrics.export.elastic.enabled=false
|
||||||
management.metrics.export.influx.enabled=false
|
management.metrics.export.influx.enabled=false
|
||||||
|
Loading…
Reference in New Issue
Block a user