When executing the demo project presented here the following problem might appear.
When trying to download spid-entities-idps.xml from https://registry.spid.gov.it/entities-idp, the registry.spid.gov.it service is often not available returning the following error which causes the application to crash e not be able to start successfully
Resolving registry.spid.gov.it (registry.spid.gov.it)... 93.147.186.172Connecting to registry.spid.gov.it (registry.spid.gov.it)|93.147.186.172|:443... connected.HTTP request sent, awaiting response... 502 Bad GatewayERROR 502: Bad Gateway.
Traceback (most recent call last):File "/usr/lib/python3.12/xml/etree/ElementTree.py", line 1713, in closeself.parser.Parse(b"", True) # end of data^^^^^^^^^^^^^^^^^^^^^^^^^^^^xml.parsers.expat.ExpatError: no element found: line 1, column 0...saml2.SAMLError: Failed to parse metadata file: ./metadata/idp/spid-entities-idps.xml
A possible solution could be to update the example/entrypoint.sh as follows
When executing the demo project presented here the following problem might appear.
When trying to download spid-entities-idps.xml from https://registry.spid.gov.it/entities-idp, the registry.spid.gov.it service is often not available returning the following error which causes the application to crash e not be able to start successfully
Resolving registry.spid.gov.it (registry.spid.gov.it)... 93.147.186.172
Connecting to registry.spid.gov.it (registry.spid.gov.it)|93.147.186.172|:443... connected.
HTTP request sent, awaiting response... 502 Bad Gateway
ERROR 502: Bad Gateway.
Traceback (most recent call last):
File "/usr/lib/python3.12/xml/etree/ElementTree.py", line 1713, in close
self.parser.Parse(b"", True) # end of data
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
xml.parsers.expat.ExpatError: no element found: line 1, column 0
...
saml2.SAMLError: Failed to parse metadata file: ./metadata/idp/spid-entities-idps.xml
A possible solution could be to update the example/entrypoint.sh as follows
wget https://registry.spid.gov.it/entities-idp -O metadata/idp/spid-entities-idps.xml
status=$?
while [ $status != 0 ]; do
echo "Retrying download from registry.spid.gov.it..."
wget https://registry.spid.gov.it/entities-idp -O metadata/idp/spid-entities-idps.xml
status=$?
done