Skip to content

Commit 20136c1

Browse files
authored
Merge pull request #594 from onelogin/idp_parser_warning
Add warning about the use of IdpMetadataParser class.
2 parents bff32ac + da2d0cc commit 20136c1

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@ However, ruby-saml never enables this dangerous Nokogiri configuration;
153153
ruby-saml never enables DTDLOAD, and it never disables NONET.
154154

155155

156+
The OneLogin::RubySaml::IdpMetadataParser class does not validate in any way the URL that is introduced in order to be parsed.
157+
158+
Usually the same administrator that handles the Service Provider also sets the URL to the IdP, which should be a trusted resource.
159+
160+
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.
161+
156162
## Getting Started
157163
In order to use the toolkit you will need to install the gem (either manually or using Bundler), and require the library in your Ruby application:
158164

lib/onelogin/ruby-saml/idp_metadata_parser.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ module RubySaml
1111

1212
# Auxiliary class to retrieve and parse the Identity Provider Metadata
1313
#
14+
# This class does not validate in any way the URL that is introduced,
15+
# make sure to validate it properly before use it in a parse_remote method.
16+
# Read the `Security warning` section of the README.md file to get more info
17+
#
1418
class IdpMetadataParser
1519

1620
module SamlMetadata

0 commit comments

Comments
 (0)