Skip to content

Commit 7ae2af6

Browse files
committed
Fix typos on README and UPGRADING
1 parent bd87168 commit 7ae2af6

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Response assertions from Identity Providers (IdPs).
3131
**Important:** This libary does not support the IdP-side of SAML authentication,
3232
such as creating SAML Response messages to assert a user's identity.
3333

34-
A Rails 4 reference implemenation is avaiable at the
34+
A Rails 4 reference implementation is available at the
3535
[Ruby SAML Demo Project](https://github.com/saml-toolkits/ruby-saml-example).
3636

3737
### Vulnerability Reporting
@@ -46,9 +46,10 @@ it by email to the maintainer: sixto.martin.garcia+security@gmail.com
4646
and from a trusted source. Ruby SAML does not perform any validation that the URL
4747
you entered is correct and/or safe.
4848
- **False-Positive Security Warnings:** Some tools may incorrectly report Ruby SAML as a
49-
potential security vulnerability, due to it's dependency on Nokogiri. Such warnings can
49+
potential security vulnerability, due to its dependency on Nokogiri. Such warnings can
5050
be ignored; Ruby SAML uses Nokogiri in a safe way, by always disabling its DTDLOAD option
5151
and enabling its NONET option.
52+
- **Prevent Replay attacks:** A replay attack is when an attacker intercepts a valid SAML assertion and "replays" it at a later time to gain unauthorized access. The `ruby-saml` library provides the tools to prevent this, but **you, the developer, must implement the core logic**, see an specific section later in the README.
5253

5354
### Supported Ruby Versions
5455

@@ -179,7 +180,7 @@ def saml_settings
179180
end
180181
```
181182

182-
The use of settings.issuer is deprecated in favour of settings.sp_entity_id since version 1.11.0
183+
The use of settings.issuer is deprecated in favor of settings.sp_entity_id since version 1.11.0
183184

184185
Some assertion validations can be skipped by passing parameters to `RubySaml::Response.new()`.
185186
For example, you can skip the `AuthnStatement`, `Conditions`, `Recipient`, or the `SubjectConfirmation`
@@ -255,13 +256,13 @@ Ruby SAML allows different ways to validate the signature of the SAML Response:
255256
`idp_cert_fingerprint` and `idp_cert_fingerprint_algorithm` parameters.
256257

257258
In addition, you may pass the option `:relax_signature_validation` to `SloLogoutrequest` and
258-
`Logoutresponse` if want to skip signature validation on logout.
259+
`Logoutresponse` if you want to skip signature validation on logout.
259260

260261
The `idp_cert_fingerprint` option is deprecated for the following reasons. It will be
261262
removed in Ruby SAML version 2.1.0.
262263
1. It only works with HTTP-POST binding, not HTTP-Redirect, since the full certificate
263264
is not sent in the Redirect URL parameters.
264-
2. It is theoretically be susceptible to collision attacks, by which a malicious
265+
2. It is theoretically susceptible to collision attacks, by which a malicious
265266
actor could impersonate the IdP. (However, as of January 2025, such attacks have not
266267
been publicly demonstrated for SHA-256.)
267268
3. It has been removed already from several other SAML libraries in other languages.
@@ -365,8 +366,7 @@ Those return an Hash instead of a `Settings` object, which may be useful for con
365366

366367
### Validating Signature of Metadata and retrieve settings
367368

368-
Right now there is no method at ruby_saml to validate the signature of the metadata that gonna be parsed,
369-
but it can be done as follows:
369+
Right now there is no method at ruby_saml to validate the signature of the metadata that is going to be parsed, but it can be done as follows:
370370
* Download the XML.
371371
* Validate the Signature, providing the cert.
372372
* Provide the XML to the parse method if the signature was validated
@@ -403,7 +403,7 @@ if valid
403403
entity_id: "<entity_id_of_the_entity_to_be_retrieved>"
404404
)
405405
else
406-
print "Metadata Signarture failed to be verified with the cert provided"
406+
print "Metadata Signature failed to be verified with the cert provided"
407407
end
408408
```
409409

@@ -632,7 +632,7 @@ settings.security[:logout_requests_signed] = true # Enable signature on Logout
632632
settings.security[:logout_responses_signed] = true # Enable signature on Logout Response
633633
```
634634

635-
Signatures will be handled automatically for both `HTTP-Redirect` and `HTTP-Redirect` Binding.
635+
Signatures will be handled automatically for both `HTTP-POST` and `HTTP-Redirect` Binding.
636636
Note that the RelayState parameter is used when creating the Signature on the `HTTP-Redirect` Binding.
637637
Remember to provide it to the Signature builder if you are sending a `GET RelayState` parameter or the
638638
signature validation process will fail at the IdP.
@@ -655,7 +655,7 @@ settings.security[:want_assertions_encrypted] = true # Invalidate SAML messages
655655
### Verifying Signature on IdP Assertions
656656

657657
You may require the IdP to sign its SAML Assertions using the following setting.
658-
With will add `<md:SPSSODescriptor WantAssertionsSigned="true">` to your SP Metadata XML.
658+
This will add `<md:SPSSODescriptor WantAssertionsSigned="true">` to your SP Metadata XML.
659659
The signature will be checked against the `<md:KeyDescriptor use="signing">` element
660660
present in the IdP's metadata.
661661

@@ -729,7 +729,7 @@ JRuby cannot support ECDSA due to a [known issue](https://github.com/jruby/jruby
729729
### Audience Validation
730730

731731
A service provider should only consider a SAML response valid if the IdP includes an <AudienceRestriction>
732-
element containting an <Audience> element that uniquely identifies the service provider. Unless you specify
732+
element containing an <Audience> element that uniquely identifies the service provider. Unless you specify
733733
the `skip_audience` option, Ruby SAML will validate that each SAML response includes an <Audience> element
734734
whose contents matches `settings.sp_entity_id`.
735735

@@ -762,7 +762,7 @@ def sp_logout_request
762762
settings = saml_settings
763763

764764
if settings.idp_slo_service_url.nil?
765-
logger.info "SLO IdP Endpoint not found in settings, executing then a normal logout'"
765+
logger.info "SLO IdP Endpoint not found in settings, then executing a normal logout'"
766766
delete_session
767767
else
768768

@@ -936,7 +936,7 @@ or underscore, and can only contain letters, digits, underscores, hyphens, and p
936936

937937
### Custom Metadata Fields
938938

939-
Some IdPs may require to add SPs to add additional fields (Organization, ContactPerson, etc.)
939+
Some IdPs may require SPs to add additional fields (Organization, ContactPerson, etc.)
940940
into the SP metadata. This can be done by extending the `RubySaml::Metadata` class and
941941
overriding the `#add_extras` method where the first arg is a
942942
[Nokogiri::XML::Builder](https://nokogiri.org/rdoc/Nokogiri/XML/Builder.html) object as per

UPGRADING.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ This issue is likely not critical for most IdPs, but since it is not tested, it
2626

2727
### Root "OneLogin" namespace changed to "RubySaml"
2828

29-
RubySaml version `2.0.0` changes the root namespace from `RubySaml::` to just `RubySaml::`.
30-
Please remove `` and `onelogin/` everywhere in your codebase. Aside from this namespace change,
29+
RubySaml version `2.0.0` changes the root namespace from `OneLogin::RubySaml::` to just `RubySaml::`.
30+
Please remove `onelogin/` everywhere in your codebase. Aside from this namespace change,
3131
the class names themselves have intentionally been kept the same.
3232

3333
Note that the project folder structure has also been updated accordingly. Notably, the directory
@@ -36,6 +36,7 @@ Note that the project folder structure has also been updated accordingly. Notabl
3636
For backward compatibility, the alias `OneLogin = Object` has been set, so `RubySaml::` will still work
3737
as before. This alias will be removed in RubySaml version `3.0.0`.
3838

39+
3940
### Deprecation and removal of "XMLSecurity" namespace
4041

4142
RubySaml version `2.0.0` deprecates the `::XMLSecurity` namespace and the following classes:
@@ -75,7 +76,7 @@ settings.security[:signature_method] = RubySaml::XML::RSA_SHA1
7576

7677
RubySaml `1.x` used a combination of REXML and Nokogiri for XML parsing and generation.
7778
In `2.0.0`, REXML has been replaced with Nokogiri. As a result, there are minor differences
78-
in how XML is generated, ncluding SAML requests and SP Metadata:
79+
in how XML is generated, including SAML requests and SP Metadata:
7980

8081
1. All XML namespace declarations will be on the root node of the XML. Previously,
8182
some declarations such as `xmlns:ds` were done on child nodes.
@@ -121,7 +122,7 @@ The reasons for this change are:
121122
### Removal of embed_sign setting
122123

123124
The deprecated `settings.security[:embed_sign]` parameter has been removed. If you were using it, please instead switch
124-
to using both the `settings.idp_sso_service_binding` and `settings.idp_slo_service_binding` parameters as show below.
125+
to using both the `settings.idp_sso_service_binding` and `settings.idp_slo_service_binding` parameters as shown below.
125126
(This new syntax is supported on version 1.13.0 and later.)
126127

127128
```ruby
@@ -231,7 +232,7 @@ when parsing a SAML Message (`settings.check_malformed_doc`).
231232

232233
The SignedDocument class defined at xml_security.rb experienced several changes.
233234
We don't expect compatibilty issues if you use the main methods offered by ruby-saml, but if
234-
you use a fork or customized usage, is possible that you need to adapt your code.
235+
you use a fork or customized usage, it is possible that you will need to adapt your code.
235236

236237
## Upgrading from 1.12.x to 1.13.0
237238

@@ -257,7 +258,7 @@ in favor of `idp_sso_service_url` and `idp_slo_service_url`. The `IdpMetadataPar
257258

258259
## Upgrading from 1.10.x to 1.11.0
259260

260-
Version `1.11.0` deprecates the use of `settings.issuer` in favour of `settings.sp_entity_id`.
261+
Version `1.11.0` deprecates the use of `settings.issuer` in favor of `settings.sp_entity_id`.
261262
There are two new security settings: `settings.security[:check_idp_cert_expiration]` and
262263
`settings.security[:check_sp_cert_expiration]` (both false by default) that check if the
263264
IdP or SP X.509 certificate has expired, respectively.
@@ -352,7 +353,7 @@ It adds security improvements in order to prevent Signature wrapping attacks.
352353

353354
## Upgrading from 1.1.x to 1.2.x
354355

355-
Version `1.2` adds IDP metadata parsing improvements, uuid deprecation in favour of SecureRandom,
356+
Version `1.2` adds IDP metadata parsing improvements, uuid deprecation in favor of SecureRandom,
356357
refactor error handling and some minor improvements.
357358

358359
There is no compatibility issue detected.
@@ -367,7 +368,7 @@ Version `1.1` adds some improvements on signature validation and solves some nam
367368

368369
Version `1.0` is a recommended update for all Ruby SAML users as it includes security fixes.
369370

370-
Version `1.0` adds security improvements like entity expansion limitation, more SAML message validations, and other important improvements like decrypt support.
371+
Version `1.0` adds security improvements like entity expansion limitation, more SAML message validations, and other important improvements like decryption support.
371372

372373
### Important Changes
373374

0 commit comments

Comments
 (0)