Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download metadata SP da server senza TLS #280

Closed
alranel opened this issue Jun 2, 2024 · 0 comments · Fixed by #281
Closed

Download metadata SP da server senza TLS #280

alranel opened this issue Jun 2, 2024 · 0 comments · Fixed by #281

Comments

@alranel
Copy link
Member

alranel commented Jun 2, 2024

In fase di test o sviluppo può essere conveniente lavorare in locale, ad esempio facendo girare il proprio SP in un altro container Docker. (Per consentire a spid-saml-check di scaricare i metadati SP bisogna solitamente sostituire l'hostname "localhost" nell'URL dei metadati con "host.docker.internal".)

Qualora i metadati del SP non vengano esposti via HTTPS, spid-saml-check non riesce a scaricarli ma non fornisce un errore chiaro.

Come workaround bisogna modificare il file spid-validator/server/lib/utils.js, cambiando questa riga:

            https.get(src, (res) => {

in:

            http.get(src, (res) => {

Idealmente, per supportare sia indirizzi HTTP che HTTPS si dovrebbe fare qualcosa del tipo:

var q = url.parse(src, true);
var protocol = (q.protocol == "http") ? require('http') : require('https');
protocol.get(src, (res) => {
   ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant