ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

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

2022-05-29 21:31:12  阅读:175  来源: 互联网

标签:公文 系统安全 office img 传输 lyrics documentImg id name


实验二 电子公文传输系统安全-进展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

标签:公文,系统安全,office,img,传输,lyrics,documentImg,id,name
来源: https://www.cnblogs.com/lhpshuaibi/p/16324916.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有