Skip to content

Commit 62a9639

Browse files
committed
Add warning about the use of OneLogin_Saml2_IdPMetadataParser class
1 parent aec7517 commit 62a9639

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,13 @@ There's an easier method -- use a metadata exchange. Metadata is just an XML fi
549549

550550
Using ````parse_remote```` IdP metadata can be obtained and added to the settings withouth further ado.
551551

552+
But take in mind that the OneLogin_Saml2_IdPMetadataParser class does not validate in any way the URL that is introduced in order to be parsed.
553+
554+
Usually the same administrator that handles the Service Provider also sets the URL to the IdP, which should be a trusted resource.
555+
556+
But there are other scenarios, like a SAAS app where the administrator of the app delegates this functionality to other users. In this case, extra precaution should be taken in order to validate such URL inputs and avoid attacks like SSRF.
557+
558+
552559
``
553560
idp_data = OneLogin_Saml2_IdPMetadataParser.parse_remote('https://example.com/auth/saml2/idp/metadata')
554561
``

src/onelogin/saml2/idp_metadata_parser.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
class OneLogin_Saml2_IdPMetadataParser(object):
2323
"""
2424
A class that contain methods related to obtaining and parsing metadata from IdP
25+
26+
This class does not validate in any way the URL that is introduced,
27+
make sure to validate it properly before use it in a get_metadata method.
2528
"""
2629

2730
@staticmethod

0 commit comments

Comments
 (0)