Fiware 验证令牌时出错。keystone中未授权代理。密钥验证
我试图合并IDM(Docker)最新版本和pep代理(与节点服务器一起运行的git示例) 当我启动pep代理时,一切都按预期进行。 我收到以下信息:Fiware 验证令牌时出错。keystone中未授权代理。密钥验证,fiware,fiware-wilma,Fiware,Fiware Wilma,我试图合并IDM(Docker)最新版本和pep代理(与节点服务器一起运行的git示例) 当我启动pep代理时,一切都按预期进行。 我收到以下信息: 信息:服务器-正在端口80中启动PEP代理。IdM身份验证 服务器-成功验证PEP代理。代理身份验证令牌:d9badf48-16fa-423d-884c-a3e155578791 现在出现了一个问题。当我输入错误的令牌时,我会出现此错误 ERROR: IDM-Client - Error validating token. Proxy not a
ERROR: IDM-Client - Error validating token.
Proxy not authorized in keystone. Keystone authentication ...
ERROR: Server - Caught exception:
SyntaxError: Unexpected token u in JSON at position 0
据我所知,我期待一些回报,如无效令牌等。。相反,我在pep proxy和我的curl命令show->(52)中从服务器得到了这个错误
pep代理的My config.json:
var config = {};
// Used only if https is disabled
config.pep_port = 80;
// Set this var to undefined if you don't want the server to listen on HTTPS
config.https = {
enabled: false,
cert_file: 'cert/cert.crt',
key_file: 'cert/key.key',
port: 443
};
config.idm = {
host: 'localhost',
port: 3000,
ssl: false
}
config.app = {
host: 'www.google.es',
port: '80',
ssl: false // Use true if the app server listens in https
}
// Credentials obtained when registering PEP Proxy in app_id in Account Portal
config.pep = {
app_id: 'xxxxxx',
username: 'xxxxxx',
password: 'xxxxxx',
trusted_apps : []
}
// in seconds
config.cache_time = 300;
// if enabled PEP checks permissions with AuthZForce GE.
// only compatible with oauth2 tokens engine
//
// you can use custom policy checks by including programatic scripts
// in policies folder. An script template is included there
config.azf = {
enabled: true,
protocol: 'http',
host: 'localhost',
port: 8080,
custom_policy: undefined // use undefined to default policy checks (HTTP verb + path).
};
// list of paths that will not check authentication/authorization
// example: ['/public/*', '/static/css/']
config.public_paths = [];
config.magic_key = 'undefined';
module.exports = config;
IDM日志:
fiware-idm_1 | GET
/user?access_token=7cb25729577c2e01dc337314dcd912ec981dc49b 401 4.445 ms - 116
fiware-idm_1 | Executing (default): SELECT email, 'user' as Source FROM
user WHERE email='pep_proxy_edf60435-7de7-4875-85a9-cf68b8838b8c'
fiware-idm_1 | UNION ALL
fiware-idm_1 | SELECT id, 'pep_proxy' as Source FROM
pep_proxy WHERE id='pep_proxy_edf60435-7de7-4875-85a9-cf68b8838b8c';
fiware-idm_1 | Executing (default): SELECT `id`, `password`,
`oauth_client_id` FROM `pep_proxy` AS `PepProxy` WHERE `PepProxy`.`id` =
'pep_proxy_edf60435-7de7-4875-85a9-cf68b8838b8c';
fiware-idm_1 | Executing (default): INSERT INTO `auth_token`
(`access_token`,`expires`,`valid`,`pep_proxy_id`) VALUES ('a0d54a6f-
8461-4000-bb80-5fb60193bcb4','2018-05-04
11:45:21',true,'pep_proxy_edf60435-7de7-4875-85a9-cf68b8838b8c');
fiware-idm_1 | POST /v3/auth/tokens 201 13.733 ms - 74
错误“SyntaxError:JSON中位置0处的意外标记u”可能是由于代码中的某个位置,其中使用未定义的参数调用了JSON.parse
。您收到此消息是因为未正确处理错误并引发异常(异常未处理)
在中,我们可以查看代码,并猜测/推断此错误的来源
我想您可以在github上打开一个问题。我刚刚删除了您的登录数据,希望没问题。您是否使用了错误的令牌并等待适当的消息?错误的令牌格式是否正确?使用错误令牌的目的是什么?=)是的,我使用了错误的令牌并等待正确的消息,目的是测试并查看提供错误令牌时的响应。令牌格式正确,我只与另一个字母交换一个字母。但即使是在pep代理视频上的旧版本,你也可以看到,即使你键入“affaas”作为令牌,你应该得到消息说令牌无效或错误。。。。。你可以在IDM的日志中看到,他说他可能无法找到使用该令牌的用户,但随后继续执行更多操作,我不知道为什么。感谢你的输入,我将继续并在github上打开问题。如果你认为答案有帮助,你可以标记它。你好,道尔顿,你的问题很有帮助。我只是想看看我这方面是否有问题,于是我试着配置pep和idm的旧版本。我也遇到了类似的问题,我试着用你们的向导来设置它们,虽然很清楚,但问题还是一样的。我在旧版本中遇到的错误与这里描述的相同,此时此刻我不知道问题出在哪里,因为我可以肯定,你是否有一些建议或想法去哪里看或做些什么。我仍然认为问题出在Wilma代码上。=)有些地方需要一个很好的异常处理…你对当前版本的Wilma代码有什么看法,我会在github上发布,当我有时间的时候,使用旧版本的pep代理和idm(使用horizon和keystone)怎么样?这是否可行?