简体   繁体   English

Apache中每个HTTP请求的不可否认性

[英]Non-repudiation of each HTTP request in Apache

For the purpose of scientific project I would like to implement in Apache the non-repudiation security service for each HTTP request comming from the remote client. 出于科研项目的目的,我想在Apache中为来自远程客户端的每个HTTP请求实现不可否认的安全服务。 For that purpose I would like to use asymmetric cryptography. 为此,我想使用非对称密码学。 I assume that Apache server stores certificates (with public keys) of each legitimate client. 我假设Apache服务器存储每个合法客户端的证书(带有公钥)。 Clients securely store their private keys. 客户端安全地存储其私钥。

In the request there would be client's signature on the chosen HTTP header fields (eg. IP address, requested URL). 在请求中,在选定的HTTP标头字段(例如IP地址,请求的URL)上将有客户端的签名。 The signature would be placed in the GET or POST parameters. 签名将放置在GET或POST参数中。 After each request the non repudiation record should be written to log (I chose Apache's access.log - by default it stores requested URL, IP address, time etc.). 在每个请求之后,都必须将不可否认记录写入日志(我选择了Apache的access.log-默认情况下,它存储了请求的URL,IP地址,时间等)。

To perform signature check and access control I would like to use mod_rewrite module with RewriteMap and external script doing the job of signature veryfication and access control. 为了执行签名检查和访问控制,我想将Mod_rewrite模块与RewriteMap和外部脚本一起使用来完成签名实现和访问控制。 This is what I did so far: 这是我到目前为止所做的:

mod_rewrite rules: mod_rewrite规则:

    RewriteEngine on
    RewriteMap d2u "prg:/var/www/script/map-script2.pl"
    RewriteCond "${d2u:%{QUERY_STRING}}" =false
    RewriteRule ^ - [F]

map-script2.pl: map-script2.pl:

#!/usr/bin/perl
$| = 1; # Turn off I/O buffering
while (<STDIN>) {

#here will be signature and other data extraction from the query string and veryfication

     if( signature verification result ){
        print "true\n";
     }
     else{
        print "false\n";
     }
}

Is there any other way to do this (there might be efficiency problems with using external script)? 还有其他方法可以做到这一点(使用外部脚本可能存在效率问题)?

Do you see any drawbacks of my solution to the HTTP request non-repudiation? 您是否看到我的HTTP请求不可否认性解决方案的任何缺点?

That would be relatively low performance. 那将是相对较低的性能。 It would be more complicated, but higher perormance, in C as an apache module or in Lua as a mod_lua script. 以C作为apache模块或以Lua作为mod_lua脚本,会更加复杂,但性能更高。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM