我一直在研究 PEP-Proxy-Steelskin,以便我可以为我的 Orion Context 提供一些安全层,但是,有一些问题阻碍了我的进展。
我想使用 IDM 和 Keystone 全局实例。
我已按照相应的指示成功安装了 pepProxy (https://github.com/telefonicaid/fiware-pep-steelskin https://github.com/telefonicaid/fiware-pep-steelskin),但是,结果总是相同的:
{
"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
,作为认证主机?
- 用户和密码由我的 IDM 全局实例自动创建。角色和权限是通过同一全局实例分配的。此程序是否合适,或者我应该遵循不同的程序?
- 我错过了什么吗?
有人对我的问题有任何提示吗?
注:我已经尝试过不同的帖子并取得成功。部分原因是许多解决方案都安装了自己的基石,例如:PEP-Proxy-Steelskin 日志配置 https://stackoverflow.com/questions/30888451/pep-proxy-steelskin-log-configuration
,
用于集成 IDM GE、PEP 代理和 Cosmos 大数据的 PEP 代理配置文件 https://stackoverflow.com/questions/32092430/pep-proxy-config-file-for-integration-of-idm-ge-pep-proxy-and-cosmos-big-data
,
PEP-Proxy-Steelskin 日志配置 https://stackoverflow.com/questions/30888451/pep-proxy-steelskin-log-configuration。这是与我一直在做的事情更相关的一个,但我仍然认为它不是最新的:固件 Orion - pepProxy https://stackoverflow.com/questions/29561163/fiware-orion-pepproxy