It's all about the answers!

Ask a question

Python Flask app - RTC programmatic authentication issue


Pavel Veremenyuk (11) | asked Apr 17 '18, 4:29 a.m.

Hi everyone!

I am implementing integration with RTC v6.0.5 for my Python Flask app. I am using pre-built python package RTCClient for logging and dealing with workitems (http://rtcclient.readthedocs.io/en/latest/quickstart.html).

Problem is that POST request generated by the package fails:

2018-04-13 20:36:58,635 DEBUG urllib3.connectionpool: https://host:443 "POST /jazz/authenticated/j_security_check HTTP/1.1" 302 0
2018-04-13 20:36:58,813 DEBUG urllib3.connectionpool: https://host:443 "GET /jazz/authenticated/ HTTP/1.1" 404 None
2018-04-13 20:36:58,815 ERROR client.RTCClient: Failed POST request at <https://host/jazz/authenticated/j_security_check> with response: Error 404: Not Found

 

Is "/authenticated/j_security_check" wrong endpoint to pass authentication? In the request application passes credentials and header like this - {'Cookie': 'JazzFormAuth=Form; Path=/jazz; Secure', 'Content-Type': 'application/x-www-form-urlencoded'}.

One answer



permanent link
Ralph Schoon (56.0k23642) | answered Apr 17 '18, 5:08 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Apr 17 '18, 5:10 a.m.

It is a third party library
The web site has no dates of when the library was created or maintained
You provide nothing, not even the call

I am baffled.

Unless you started with RTC 1.0 or 2.0 or failed with the install process I would say you are basically not providing a correct RTC repository URI.
Second option is the Python library is over 5 years old.


Comments
Pavel Veremenyuk commented Apr 17 '18, 6:09 a.m. | edited Apr 17 '18, 6:42 a.m.

Yes, the library is 3rd party library, but form its author I see it was tested well on RTC 6.0 (not sure how much it's different from 6.0.5. in terms of auth mechanism). I may come at the end to my own authorization coding, but wanted first try to re-use existing solution.

Basically, I see there is first GET request to https://host/jazz/authenticated/identity works well and gets some response with status 200. Then that library sends POST request to https://host/jazz/authenticated/j_security_check and gets error with status 404 not found. So, just curious if that library written some time ago (last commit 11 months ago) may use no valid end point /authenticated/j_security_check in case of RTC 6.0.5.


Pavel Veremenyuk commented Apr 17 '18, 3:32 p.m.

After some debugging iof 3rd party lib I see that in response for POST request to /authenticated/j_security_check app gets response with 404 error with redirect url to https://host/jazz/authenticated/

Your answer


Register or to post your answer.