Giter Site home page Giter Site logo

Comments (15)

alranel avatar alranel commented on July 17, 2024 1

Secondo me sarebbe bene unificarli, soprattutto perché per poter scrivere degli unit test ci servirà una unica funzione validate_authnrequest() (nome di fantasia) che poi al suo interno può essere implementata anche in modo articolato usando varie strategie di validazione, ma che all'esterno dovrebbe restituire gli errori in un modo unitario. Partendo da questo presupposto puoi tranquillamente mostrarli con un solo template

from spid-testenv2.

fmarco avatar fmarco commented on July 17, 2024

@alexrj questo bug è già gestito in nella PR #31 :)

from spid-testenv2.

alranel avatar alranel commented on July 17, 2024

@fmarco ho testato con il branch feature/issue-3-validazione-login (PR #31) ma ancora non va: non mi mostra nessun errore nella tabella errori.
Questa cosa deve far parte della validazione del tag <Issuer>.

from spid-testenv2.

fmarco avatar fmarco commented on July 17, 2024

@alexrj partendo sempre dal branch feature/issue-3-validazione-login, dovresti vedere una tabella relativa all'errore("entity id pippo non registrato etc.").
Domanda: attualmente, sempre per via del flusso pysaml2, alcuni controlli vengono effettuati in seguito al parsing del messaggio e vengono generati errori mostrati in una schermata leggermente diversa. Conviene unificarli, per quanto possibile? Oppure validiamo prima la struttura generale del messaggio e poi ritorniamo eventuali errori più specifici in momenti diversi?

from spid-testenv2.

alranel avatar alranel commented on July 17, 2024

Ho appena provato con master inviando un Issuer non corrispondente all'entityID del metadata SP e viene accettato senza errori, visualizzo il form di login.

from spid-testenv2.

fmarco avatar fmarco commented on July 17, 2024

@alexrj potresti allegarmi authnrequest e vers. di python?

from spid-testenv2.

alranel avatar alranel commented on July 17, 2024

AuthnRequest:

<saml2p:AuthnRequest Version="2.0" AssertionConsumerServiceIndex="0" ID="8388a090e3cc852d3764349b267fa569" AttributeConsumingServiceIndex="1" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" IssueInstant="2018-07-10T15:08:34Z" Destination="http://localhost:8088/sso" xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"><saml2:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity" NameQualifier="https://localhost/xxxxxx">https://localhost/xxxxxx</saml2:Issuer><saml2p:NameIDPolicy Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient"></saml2p:NameIDPolicy><saml2p:RequestedAuthnContext Comparison="minimum"><saml2:AuthnContextClassRef>https://www.spid.gov.it/SpidL1</saml2:AuthnContextClassRef></saml2p:RequestedAuthnContext></saml2p:AuthnRequest>

Estratto dal metadata SP:

<md:EntityDescriptor 
    xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"  
    xmlns:ds="http://www.w3.org/2000/09/xmldsig#"  
    entityID="https://localhost/"  
    ID="_681a637-6cd4-434f-92c3-4fed720b2ad8">

Python 2.7.10

from spid-testenv2.

fmarco avatar fmarco commented on July 17, 2024

@alexrj questo errore è stato gestito in uno dei commit recenti, va però articolato meglio e spostato in nella tabella, giusto? (mi confermi intanto che vedi la schermata di errore generica contenente il messaggio "destinazione messaggio errata" ?)

from spid-testenv2.

alranel avatar alranel commented on July 17, 2024

Al momento esce questo:

screen shot 2018-07-10 at 17 38 28

from spid-testenv2.

fmarco avatar fmarco commented on July 17, 2024

@alexrj pushato un fix, riprova pure

from spid-testenv2.

fmarco avatar fmarco commented on July 17, 2024

@alexrj hai avuto modo di riprovare?

from spid-testenv2.

alranel avatar alranel commented on July 17, 2024

Confermo che ora appare la seguente schermata di errore:

screen shot 2018-08-06 at 22 38 27

from spid-testenv2.

alranel avatar alranel commented on July 17, 2024

Tuttavia c'è un problema.

Se mando una AuthnRequest che contiene un Issuer sconosciuto, e chiedo un AttributeConsumingService ottengo questo errore:

screen shot 2018-08-06 at 22 40 29

Evidentemente non riuscendo a trovare il Service Provider compone una lista vuota di valori attesi e quindi questa validazione fallisce. Però questo messaggio di errore è molto fuorviante. La validazione dovrebbe andare in ordine di priorità e cominciare dall'Issuer perché molte delle validazioni successive dipendono da esso.

from spid-testenv2.

fmarco avatar fmarco commented on July 17, 2024

@alexrj pushato fix e test su master

from spid-testenv2.

alranel avatar alranel commented on July 17, 2024

Confermo

from spid-testenv2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.