实验二 电子公文传输系统安全-进展2

2022/5/29 23:21:47

本文主要是介绍实验二 电子公文传输系统安全-进展2,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

实验二 电子公文传输系统安全-进展2

  • 上周任务完成情况(代码链接,所写文档等)
  • 本周计划

上周任务完成情况(代码链接,所写文档等)

1.向编写的数据库插入关于上述14篇公文的一系列数据,测试前端的运行效果。

INSERT INTO `index_document`(`id`, `name`, `office`, `person`, `Classification`, `time`, `img`, `file`, `label_id`, `type`, `lyrics`) VALUES (1, '关于申请灾后图书馆新书购置资金的请示', '江宁县第一中学办公室', '张三', 0, '2012-07-01', 'documentImg/1.jpg', 'documentFile/1.pdf', 2, '请示', 'documentLyric/1.txt');
INSERT INTO `index_document`(`id`, `name`, `office`, `person`, `Classification`, `time`, `img`, `file`, `label_id`, `type`, `lyrics`) VALUES (2, '学生代表座谈会议纪要', '校团委办公室', '陈金金', 1, '2020-09-30', 'documentImg/2.jpg', 'documentFile/2.pdf', 14, '会议纪要', 'documentLyric/2.txt');
INSERT INTO `index_document`(`id`, `name`, `office`, `person`, `Classification`, `time`, `img`, `file`, `label_id`, `type`, `lyrics`) VALUES (3, '关于商洽暑期支教活动的函', '北京电子科技学院办公室', '宋XX', 0, '2021-06-15', 'documentImg/3.jpg', 'documentFile/3.pdf', 13, '函', 'documentLyric/3.txt');
INSERT INTO `index_document`(`id`, `name`, `office`, `person`, `Classification`, `time`, `img`, `file`, `label_id`, `type`, `lyrics`) VALUES (4, 'X省X县教育局关于同意开展暑期支教活动的函', 'X省X县教育局办公室', '王XX', 0, '2021-06-20', 'documentImg/4.jpg', 'documentFile/4.pdf', 13, '函', 'documentLyric/4.txt');
INSERT INTO `index_document`(`id`, `name`, `office`, `person`, `Classification`, `time`, `img`, `file`, `label_id`, `type`, `lyrics`) VALUES (5, '北京电子科技学院关于关于组织开展2020-2021学年度第一学期团支部考核的通知', '院团委', '刘博雅', 0, '2021-02-20', 'documentImg/5.jpg', 'documentFile/5.pdf', 7, '通知', 'documentLyric/5.txt');
INSERT INTO `index_document`(`id`, `name`, `office`, `person`, `Classification`, `time`, `img`, `file`, `label_id`, `type`, `lyrics`) VALUES (6, '北京电子科技学院2021年春季学期开学工作方案', '北京电子科技学院办公室', '李四', 0, '2021-02-18', 'documentImg/6.jpg', 'documentFile/6.pdf', 9, '公告', 'documentLyric/6.txt');
INSERT INTO `index_document`(`id`, `name`, `office`, `person`, `Classification`, `time`, `img`, `file`, `label_id`, `type`, `lyrics`) VALUES (7, '北京电子科技学院关于开展“学党史、强信念、跟党走”党史学习教育的通知', '院团委', '陈金金', 0, '2021-04-28', 'documentImg/7.jpg', 'documentFile/7.pdf', 7, '通知', 'documentLyric/7.txt');
INSERT INTO `index_document`(`id`, `name`, `office`, `person`, `Classification`, `time`, `img`, `file`, `label_id`, `type`, `lyrics`) VALUES (8, '北京电子科技学院关于开展“我对母亲有话说”主题团日活动的通知', '院团委', '陈金金', 0, '2021-04-15', 'documentImg/8.jpg', 'documentFile/8.pdf', 7, '通知', 'documentLyric/8.txt');
INSERT INTO `index_document`(`id`, `name`, `office`, `person`, `Classification`, `time`, `img`, `file`, `label_id`, `type`, `lyrics`) VALUES (9, '关于开展2020-2021年度首都大学、中职院校“先锋杯”优秀团支部创建工作的通知', '院团委', '陈金金', 0, '2020-11-11', 'documentImg/9.jpg', 'documentFile/9.pdf', 7, '通知', 'documentLyric/9.txt');
INSERT INTO `index_document`(`id`, `name`, `office`, `person`, `Classification`, `time`, `img`, `file`, `label_id`, `type`, `lyrics`) VALUES (10, '关于开展第十七届“挑战杯”全国大学生课外学术科技作品竞赛红色专项活动的通知', '院团委', '陈金金', 0, '2021-01-18', 'documentImg/10.jpg', 'documentFile/10.pdf', 7, '通知', 'documentLyric/10.txt');
INSERT INTO `index_document`(`id`, `name`, `office`, `person`, `Classification`, `time`, `img`, `file`, `label_id`, `type`, `lyrics`) VALUES (11, '关于推荐 李昂 等 4 名同志为入党积极分子的备案报告', '1812团支部', '宋非凡', 1, '2020-10-02', 'documentImg/11.jpg', 'documentFile/11.pdf', 12, '报告', 'documentLyric/11.txt');
INSERT INTO `index_document`(`id`, `name`, `office`, `person`, `Classification`, `time`, `img`, `file`, `label_id`, `type`, `lyrics`) VALUES (12, '关于推荐蒋嘉豪等8名同志为预备党员发展对象的备案报告', '1812团支部', '宋非凡', 1, '2020-10-02', 'documentImg/12.jpg', 'documentFile/12.pdf', 12, '报告', 'documentLyric/12.txt');
INSERT INTO `index_document`(`id`, `name`, `office`, `person`, `Classification`, `time`, `img`, `file`, `label_id`, `type`, `lyrics`) VALUES (13, '关于推荐XXX等X名同志为入党积极分子的备案报告', '1812团支部', '宋非凡', 1, '2021-04-24', 'documentImg/13.jpg', 'documentFile/13.pdf', 12, '报告', 'documentLyric/13.txt');
INSERT INTO `index_document`(`id`, `name`, `office`, `person`, `Classification`, `time`, `img`, `file`, `label_id`, `type`, `lyrics`) VALUES (14, '关于推荐XXX等X名同志为预备党员发展对象的备案报告', '1812团支部', '宋非凡', 1, '2021-04-24', 'documentImg/14.jpg', 'documentFile/14.pdf', 12, '报告', 'documentLyric/14.txt');

3.设计了访问控制功能

​ 我们设计了初步的访问控制能力,其主要方式是非涉密人员看不到涉密文件,具体来说是非涉密人员根本就无法从前端页面上看到涉密文件的任何信息,从名字到存储路径。简而言之就是非涉密人员根本不知道涉密文件的存在。

lALPD4PvNOgsqlDNAqPNBaU_1445_675.png

​ 我们目前的加密是对文件存储路径的加密,简而言之就是数据库里只放文件的存储路径,在我们的设计中,服务器应该存放在一间安全的机房里,用户通过安全连接来访问数据库,得到所需公文的路径,进而访问公文。

4.在本地上安装了项目所需环境,并进行了测试

(1)安装依赖库

pip3 install filetype
pip3 install django-sslserver
pip3 install gmssl
pip3 install secrets

(2)调整本地MySQL

​ 我在部署的时候出现了这个问题:

Django.db.utils.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password...

​ 经过王上查阅资料,得知这是由于Mysql 8.0 的部分语法,密码的加密方式发生了改变,在8.0 中的用户密码采用的是cha2 加密方法,Django 对这种加密的密码进行编译导致密码设置错误。

​ 解决方法如下:

mysql -u root -p
use mysql;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'newpassword'; 
FLUSH PRIVILEGES; 

修改密码以后,重新执行:

python manage.py runserver


这篇关于实验二 电子公文传输系统安全-进展2的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程