我想知道如何配置PEP代理,以便我可以通過HTTPS交換消息。我有一個Orion上下文代理實例,只有在PEP代理通過後才能訪問。我PEP代理(威爾瑪)配置文件(config.js)有以下幾點:FIWARE - 配置爲HTTPS的PEP代理
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的配置爲反向代理),這樣我直接傳送到獵戶座的要求是安全的。 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;
}
我要整合什麼,我有一個辦法,我只能通過HTTPS,包括PEP代理流程與獵戶座溝通。我已經搜索過,但沒有發現任何與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',))
我對設置有疑慮...... PEP-ngsix-Orion或ngsix-PEP-Orion。你能澄清一下嗎? – fgalan
@fgalan,我正在嘗試PEP-Nginx-Orion:請求轉到PEP,PEP重定向到Nginx通過反向代理訪問的Orion。我現在將在問題中添加Nginx配置。 – Dalton
也許一個ngnix-PEP-Orion設置可以簡化一些事情嗎? – fgalan