[asterisk-bugs] [JIRA] (ASTERISK-27207) XMPP OAuth not working in Asterisk 13 due to func_curl differences

Asterisk Team (JIRA) noreply at issues.asterisk.org
Sun Aug 20 07:10:08 CDT 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=238149#comment-238149 ] 

Asterisk Team commented on ASTERISK-27207:
------------------------------------------

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

> XMPP OAuth not working in Asterisk 13 due to func_curl differences
> ------------------------------------------------------------------
>
>                 Key: ASTERISK-27207
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27207
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_xmpp
>    Affects Versions: 13.18.0
>         Environment: Debian Jessie amd64
>            Reporter: Michael Kuron
>
> ASTERISK-27169 introduced OAuth support into res_xmpp. The change was cherry-picked into Asterisk 13 as commit 54e3ac402ff167ba2463b386ea25fa5327be86c6. Unfortunately, it seems like the cherry-picked code does not actually work due to func_curl changes in Asterisk 14 (probably commit 6bbcfb34bd411ec88a02e6c655b0d5b9821495a4). The token is correctly refreshed via func_curl, but the resulting XML is never copied to the read buffer. The error message displayed claims that "CURL is unavailable.", which is not true -- CURL is available, but the XML is never passed back. The full log is below. I am currently seeing if I can work up a patch to fix this in Asterisk 13. 14, 15 and master do not appear to be affected.
> {code}
> DEBUG[22076]: res_xmpp.c:3826 xmpp_client_thread: [google] Connecting
> DEBUG[22076]: res_xmpp.c:3658 xmpp_client_reconnect: Obtaining OAuth access token for client 'google'
> DEBUG[22076]: res_xmpp.c:3918 fetch_access_token: Performing OAuth 2.0 authentication for client 'google' using command: CURL(https://www.googleapis.com/oauth2/v3/token,client_id=XXX&client_secret=YYY&refresh_token=ZZZ&grant_type=refresh_token)
> DEBUG[22076]: func_curl.c:534 WriteMemoryCallback: Called with data=0xb4e2da14, str=0xb6803a50, realsize=199, len=16, used=0
> DEBUG[22076]: func_curl.c:538 WriteMemoryCallback: Now, len=256, used=199
> DEBUG[22076]: func_curl.c:704 acf_curl_helper: str='{
>  "access_token": "AAA",
>  "token_type": "Bearer",
>  "expires_in": 3600
> }'
> ERROR[22076]: res_xmpp.c:3921 fetch_access_token: CURL is unavailable. This is required for OAuth 2.0 authentication of XMPP client 'google'. Please ensure it is loaded.
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list