Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ssl FIWARE-配置为HTTPS的PEP代理_Ssl_Https_Reverse Proxy_Fiware_Fiware Wilma - Fatal编程技术网

Ssl FIWARE-配置为HTTPS的PEP代理

Ssl FIWARE-配置为HTTPS的PEP代理,ssl,https,reverse-proxy,fiware,fiware-wilma,Ssl,Https,Reverse Proxy,Fiware,Fiware Wilma,我想知道如何配置PEP代理,以便通过HTTPS交换消息。我有一个Orion context broker的实例,只有通过PEP代理才能访问它。我的PEP代理(Wilma)配置文件(config.js)具有以下内容: config.https = { enabled: true, cert_file: 'cert/idm.crt', key_file: 'cert/idm.key', port: 443 }; config.account_host = 'https://

我想知道如何配置PEP代理,以便通过HTTPS交换消息。我有一个Orion context broker的实例,只有通过PEP代理才能访问它。我的PEP代理(Wilma)配置文件(config.js)具有以下内容:

config.https = {
   enabled: true,
   cert_file: 'cert/idm.crt',
   key_file: 'cert/idm.key',
   port: 443
};

config.account_host = 'https://localhost:8000';   //account.lab.fiware.org';
config.keystone_host = 'localhost'; //'cloud.lab.fiware.org';
config.keystone_port = 5000; //4731;

config.app_host = 'https://orion'; //'localhost';
config.app_port = ''; //Nginx is configured to redirect to port 1026
// Use true if the app server listens in https
config.app_ssl = true;

config.username = 'pep_proxy_credential_obtained_at_portal';
config.password = 'password_obtained_at_portal';
我也有HTTPS到HTTP(Nginx配置为反向代理),这样直接发送到Orion的请求是安全的。HTTPS仅在没有PEP代理流的情况下工作。当我插入授权/身份验证流时,我面临问题,因为PEP代理不处理SSL证书。以下是Nginx的配置:

location / {
    proxy_set_header        Host $host;
    proxy_set_header        X-Real-IP $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header        X-Forwarded-Proto $scheme;

    # Fix the “It appears that your reverse proxy set up is broken" error.
    proxy_pass          http://orion:1026;
    proxy_read_timeout  90;
    proxy_redirect      http://orion:1026 https://orion;
}
config.app_host = 'https://orion';
我想以一种只能通过HTTPS(包括PEP代理流)与Orion通信的方式集成我所拥有的。我已经搜索过了,但在PEP代理中没有找到任何与HTTPS配置相关的有用信息

编辑:PEP代理重定向到应用程序时出错:

2017-01-17 20:52:55.544  - INFO: Server - Success authenticating PEP proxy. 
Proxy Auth-token:  d7ec08edd87d43418edfd558df26f427
2017-01-17 20:53:49.450  - INFO: IDM-Client - Checking token with IDM...
2017-01-17 20:53:49.508  - INFO: Root - Access-token OK. Redirecting to app...
Refused to set unsafe header "accept-encoding"
Refused to set unsafe header "content-length"
应用程序显示的错误为:

('Connection aborted.', BadStatusLine('HTTP/1.1 0 unknown\r\n',))

您可以使用配置文件中的参数“HTTPS”将PEP代理配置为在HTTPS中侦听


问题在于配置时的https:

location / {
    proxy_set_header        Host $host;
    proxy_set_header        X-Real-IP $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header        X-Forwarded-Proto $scheme;

    # Fix the “It appears that your reverse proxy set up is broken" error.
    proxy_pass          http://orion:1026;
    proxy_read_timeout  90;
    proxy_redirect      http://orion:1026 https://orion;
}
config.app_host = 'https://orion';
我必须调试才能找到这个。PEP代理Wilma将协议(http或https)添加到配置的应用程序主机。正确的方法是在不使用协议的情况下进行配置:

config.app_host = 'orion';

也许可以将此观察添加到Wilma文档中,以避免类似我的错误。

我已经按照链接中所示进行了配置。但是我遇到了这个错误:('Connection aborted',BadStatusLine('HTTP/1.1 0 unknown\r\n',))您能给我一些帮助吗?我在问题中添加了有关该问题的更多详细信息。非常感谢您的帮助。这可能是PEP代理Wilma的错误吗?它是否已经用SSL配置进行了很好的测试?我对设置有疑问。。。佩普六号猎户座或佩普六号猎户座。请你澄清一下好吗?试着停止猎户座并在同一台机器上运行
nc-l-p1026
,从而“模拟”。然后重复测试,以查看在此情况下PEP向Orion转发的确切请求(如果有)。请将测试结果发布在您的问题帖子中。不幸的是,我不熟悉PEP Nginx Orion的设置,但熟悉Nginx PEP Orion的设置。在我的例子中,这是有意义的,因为PEP Orion连接是使用安全通道实现的(通过L2/L3安全方式),因此我们尝试尽快从HTTPS传递到HTTP(即在nginx点)。无论如何,我希望威尔玛团队可以看看,以确认是否有一个错误,在该软件或要求更多的信息来调试的情况下。啊。。。我刚刚意识到,你用问题的解决方案来自我回答。很高兴看到问题终于解决了:)是的。然而,只要有一个安全通道,PEP和Orion就可以在不同的机器中,例如,严格地说,它们在dame L2隔离段中,如果给定的URL是
http:///Orion
,那么主机就是
Orion
(而
http:///code>是URL模式)。但是,我同意您的看法,最好在Wilma文档中添加一条注释(可能在config.js.template文件本身中,作为
config.app\u host
参数上方的注释)。也许你甚至可以通过一个pull请求对存储库做出贡献:)你说得对,@fgalan。但是它有点混乱,因为config.js文件中的另一个参数与协议一起工作:
account\u host=http://127.0.0.1';。也许它可以标准化,包括端口配置:一个作为int(
config.keystone_port=5000;
)传递,另一个作为字符串(
config.app_port='1026';
)传递