Afrostream / afrostream-back-end

Simple backo for afrostream
1 stars 0 forks source link

tapptic: orange: multi-écran: erreur 500 login orange sur un compte n'ayant pas d'abo afrostream #353

Closed syndr0m closed 7 years ago

syndr0m commented 7 years ago

justinelanore [10:10 AM]
Bonjour Marc, ça va ? Nous avons fait quelques tests hier sur le parcours Orange et avec ce compte : 0680682570 / TB6tm9b9 Nous avons une erreur 500 (Server Error) (...) marc [10:38 AM]
c'est un compte qui n'a pas d'abonnement afrostream avec orange c'est ca ? car je viens de regarder dans le détail la réponse SAML orange, et il n'y a pas de collective identifier (numéro de ligne) pour cet utilisateur probablement car il n'a pas de compte afrostream orange je ne sais pas fonctionnellement ce qui est prévu dans l'application dans ce cas, un message d'erreur générique ou une erreur plus précise ? (...) justinelanore [10:42 AM]
Orange nous demande d’afficher ce type de pop up image (...) En gros, Si on a une 200 (ok ) -> on log l'utilisateur Si on a autre chose (500 ou autre), on affiche la popup d’erreur Si on a une 200 et que c'est orange, on check le "ise2" si existe pas, il n'est pas abonné Orange Si il existe, il est abonné Orange Si on a un planCode == nil, on affiche la popup d'abonnement expiré

syndr0m commented 7 years ago

Analyse du call :

image

JSON retourné par l'api à l'app dans le hash de l'url :

{"statusCode":500,"data":{"error":"Internal Server Error","message":"missing orange.identity.collectiveidentifier in response orange=","statusCode":500}}

Logentries : image

Analyse réponse SAML orange :

<?xml version="1.0" encoding="UTF-8"?>
<Response xmlns="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" ID="_avEFDUx1t4YQBBAIdZg" Version="2.0" IssueInstant="2016-09-27T08:11:49Z" Destination="https://afrostream.tv/auth/orange/callback" InResponseTo="_dd6c4dc5a47fb1a4d270">
  <Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion">http://otvp.auth.orange.fr</Issuer>
  <Status>
    <StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
  </Status>
  <Assertion xmlns="urn:oasis:names:tc:SAML:2.0:assertion" ID="_mwhvm42yLxLxSIS0UpT" Version="2.0" IssueInstant="2016-09-27T08:11:49Z">
    <Issuer>http://otvp.auth.orange.fr</Issuer>
    <Subject>
      <NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent">SVOAFR-200-bafhFN0s/Fhu46HZDOLVzdO9T4tPoSft83ITQ0aVSCg=</NameID>
      <SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
        <SubjectConfirmationData Recipient="https://afrostream.tv/auth/orange/callback" NotOnOrAfter="2016-09-27T08:26:49Z" InResponseTo="_dd6c4dc5a47fb1a4d270"/>
      </SubjectConfirmation>
    </Subject>
    <Conditions>
      <AudienceRestriction>
        <Audience>SVOAFRA19A33F788FCE4</Audience>
      </AudienceRestriction>
    </Conditions>
    <AuthnStatement AuthnInstant="2016-09-27T08:11:49Z">
      <AuthnContext><AuthnContextClassRef>urn:orange:auth:SAML:2.0:ac:classes:PasswordCookieBased</AuthnContextClassRef>
      </AuthnContext>
    </AuthnStatement>
    <AttributeStatement>
      <Attribute Name="OrangeAPIToken" NameFormat="urn:oasis:names:tc:SAML:2.0:profiles:attribute:basic">
        <AttributeValue xsi:type="xs:string">B64ROQDdI2t+NMsqjYsfJtHDK3ImXw9M1Yrn/iFQ0zfR5r2IwBb5aMFHixveicucw5JHj6k+GbJoE9MlogBywi+1Y7nbWmn0adlKK0JYgOn/2w=|MCO=OFR|sau=2|ted=1480234309|tcd=1474963909|rK77brbeA1AddNjCTKw9bkqMgPM=</AttributeValue>
      </Attribute>
    </AttributeStatement>
  </Assertion>
</Response>

identity orange reçue après parsing :

{
 issuer: 'http://otvp.auth.orange.fr',
 nameID: 'SVOAFR-200-bafhFN0s/Fhu46HZDOLVzdO9T4tPoSft83ITQ0aVSCg=',
 nameIDFormat: 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',
 OrangeAPIToken: 'B64ROQDdI2t+NMsqjYsfJtHDK3ImXw9M1Yrn/iFQ0zfR5r2IwBb5aMFHixveicucw5JHj6k+GbJoE9MlogBywi+1Y7nbWmn0adlKK0JYgOn/2w=|MCO=OFR|sau=2|ted=1480234309|tcd=1474963909|rK77brbeA1AddNjCTKw9bkqMgPM=' }
}

Conclusion :

Proposition:

syndr0m commented 7 years ago

il a été décidé avec tapptic qu'en cas d'erreur ORANGE_MISSING_COLLECTIVEIDENTIFIER , le statusCode du json serait 403

image

syndr0m commented 7 years ago

done