-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swagger-UI #10645
Comments
Hi @HKowi Have you restarted the thingsboard service after making the changes to thingsboard.conf or thingsboard.yml files. Please remember that after each change to these files, you need to restart the service to apply the new parameters. |
Hi, yes. This has become second nature to restart processes. I tried "restart" and "stop"/"start". Makes no difference at all. I tried other params as test, and they get applied though. |
@HKowi please share your thingsboard.conf, thingsboard.yml files and a screenshot of the http://localhost:8080/swagger-ui/ page. |
Sure: Copyright © 2016-2023 The Thingsboard AuthorsLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.server: Server bind addressaddress: "${HTTP_BIND_ADDRESS:0.0.0.0}" Server bind portport: "${HTTP_BIND_PORT:8080}" Server forward headers strategyforward_headers_strategy: "${HTTP_FORWARD_HEADERS_STRATEGY:NONE}" Server SSL configurationssl: HTTP/2 support (takes effect only if server SSL is enabled)http2: Application infoapp: Application versionversion: "3.4.4" Zookeeper connection parameters. Used for service discovery.zk: Enable/disable zookeeper discovery service.enabled: "${ZOOKEEPER_ENABLED:false}" Zookeeper connect stringurl: "${ZOOKEEPER_URL:localhost:2181}" Zookeeper retry interval in millisecondsretry_interval_ms: "${ZOOKEEPER_RETRY_INTERVAL_MS:3000}" Zookeeper connection timeout in millisecondsconnection_timeout_ms: "${ZOOKEEPER_CONNECTION_TIMEOUT_MS:3000}" Zookeeper session timeout in millisecondssession_timeout_ms: "${ZOOKEEPER_SESSION_TIMEOUT_MS:3000}" Name of the directory in zookeeper 'filesystem'zk_dir: "${ZOOKEEPER_NODES_DIR:/thingsboard}" cluster: Plugins configuration parametersplugins: Comma separated package list used during classpath scanning for pluginsscan_packages: "${PLUGINS_SCAN_PACKAGES:org.thingsboard.server.extensions,org.thingsboard.rule.engine}" Security parameterssecurity: JWT Token parametersjwt: # Since 3.4.2 values are persisted to the database during install or upgrade. On Install, the key will be generated randomly if no custom value set. You can change it later from Web UI under SYS_ADMIN Enable/disable access to Tenant Administrators JWT token by System Administrator or Customer Users JWT token by Tenant Administratoruser_token_access_enabled: "${SECURITY_USER_TOKEN_ACCESS_ENABLED:true}" Enable/disable case-sensitive username loginuser_login_case_sensitive: "${SECURITY_USER_LOGIN_CASE_SENSITIVE:true}" Usage statistics parametersusage: UI parametersui: Dashboard parametersdashboard: Help parametershelp: database: Cassandra driver configuration parameterscassandra: Thingsboard cluster namecluster_name: "${CASSANDRA_CLUSTER_NAME:Thingsboard Cluster}" Thingsboard keyspace namekeyspace_name: "${CASSANDRA_KEYSPACE_NAME:thingsboard}" Specify node listurl: "${CASSANDRA_URL:127.0.0.1:9042}" Specify local datacenter namelocal_datacenter: "${CASSANDRA_LOCAL_DATACENTER:datacenter1}" Enable/disable JMXjmx: "${CASSANDRA_USE_JMX:false}" Enable/disable metrics collection.metrics: "${CASSANDRA_USE_METRICS:false}" NONE SNAPPY LZ4compression: "${CASSANDRA_COMPRESSION:none}" Specify cassandra cluster initialization timeout in milliseconds (if no hosts available during startup)init_timeout_ms: "${CASSANDRA_CLUSTER_INIT_TIMEOUT_MS:300000}" Specify cassandra claster initialization retry interval (if no hosts available during startup)init_retry_interval_ms: "${CASSANDRA_CLUSTER_INIT_RETRY_INTERVAL_MS:3000}" Credential parameterscredentials: "${CASSANDRA_USE_CREDENTIALS:false}" Specify your usernameusername: "${CASSANDRA_USERNAME:}" Specify your passwordpassword: "${CASSANDRA_PASSWORD:}" Astra DB connect https://astra.datastax.com/cloud: Cassandra cluster connection socket parameterssocket: Cassandra cluster connection query parametersquery: SQL configuration parameterssql: Specify batch size for persisting attribute updatesattributes: Specify whether to sort entities before batch update. Should be enabled for cluster mode to avoid deadlocksbatch_sort: "${SQL_BATCH_SORT:true}" Specify whether to remove null characters from strValue of attributes and timeseries before insertremove_null_chars: "${SQL_REMOVE_NULL_CHARS:true}" Specify whether to log database queries and their parameters generated by entity query repositorylog_queries: "${SQL_LOG_QUERIES:false}" Actor system parametersactors: cache: caffeine or redistype: "${CACHE_TYPE:caffeine}" #Disable this because it is not required. redis: standalone or clusterconnection: db indexdb: "${REDIS_DB:0}" db passwordpassword: "${REDIS_PASSWORD:}" pool configpool_config: TTL for short-living SET commands that are used to replace DEL in order to enable transaction supportevictTtlInMs: "${REDIS_EVICT_TTL_MS:60000}" Check new version updates parametersupdates: Enable/disable updates checking.enabled: "${UPDATES_ENABLED:true}" spring.main.allow-circular-references: "true" spring freemarker configurationspring.freemarker.checkTemplateLocation: "false" spring CORS configurationspring.mvc.cors: The default timeout for asynchronous requests in millisecondsspring.mvc.async.request-timeout: "${SPRING_MVC_ASYNC_REQUEST_TIMEOUT:30000}" For endpoints matching in Swaggerspring.mvc.pathmatch.matching-strategy: "ANT_PATH_MATCHER" spring serve gzip compressed static resourcesspring.resources.chain: spring.servlet.multipart.max-file-size: "50MB" spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation: "true" Note: as for current Spring JPA version, custom NullHandling for the Sort.Order is ignored and this parameter is usedspring.jpa.properties.hibernate.order_by.default_null_ordering: "${SPRING_JPA_PROPERTIES_HIBERNATE_ORDER_BY_DEFAULT_NULL_ORDERING:last}" SQL DAO Configurationspring: Audit log parametersaudit-log: Enable/disable audit log functionality.enabled: "${AUDIT_LOG_ENABLED:true}" Logging levels per each entity type.Allowed values: OFF (disable), W (log write operations), RW (log read and write operations)logging-level: state: Should be greater then transport.sessions.report_timeoutdefaultInactivityTimeoutInSec: "${DEFAULT_INACTIVITY_TIMEOUT:600}" tbel: Maximum allowed TBEL script execution memorymax_memory_limit_mb: "${TBEL_MAX_MEMORY_LIMIT_MB: 8}" Maximum allowed TBEL script execution errors before it will be blacklistedmax_errors: "${TBEL_MAX_ERRORS:3}" TBEL Eval max request timeout in milliseconds. 0 - no timeoutmax_requests_timeout: "${TBEL_MAX_REQUEST_TIMEOUT:500}" Maximum time in seconds for black listed function to stay in the list.max_black_list_duration_sec: "${TBEL_MAX_BLACKLIST_DURATION_SEC:60}" Specify thread pool size for javascript executor servicethread_pool_size: "${TBEL_THREAD_POOL_SIZE:50}" js: Built-in JVM JavaScript environment propertieslocal: Remote JavaScript environment propertiesremote: transport: Enable/disable http/mqtt/coap transport protocols (has higher priority than certain protocol's 'enabled' property)api_enabled: "${TB_TRANSPORT_API_ENABLED:true}" Local HTTP transport parametershttp: Local MQTT transport parametersmqtt: Local CoAP transport parameterscoap: Local LwM2M transport parameterslwm2m: - key: "PROTOCOL_STAGE_THREAD_COUNT"value: "${LWM2M_PROTOCOL_STAGE_THREAD_COUNT:4}"snmp: Edges parametersedges: swagger: queue: event: service: Unique id for this service (autogenerated if empty)id: "${TB_SERVICE_ID:}" metrics: Enable/disable actuator metrics.enabled: "${METRICS_ENABLED:false}" vc: Pool size for handling export tasksthread_pool_size: "${TB_VC_POOL_SIZE:2}" management: ========================================================= Copyright © 2016-2023 The Thingsboard AuthorsLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.export JAVA_OPTS="$JAVA_OPTS -Dplatform=deb -Dinstall.data_dir=/usr/share/thingsboard/data" DB Configurationexport DATABASE_TS_TYPE=sql Specify partitioning size for timestamp key-value storage. Allowed values: DAYS, MONTHS, YEARS, INDEFINITE.export SQL_POSTGRES_TS_KV_PARTITIONING=MONTHS export JAVA_OPTS="$JAVA_OPTS -Xms256M -Xmx256M" export SWAGGER_ENABLED=false MQTTS Configurationexport MQTT_SSL_ENABLED=true export SSL_ENABLED=false export HTTP_BIND_PORT=8080 #SECURITY_USER_LOGIN_CASE_SENSITIVE=false |
I did some try and error and it appears he function works from v3.6.0 onwards. This was not mentioned with the online documentation. Can you confirm? |
Hi! |
Component
Description
Switch to disable API on swagger-ui is not working
Environment
Linux
any TB version (CE/PW)
I am trying to disable the swagger-ui site for security reasons (recon on version etc). The website "https://thingsboard.io/docs/user-guide/install/config/" mentions params "swagger.enabled/SWAGGER_ENABLED" to be set to false.
I tried both versions (YAML: swagger.enabled: "${SWAGGER_ENABLED:false}" and CONF: export SWAGGER_ENABLED=false) which has no effect.
Can I disable that page anyway?
Thanks
Horst
The text was updated successfully, but these errors were encountered: