Yodlee SOAP API中的多级MFA的XML交换是什么样子的?为什么我们会出现以下错误



我们正在构建一个使用Yodlee数据的聚合应用程序,虽然与我们合作的大多数机构在使用多因素身份验证时都存在安全问题,但有一家机构(JP Morgan)采用了"MULTI_LEVEL"MFA方法。在尝试测试和处理这一问题时,我们使用了Java示例应用程序"Aggregation12"(这是迄今为止我们用作所有其他Yodlee SOAP交互的实现示例)

当尝试使用控制台应用程序"yconsole.sh"与任何MULTI_LEVEL MFA机构交谈时(JP Morgan Retirement options[cobrand ID 4999]是一个真实的选项,DagMultilevel[cobband ID 15682]是一个测试选项),初始登录步骤运行良好,但我们无法在没有错误消息的情况下通过多级身份验证的第一个令牌步骤。访问日志中的XML如下所示:

=======================================================
= Elapsed: 538 milliseconds
= In message: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><putMFARequestForSite xmlns="http://refresh.refresh.core.soap.yodlee.com"><userContext xmlns=""><cobrandId>10008392</cobrandId><channelId>-1</channelId><locale><country>US</country><language>en</language><variant></variant></locale><tncVersion>2</tncVersion><applicationId>7A318B9CD555B6A3FF82D22CBF3C9F00</applicationId><cobrandConversationCredentials xsi:type="ns1:SessionCredentials" xmlns:ns1="http://login.ext.soap.yodlee.com"><sessionToken>10122012_0:87e50a0bac49909f03763e2819c5c3f7da170f0c0b6b8e74efc594875089b25efeb4142bbe5b42d73f5682d33c44c8a33718c15d53d5f4afda68c8d389e15f39</sessionToken></cobrandConversationCredentials><preferenceInfo><currencyCode>USD</currencyCode><timeZone>PST</timeZone><dateFormat>MM/dd/yyyy</dateFormat><currencyNotationType>SYMBOL_NOTATION</currencyNotationType><numberFormat><decimalSeparator>.</decimalSeparator><groupingSeparator>,</groupingSeparator><groupPattern>###,https://www.pivotaltracker.com/epic/show/0.##</groupPattern></numberFormat></preferenceInfo><fetchAllLocaleData>false</fetchAllLocaleData><conversationCredentials xsi:type="ns2:SessionCredentials" xmlns:ns2="http://login.ext.soap.yodlee.com"><sessionToken>10122012_0:794aeae009e6ae1d6b7f89be3a133b74c7618ec794917b9ca41b83e903d847ab7a318260120729e5851b1bdc956711d37549d29e941dd1e25fb628d70e5b70d5</sessionToken></conversationCredentials><valid>true</valid><isPasswordExpired>false</isPasswordExpired></userContext><userResponse xsi:type="ns3:MFATokenResponse" xmlns="" xmlns:ns3="http://mfarefresh.core.soap.yodlee.com"><token xsi:type="xsd:string">5731234567</token></userResponse><memSiteAccId xmlns="">14616812</memSiteAccId></putMFARequestForSite></soapenv:Body></soapenv:Envelope>
= Out message: <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>InvalidSiteAccountExceptionFaultMessage</faultstring><detail><ns4:InvalidSiteAccountExceptionFault xmlns:ns4="http://core.soap.yodlee.com"><faultText>com.yodlee.core.InvalidSiteAccountException: Argument value not found: 14616812</faultText></ns4:InvalidSiteAccountExceptionFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
=======================================================

我们运行这些测试的soap服务器是:https://eval.yodlee.com/yodsoap/services

因此,两个真正的问题:

1) 此错误类型(InvalidSiteAccountExceptionFault)的来源是什么?我可以从这个页面上看到,它的意思是"成员网站帐户标识符不存在,不属于这个用户,或者是一个自定义项目。",但我不清楚这种语言(也许"成员网站账户标识符"是yodlee的应用词汇表,对外部开发人员来说没有意义?)

2) 是否有一个良好的文件资源专门涵盖与具有MULTI_LEVEL MFA的机构互动的正确流程?

1)此错误类型(InvalidSiteAccountExceptionFault)的来源是什么?我可以从这个页面上看到,它的意思是"成员网站帐户标识符不存在,不属于这个用户,或者是一个自定义项目。",但我不清楚这种语言(也许"成员网站账户标识符"是yodlee的应用词汇,对外部开发人员来说没有意义?)

答案-

Yodlee根据银行账户、信用卡账户、贷款账户、投资账户等不同类型的银行产品设计了数据模型。在Yodlee的术语中,所有这些不同的产品都被称为容器。每个站点都启用了多个容器,并为每个容器分配了一个内容服务id(CSID)。Yodlee遵循的层次结构类似

站点(站点ID)
|---->集装箱1(储蓄/支票(CSID 1))
|---->容器2(信用卡(CSID 2))

Now there are two ways of linking an account with Yodlee.

1) 基于容器的添加-在这种情况下,您将特定于一个容器的帐户链接起来,因此数据将仅适用于该特定产品。

2) 基于站点的添加-在这种情况下,您可以将帐户链接到具有不同容器的站点,因此与所有容器关联的数据都可用。

示例-我们有Chase网站,有储蓄/支票账户、卡账户等。现在,如果您使用内容服务id(CSID)进行基于容器的添加并链接Chase信用卡,您将只看到信用卡详细信息,您的储蓄/支票账户详细信息将不会被获取。如果执行基于站点的添加,则将根据最终站点上的可用性链接与该站点关联的所有容器。因此,如果您的登录同时关联了储蓄/支票账户和信用卡账户,那么两者都将被提取。

无论何时链接帐户,都会创建ItemId作为该帐户的唯一标识符。如果完成了基于站点的添加,则将创建一个siteAccountId,然后在siteAccountId下创建ItemId。对于基于站点的聚合,任何API调用的主键都是siteAccountId,而对于基于容器的添加,主键是ItemId。

您正在进行基于容器的添加,然后尝试使用站点聚合API(putMFARequestForSite),因此您会出现异常。

因此,在进行基于容器的添加时,对于MFA流使用-

获取MFAR响应(https://developer.yodlee.com/Indy_FinApp/Aggregation_Services_Guide/REST_API_Reference/getMFAResponse)用于获取MFA问题,然后使用putMFARequest API(https://developer.yodlee.com/Indy_FinApp/Aggregation_Services_Guide/REST_API_Reference/putMFARequest)因为他把答案寄回了Yodlee。

2)是否有一个好的文档资源专门涵盖与具有MULTI_LEVEL MFA的机构互动的正确流程

答案-

任何MFA的基本流程都是

1) 调用getMFAResponse API获取MFA问题/令牌/图像

2) 调用putMFARequest API将答案发布回Yodlee

3) 再次转到#1,检查是否有更多问题/令牌/图像可用。继续执行这3个步骤,直到getMFAResponse中的error_code有值为止。

如果值为0(零),则MFA流成功,否则出现错误。

修改答案以添加示例putMFAR响应请求XML

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body>   <putMFARequest xmlns="http://refresh.refresh.core.soap.yodlee.com"><userContext xmlns=""><cobrandId>xxxxxxxxxxxxx</cobrandId><channelId>-1</channelId><locale>              <country>US</country><language>en</language><variant /></locale>           <tncVersion>2</tncVersion><applicationId>xxxxxxxxxxxxxxxxxx</applicationId>           <cobrandConversationCredentials xmlns:ns1="http://login.ext.soap.yodlee.com" xsi:type="ns1:SessionCredentials">            <sessionToken>10122012_0:xxxxxxxxxxxxxxxxxxxxxxxxxxxx</sessionToken>         </cobrandConversationCredentials><preferenceInfo><currencyCode>USD</currencyCode><timeZone>PST</timeZone><dateFormat>MM/dd/yyyy</dateFormat>              <currencyNotationType>SYMBOL_NOTATION</currencyNotationType><numberFormat>                <decimalSeparator>.</decimalSeparator><groupingSeparator>,</groupingSeparator>        <groupPattern>###,##0.##</groupPattern></numberFormat></preferenceInfo>            <fetchAllLocaleData>false</fetchAllLocaleData><conversationCredentials xmlns:ns2="http://login.ext.soap.yodlee.com" xsi:type="ns2:SessionCredentials"<sessionToken>10122012_0:xxxxxxxxxxxxxxxxxxxxx</sessionToken></conversationCredentials><valid>true</valid><isPasswordExpired>false</isPasswordExpired></userContext><userResponse xmlns="" xmlns:ns3="http://mfarefresh.core.soap.yodlee.com" xsi:type="ns3:MFATokenResponse"><token xsi:type="xsd:string">123456</token></userResponse><itemId xmlns="">14672972</itemId></putMFARequest></soapenv:Body></soapenv:Envelope>

此外,您还可以从https://developer.yodlee.com/Indy_FinApp/Sample_Apps/JAVA_Sample您可以使用itemManagement菜单来链接基于容器的帐户,并使用它来检查添加帐户的流程。上述MFA的基本流程也将处理多级。

相关内容