我一直在研究PEP-Proxy-Steelskin,所以我可以为我的Orion Context提供一些安全层,但是,有一些问题阻碍了我的进展。
我想使用IDM和Keystone全局实例。
我已按照相应指示(https://github.com/telefonicaid/fiware-pep-steelskin)成功安装了pepProxy,但结果始终相同:
{
"name": "KEYSTONE_AUTHENTICATION_ERROR",
"message": "There was a connection error while authenticating to Keystone: 500"
}
我在config.js
文件中使用的配置如下所示:
var config = {};
// Protected Resource configuration
//--------------------------------------------------
// Configures the address of the component that is being proxied and the address of the proxy itself.
config.resource = {
original: {
/**
* Host that is being proxied.
*/
host: 'account.lab.fiware.org',
/**
* Port where the proxied server is listening.
*/
port: 10026
},
proxy: {
/**
* Port where the proxy is listening to redirect requests.
*/
port: 1026,
/**
* Administration port for the proxy.
*/
adminPort: 11211
}
};
// Access Control configuration
//--------------------------------------------------
/**
* This options can be used to configure the address and options of the Access Control, responsible of the request
* validation.
*/
config.access = {
/**
* Indicates whether the access control validation should be enabled. Defaults to false.
*/
disable: false,
/**
* Protocol to use to access the Access Control.
*/
protocol: 'http',
/**
* Host where the Access Control is located.
*/
host: 'account.lab.fiware.org',
/**
* Port where the Access Control is listening.
*/
port: 7070,
/**
* Path of the authentication action.
*/
path: '/pdp/v3'
}
// User identity configuration
//--------------------------------------------------
/**
* Information about the Identity Manager server from where the information about a user will be drawn.
*/
config.authentication = {
checkHeaders: false,
module: 'keystone',
user: 'pep_proxy_99c595...',
password: 'e3025a2...',
domainName: 'matest',
retries: 3,
cacheTTLs: {
users: 1000,
projectIds: 1000,
roles: 60,
validation: 120
},
options: {
protocol: 'http',
host: 'cloud.lab.fiware.org',
port: 5000,
path: '/v3/role_assignments',
authPath: '/v3/auth/tokens'
}
};
// Security configuration
//--------------------------------------------------
config.ssl = {
/**
* This flag activates the HTTPS protocol in the server. The endpoint always listen to the indicated port
* independently of the chosen protocol.
*/
active: false,
/**
* Key file to use for codifying the HTTPS requests. Only mandatory when the flag active is true.
*/
keyFile: '',
/**
* SSL Certificate to present to the clients. Only mandatory when the flag active is true.
*/
certFile: ''
}
/**
* Default log level. Can be one of: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL'
*/
config.logLevel = 'FATAL';
// List of component middlewares
//-------------------------------------------------
/**
* To validate the request, the proxy needs some information that is dependant of the component: the action that a
* request is going to execute. How to detect the action given the request is component-specific logic, that can be
* codified in a middleware-like function that will be executed before the user validation. This logic must populate
* the 'action' parameter of the request.
*/
config.middlewares = {
/**
* Indicates the module from where the middlewares will be loaded.
*/
require: 'lib/plugins/orionPlugin',
/**
* Indicates the list of middlewares to load.
*/
functions: [
'extractCBAction'
]
};
/**
* If this flag is activated, whenever the pepProxy is not able to redirect a request, instead of returning a 501 error
* (that is the default functionality) the PEP Proxy process will exit with a -2 code.
*/
config.dieOnRedirectError = false;
/**
* Name of the component. It will be used in the generation of the FRN.
*/
config.componentName = 'orion';
/**
* Prefix to use in the FRN (Not to change, usually).
*/
config.resourceNamePrefix = 'fiware:';
/**
* Indicates whether this PEP should have an admin bypass or not. If it does, whenever a user request arrives to the
* PEP from a user that has the role defined in the "adminRoleId" property, that request is not validated against the
* Access Control, but it is automatically proxied instead.
*/
config.bypass = false;
/**
* ID of the admin user if it exists. Only effective if the "bypass" property is true.
*/
config.bypassRoleId = '';
/**
* Configures the maximum number of clients that can be simultaneously queued while waiting for the PEP to
* authenticate itself against Keystone (due to an expired token).
*/
config.maxQueuedClients = 1000;
module.exports = config;
在此背景下:
account.lab.fiware.org
作为资源和访问主机是否正确,还是应该使用其他主机? cloud.lab.fiware.org
作为身份验证主机是否正确?有没有人对我的问题有任何暗示?
注意:我已经尝试过不同的帖子并取得了成功。部分原因是因为其中许多解决方案都安装了自己的keystone,例如: PEP-Proxy-Steelskin Log configuration , PEP proxy config file for integration of IDM GE, PEP proxy and Cosmos big data , PEP-Proxy-Steelskin Log configuration。这个是与我一直在做的事情更相关的那个,但我相信它不是最新的: Fiware Orion - pepProxy
答案 0 :(得分:0)
我@netzahdzc抱歉,如果这不是您希望的回复,但我现在暂时不使用Fiware技术,所以我不记得所有内容,但我会尽力帮助。< / p>
使用account.lab.fiware.org作为资源和访问主机是否正确,还是应该使用不同的主机?
我认为你使用的是正确的,请参考GitHub项目的配置文件,这个项目是&#34; old&#34;所以有些事情可能已经从Fiware方面改变了......正如你在 PepProxy - config.js 中看到的那样,我使用的实例和你一样:
config.account_host = 'https://account.lab.fiware.org';
config.keystone_host = 'cloud.lab.fiware.org';
config.keystone_port = 4730;
使用cloud.lab.fiware.org作为身份验证主机是否正确?
在我使用的配置(上图)中,您可以看到 account_host 是 account.lab.fiware.org 和 keystone_host (用于身份验证)是 cloud.lab.fiware.org ,所以我认为你是对的。
用户和密码由我的IDM Global Instance自动创建。角色和权限通过相同的全局实例分配。这个程序是否被挪用,或者我应该使用不同的程序?
我并没有深入研究这个问题但是对于回忆是的你是对的,角色和权限应该由Keystone全球实例处理,但我不知道自从我工作以来事情是否发生了变化有这个。
很抱歉,如果我无法提供更多帮助,请尝试查看您是否可以使用我的某些配置,或者至少它可以帮助您。您也可以尝试与Daniel Morán Jiménez交谈,我相信他可以帮助您更好地了解我。
答案 1 :(得分:0)
你的建议是否成功?
我认为如果你想使用IdM的全局实例,作为身份验证的身份提供者,你必须填充config.js值,如下面的代码片段所示,但我不确定它是否会发生工作。
// User identity configuration
//--------------------------------------------------
/**
* Information about the Identity Manager server from where the information about a user will be drawn.
*/
config.authentication = {
checkHeaders: true,
module: 'keystone',
user: 'pep_proxy_1234...',
password: 'my-autogenerated-password',
domainName: 'Default',
retries: 3,
cacheTTLs: {
users: 1000,
projectIds: 1000,
roles: 60,
validation: 120
},
options: {
protocol: 'http',
host: 'cloud.lab.fiware.org',
port: 4730,
path: '/v3/role_assignments',
authPath: '/v3/auth/tokens'
}
};
当然,请将字段用户和密码替换为值 由IDM Global Instance自动创建。
但是,我认为您应该使用PEP代理GE(Wilma PEP Proxy)的参考实现,以防您仍想使用Fiware Cloud的全局实例。
您正在使用Telefonica implementation of this GE,从我的观点来看,它与Wilma存在一些差异,我不能100%确定它是否可以与IdM Keyrock和{{3的参考实现集成使用Authorization PDP Authzforce的全局实例。
一种完全不同的方法,可能是使用您自己的IdM,PDP授权和PEP代理通用启动器(GE)实例。在这种情况下,您仍然可以使用这三个组件的引用实现,或者您可以使用Steelskin PEP代理。如果您遵循Steelskin路径,我建议您使用Fiware Cloud和Keystone-spassword,它们分别是Telefonica对IdM和授权PDP的实现。 Keypass您可以逐步了解如何安装和配置此GE。
最后,如果你想要遵循“参考”GE路径,你可以在Here找到一些亮点。
此致
埃米利亚诺