Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with ckanext-ngsiview and pep-proxy Wilma #17

Open
osfrance opened this issue Nov 8, 2017 · 0 comments
Open

Problem with ckanext-ngsiview and pep-proxy Wilma #17

osfrance opened this issue Nov 8, 2017 · 0 comments

Comments

@osfrance
Copy link

osfrance commented Nov 8, 2017

Hi, I try to use Fiware CKAN (Ckan with ckanext-oauth2 and ckanext-ngsiview) with a PEP-Proxy Wilma and I had a 401 error after setting Url to PEP-Proxy and "OAuth-Token" to required.

On the keyrock Log I found this :

STC-security_keyrock.1.8y6izg3ox6cq@vmlx | 2017-11-08 14:15:24.350 97 WARNING keystone.common.wsgi [-] Authorization failed. The request you have made requires authentication. from 10.255.x.xx
STC-security_keyrock.1.8y6izg3ox6cq@vmlx | 2017-11-08 14:15:24.352 97 INFO eventlet.wsgi.server [-] 10.255.x.xx - - [08/Nov/2017 14:15:24] "GET /v3/access-tokens/whawIMPS03BZnYKn25XjDQEjCfHLzD HTTP/1.1" 401 334 4.029003
STC-security_keyrock.1.8y6izg3ox6cq@vmlx | 2017-11-08 14:15:24.434 97 INFO eventlet.wsgi.server [-] 10.255.x.xx - - [08/Nov/2017 14:15:24] "POST /v3/auth/tokens HTTP/1.1" 201 548 0.077919

On the Log of Pep-proxy Wilma :

2017-11-08 14:17:50.430 - INFO: IDM-Client - Checking token with IDM...
2017-11-08 14:17:54.449 - ERROR: IDM-Client - Error validating token. Proxy not authorized in keystone. Keystone authentication ...
2017-11-08 14:17:54.537 - ERROR: Server - Caught exception: SyntaxError: Unexpected token u

If I compare The HTTP request with Wirecloud/Pep-proxy Wilma (Pep work with Wirecloud with the same configuration) and Ckan/Pep-proxy Wilma :
Wirecloud/Pep-proxy HTTP request :

POST /v1/queryContext?limit=100&details=on&offset=0 HTTP/1.1
user-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.52
accept: application/json
Content-Type: application/json
accept-language: en-US,en;q=0.8
x-forwarded-for: 10.12.x.xx, 172.17.x.xx,10.255.x.xx
fiware-service: test
fiware-servicepath: /oliv
x-real-ip: 10.12.x.xx
x-requested-with: XMLHttpRequest
x-auth-token: g8xYJGspvTtBMpI02fBOKeBBnR9REC
X-Nick-Name: user1
X-Display-Name: user1
X-Roles: [{"name":"Provider","id":"provider"}]
X-Organizations: []
Host: iot.test.org:1026
Content-Length: 63
Connection: close

Ckan/Pep-proxy HTTP request :

POST /v1/queryContext?attributeFormat=object HTTP/1.1
Host: iot.test.org:8081
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: application/json
User-Agent: python-requests/2.10.0
Fiware-Service: test
Content-Type: application/json
Fiware-ServicePath: /oliv
X-Auth-Token: whawIMPS03BZnYKn25XjDQEjCfHLzD
Content-Length: 104

{"entities": [{"type": "obj-test", "id": "test1", "isPattern": "false"}], "attributes": ["temperature"]}

I suspect ckanext-ngsiview don't send HTTP header X-Nick-Name: user1 ...

Thanks for help,

-Olivier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant