IoTDB 入门教程 企业篇④——安全控制 | 白名单、审计日志、登录日志和操作日志
创始人
2024-11-15 19:05:24
0

文章目录

  • 一、前文
  • 二、白名单
    • 2.1 配置文件iotdb-common.properties
    • 2.2 配置文件white.list
    • 2.3 注意事项
  • 三、审计日志
    • 3.1 Cli操作日志
    • 3.2 RESTful操作日志
    • 3.3 MQTT操作日志
    • 3.4 Java操作日志
    • 3.5 C#操作日志
    • 3.6 Python操作日志
  • 四、参考

一、前文

IoTDB入门教程——导读

IoTDB企业版(TimechoDB)请求试用+激活启动的操作步骤:IoTDB 入门教程 企业篇①——IoTDB企业版(TimechoDB)快速上手

二、白名单

需要修改两个配置文件

  • \conf\iotdb-common.properties
  • \conf\white.list

2.1 配置文件iotdb-common.properties

  • \conf\iotdb-common.properties配置文件中,默认不启用白名单功能
# whether enable white list # enable_white_list=false enable_white_list=true 

在这里插入图片描述

2.2 配置文件white.list

  • 将允许连接的IP地址写到\conf\white.list中。
  • 不在\conf\white.list中的IP地址,将无法连接到IoTDB服务。
# do not delete 127.0.0.1 of the local ip address. Otherwise, the local client cannot connect to the server after the whitelist is enabled 127.0.0.1  # support exact matching, each line has one ip address # 10.2.3.4  # * wildcard characters are supported, with one ip address per line # 10.*.1.3 

2.3 注意事项

  • 通过Session客户端修改白名单,会立即生效,并同步更新white.list磁盘文件。
  • 通过修改white.list磁盘文件,需要等待IoTDB服务轮询(1分钟内)到文件更改内容,再生效修改后的白名单。
  • 白名单修改生效后,不会影响已经且正在连接的用户,只会影响后面创建连接的用户。
  • 删除white.list磁盘文件1分钟后,IoTDB服务会拒绝后面的所有连接。
  • 使用Java原生接口修改白名单,非root用户无法修改;修改内容必须合法,否则会抛出StatementExecutionException异常。

三、审计日志

  • 需要修改配置文件\conf\iotdb-common.properties
  • 重启IoTDB服务。
#################### ### Audit log Configuration ####################  # whether to enable the audit log. # Datatype: Boolean # enable_audit_log=false enable_audit_log=true  # Output location of audit logs # Datatype: String # IOTDB: the stored time series is: root.__system.audit._{user} # LOGGER: log_audit.log in the log directory # audit_log_storage=IOTDB,LOGGER  # whether enable audit log for DML operation of data # whether enable audit log for DDL operation of schema # whether enable audit log for QUERY operation of data and schema # Datatype: String # audit_log_operation=DML,DDL,QUERY  # whether the local write api records audit logs # Datatype: Boolean # This contains Session insert api: insertRecord(s), insertTablet(s),insertRecordsOfOneDevice # MQTT insert api # RestAPI insert api # This parameter will cover the DML in audit_log_operation # enable_audit_log_for_native_insert_api=true 
  • 直接在IoTDB-Workbench可视化控制台上看审计日志

在这里插入图片描述

3.1 Cli操作日志

  • 操作如下:
[root@iZgw0bdpdtyqxyz77dha9nZ iotdb-enterprise-1.3.1.4-bin]# bash sbin/start-cli.sh  --------------------- Starting IoTDB Cli ---------------------  _____       _________  ______   ______     |_   _|     |  _   _  ||_   _ `.|_   _ \      | |   .--.|_/ | | \_|  | | `. \ | |_) |     | | / .'`\ \  | |      | |  | | |  __'.    _| |_| \__. | _| |_    _| |_.' /_| |__) |  |_____|'.__.' |_____|  |______.'|_______/  Enterprise version 1.3.1.4 (Build: 9658c9d)                                              Successfully login at 127.0.0.1:6667 IoTDB> select * from root.test.test order by time desc +-----------------------------+---------------------+ |                         Time|root.test.test.status| +-----------------------------+---------------------+ |2024-08-02T11:56:47.598+08:00|                123.0| |2024-08-02T11:55:21.823+08:00|                 88.0| |2024-08-02T11:53:28.544+08:00|                 88.0| |2024-08-02T11:51:41.432+08:00|                 88.0| |2024-08-02T11:46:55.591+08:00|                123.0| |2024-08-02T09:39:23.891+08:00|                123.0| |2024-08-02T09:30:56.883+08:00|                333.0| |2024-08-02T09:30:54.368+08:00|                222.0| |2024-08-02T09:30:50.961+08:00|                111.0| |2024-08-01T20:29:35.022+08:00|                  2.0| |2024-08-01T20:29:28.027+08:00|                  1.0| +-----------------------------+---------------------+ Total line number = 11 It costs 0.182s IoTDB> INSERT INTO root.test.test(status) values(1782) Msg: The statement is executed successfully. IoTDB> exit 
  • 日志如下:

在这里插入图片描述

3.2 RESTful操作日志

  • 具体操作:IoTDB 入门教程 实战篇①——RESTful API V2
  • 日志如下:暂空

3.3 MQTT操作日志

  • 具体操作:IoTDB 入门教程 实战篇②——MQTT集成
  • 日志如下:暂空

在这里插入图片描述

3.4 Java操作日志

  • 具体操作:IoTDB 入门教程 实战篇③——Java示例(开源)
  • 日志如下:

在这里插入图片描述

3.5 C#操作日志

  • 具体操作:IoTDB 入门教程 实战篇④——C#示例(开源)
  • 日志如下:

在这里插入图片描述

3.6 Python操作日志

  • 具体操作:IoTDB 入门教程 实战篇⑤——Python示例(开源)
  • 日志如下:

在这里插入图片描述

四、参考

安全控制_天谋IoTDB

相关内容

热门资讯

一直以来!微信传送屋辅助器下载... 一直以来!微信传送屋辅助器下载(辅助)一直真的是有辅助神器(真实有挂)-哔哩哔哩1)微信传送屋辅助器...
一分钟了解!!微信小程序中至上... 一分钟了解!!微信小程序中至上饶麻将有挂,poker红龙辅助,指南书教程(了解有挂)-哔哩哔哩1、微...
推荐透视!佛手在线有挂吗!果然... 推荐透视!佛手在线有挂吗!果然有辅助神器(确实有挂)-哔哩哔哩1、实时佛手在线有挂吗透视辅助更新:用...
揭幕透视!德普之星辅助器app... 揭幕透视!德普之星辅助器app,德普之星透视辅助软件激活码,手筋教程(确实有挂)-哔哩哔哩1、德普之...
长期以来!拱趴游戏辅助器(辅助... 长期以来!拱趴游戏辅助器(辅助)其实是有辅助下载(有挂技巧)-哔哩哔哩1、很好的工具软件,可以解锁游...
实测分享!0759湛江吴川三脚... 实测分享!0759湛江吴川三脚鸡辅助,智星德州辅助译码插件靠谱吗,技法教程(有挂技巧)-哔哩哔哩1、...
揭幕透视!wepoker国外版... 揭幕透视!wepoker国外版透视,wepoker轻量版有透视吗,机巧教程(真是有挂)-哔哩哔哩1、...
总结透视!fishpoker透... 总结透视!fishpoker透视底牌!切实真的有辅助方法(有挂秘诀)-哔哩哔哩暗藏猫腻,小编详细说明...
现有关情况通报如下!创思维激k... 现有关情况通报如下!创思维激k有辅助器吗(辅助)总是是有辅助挂(有挂神器)-哔哩哔哩;现有关情况通报...
我来教大家!福建兄弟13水破解... 我来教大家!福建兄弟13水破解器,德州局脚本,烘培教程(有挂详细)-哔哩哔哩1、福建兄弟13水破解器...