Skip to content
Stand with Ukraine flag

Security Configuration

All parameters listed here correspond to settings in tb-edge.yml (or tb-edge.conf on Linux). Set them as environment variables in /etc/tb-edge/conf/tb-edge.conf (Linux) or as container environment variables (Docker / Kubernetes). For instructions on applying changes, see How to change configuration.

ParameterEnv variableDefaultDescription
security.jwt.tokenExpirationTimeJWT_TOKEN_EXPIRATION_TIME9000Number of seconds (2.5 hours)
security.jwt.refreshTokenExpTimeJWT_REFRESH_TOKEN_EXPIRATION_TIME604800Number of seconds (1 week).
security.jwt.tokenIssuerJWT_TOKEN_ISSUERthingsboard.ioUser JWT Token issuer
security.jwt.tokenSigningKeyJWT_TOKEN_SIGNING_KEYthingsboardDefaultSigningKeyBase64 encoded
security.user_token_access_enabledSECURITY_USER_TOKEN_ACCESS_ENABLEDtrueEnable/disable access to Tenant Administrators JWT token by System Administrator or Customer Users JWT token by Tenant Administrator
security.user_login_case_sensitiveSECURITY_USER_LOGIN_CASE_SENSITIVEtrueEnable/disable case-sensitive username login
security.claim.allowClaimingByDefaultSECURITY_CLAIM_ALLOW_CLAIMING_BY_DEFAULTtrueEnable/disable claiming devices; if false -> the device’s [claimingAllowed] SERVER_SCOPE attribute must be set to [true] to allow claiming the specific device
security.claim.durationSECURITY_CLAIM_DURATION864000001 minute, note this value must equal claimDevices.timeToLiveInMinutes value
security.basic.enabledSECURITY_BASIC_ENABLEDfalseEnable/Disable basic security options
security.oauth2.loginProcessingUrlSECURITY_OAUTH2_LOGIN_PROCESSING_URL/login/oauth2/code/Redirect URL where access code from external user management system will be processed
security.oauth2.githubMapper.emailUrlSECURITY_OAUTH2_GITHUB_MAPPER_EMAIL_URL_KEYhttps://api.github.com/user/emailsThe email addresses that will be mapped from the URL
security.java_cacerts.pathSECURITY_JAVA_CACERTS_PATH${java.home}/lib/security/cacertsCA certificates keystore default path. Typically this keystore is at JAVA_HOME/lib/security/cacerts
security.java_cacerts.passwordSECURITY_JAVA_CACERTS_PASSWORDchangeitThe password of the cacerts keystore file
ParameterEnv variableDefaultDescription
audit-log.enabledAUDIT_LOG_ENABLEDtrueEnable/disable audit log functionality.
audit-log.logging-level.mask."device"AUDIT_LOG_MASK_DEVICEWDevice logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
audit-log.logging-level.mask."asset"AUDIT_LOG_MASK_ASSETWAsset logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
audit-log.logging-level.mask."dashboard"AUDIT_LOG_MASK_DASHBOARDWDashboard logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
audit-log.logging-level.mask."widget_type"AUDIT_LOG_MASK_WIDGET_TYPEWWidget type logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
audit-log.logging-level.mask."widgets_bundle"AUDIT_LOG_MASK_WIDGETS_BUNDLEWWidget bundles logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
audit-log.logging-level.mask."customer"AUDIT_LOG_MASK_CUSTOMERWCustomer logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
audit-log.logging-level.mask."user"AUDIT_LOG_MASK_USERWUser logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
audit-log.logging-level.mask."rule_chain"AUDIT_LOG_MASK_RULE_CHAINWRule chain logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
audit-log.logging-level.mask."alarm"AUDIT_LOG_MASK_ALARMWAlarm logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
audit-log.logging-level.mask."entity_view"AUDIT_LOG_MASK_ENTITY_VIEWWEntity view logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
audit-log.logging-level.mask."device_profile"AUDIT_LOG_MASK_DEVICE_PROFILEWDevice profile logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
audit-log.logging-level.mask."asset_profile"AUDIT_LOG_MASK_ASSET_PROFILEWAsset profile logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
audit-log.logging-level.mask."edge"AUDIT_LOG_MASK_EDGEWEdge logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
audit-log.logging-level.mask."tb_resource"AUDIT_LOG_MASK_RESOURCEWTB resource logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
audit-log.logging-level.mask."ota_package"AUDIT_LOG_MASK_OTA_PACKAGEWOta package logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
audit-log.sink.typeAUDIT_LOG_SINK_TYPEnoneType of external sink. possible options: none, elasticsearch
audit-log.sink.index_patternAUDIT_LOG_SINK_INDEX_PATTERN@\{TENANT\}_AUDIT_LOG_@\{DATE\}Name of the index where audit logs are stored. Index name can contain placeholders: @\{TENANT\} — substituted by tenant ID; @\{DATE\} — substituted by current date in the format defined by audit_log.sink.date_format.
audit-log.sink.date_formatAUDIT_LOG_SINK_DATE_FORMATYYYY.MM.ddDate format. Details of the pattern can be found here: https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
audit-log.sink.scheme_nameAUDIT_LOG_SINK_SCHEME_NAMEhttphttp or https
audit-log.sink.hostAUDIT_LOG_SINK_HOSTlocalhostHost of external sink system
audit-log.sink.portAUDIT_LOG_SINK_PORT9200Port of external sink system
audit-log.sink.user_nameAUDIT_LOG_SINK_USER_NAME_(empty)_Username used to access external sink system
audit-log.sink.passwordAUDIT_LOG_SINK_PASSWORD_(empty)_Password used to access external sink system