-
Notifications
You must be signed in to change notification settings - Fork 38
Impedire il caricamento di due metadata SP con uguale entityID #205
Comments
@alranel l'errore è bloccante o solo informativo? Potremmo gestirlo come gli altri errori eventuali all'avvio dell'applicazione, ovvero:
Cosa ne pensi? |
Se possibile impedirei l'avviamento del testenv, che direi sia la cosa più semplice anche da implementare e il modo più immediato per far correggere il problema |
@fmarco Are you still working on this? If not, do you mind if I do? |
@bfabio Feel free to work on it 👍 |
Thanks @fmarco |
The SP metadata get loaded once at the start from all sources to index the entities ids and where the come from. Upon every request from an SP, the metadata of that SP gets reloaded from the last known source: if it's not there anymore the server tries to look in all known sources again. Protip! Using: ``` metadata: local: - conf/*.xml ``` Allows to drop config files to the directory at runtime and have their configuration picked up without restarting the server. Other goodies: * Invalid SP metadata are logged and discarded, but no longer prevent the rest of metadata from loading. (Fix italia#210) * Duplicate entityIds are discarded with precedence given to local sources (local > db > remote) (Fix italia#205). * Display the source of the SP metadata in the UI
The SP metadata get loaded once at the start from all sources to index the entities ids and where the come from. Upon every request from an SP, the metadata of that SP gets reloaded from the last known source: if it's not there anymore the server tries to look in all known sources again. Protip! Using: ``` metadata: local: - conf/*.xml ``` Allows to drop config files to the directory at runtime and have their configuration picked up without restarting the server. Other goodies: * Invalid SP metadata are logged and discarded, but no longer prevent the rest of metadata from loading. (Fix italia#210) * Duplicate entityIds are discarded with precedence given to local sources (local > db > remote) (Fix italia#205). * Display the source of the SP metadata in the UI
The SP metadata get loaded once at the start from all sources to index the entities ids and where the come from. Upon every request from an SP, the metadata of that SP gets reloaded from the last known source: if it's not there anymore the server tries to look in all known sources again. Protip! Using: ``` metadata: local: - conf/*.xml ``` Allows to drop config files to the directory at runtime and have their configuration picked up without restarting the server. Other goodies: * Invalid SP metadata are logged and discarded, but no longer prevent the rest of metadata from loading. (Fix italia#210) * Duplicate entityIds are discarded with precedence given to local sources (local > db > remote) (Fix italia#205). * Display the source of the SP metadata in the UI
The SP metadata get loaded once at the start from all sources to index the entities ids and where the come from. Upon every request from an SP, the metadata of that SP gets reloaded from the last known source: if it's not there anymore the server tries to look in all known sources again. Protip! Using: ``` metadata: local: - conf/*.xml ``` Allows to drop config files to the directory at runtime and have their configuration picked up without restarting the server. Other goodies: * Invalid SP metadata are logged and discarded, but no longer prevent the rest of metadata from loading. (Fix italia#210) * Duplicate entityIds are discarded with precedence given to local sources (local > db > remote) (Fix italia#205). * Display the source of the SP metadata in the UI
Reopening after the revert in #320. |
qui spid-testenv2/testenv/storages.py Line 233 in efb0854
si potrebbe fare anche uno unique preventivo in caso di db ... nada, è già primary key! Ma magari dato che ci siamo invece di body di tipo String facciamo di tipo |
Complessivamente questo comportamento non è ad oggi riscontrabile quando spid-testenv2 carica i metadata da RDBMS, perché entityID è primarykey e quindi unique. Per quanto riguarda i metadata da file o da locazione remota e considerando il comportamento di altri prodotti SP/IDP SAML2, vedi shibboleth, pysaml2 e altri, questo problema è abbastanza tipico. I metadata crescono nel tempo e fare controlli di questo genere produrrebbe pericolosi rallentamenti della piattaforma. Nel caso in cui i metadata crescessero sarebbe consigliabile adottare RDBMS o MDQ, con il primo otteniamo la certezza dell'unicità della chiave primaria, con il secondo la sicurezza del processo di batch di aggregazione. metadata con entityID uguali producono che alla prima occorrenza riscontrata avviene il break del loop di ricerca, così è su tante altre piattaforme, la validazione basata su file andrebbe condotta da un operatore con una procedura totalmente out-of-band. Di certo RDBMS e MDQ sono soluzioni generali e ineludibili quando le dimensioni della federazione crescono nel tempo |
Se si configurano due metadata SP con lo stesso entityID, l'accettazione della AuthnRequest restituisce un errore.
Bisogna impedire che l'utente possa confondersi, e quindi bisogna prevenire questa situazione restituendo un errore all'avvio del testenv.
The text was updated successfully, but these errors were encountered: