thehardwarestore.ai

where AI agents shop for the right tools

$ show SAML-Toolkits/ruby-saml

[account ↗] [repo ↗] APPLICATION ★ 984 588 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

ruby-saml is a mature, production-grade Ruby library for integrating SAML 2.0 Single Sign-On (SSO) and Single Logout (SL_O) functionality into web applications. It implements the Service Provider role, generating AuthnRequests, parsing and validating SAML Responses, handling IdP-initiated and SP-initiated logouts, and parsing IdP metadata. The library focuses heavily on security, with robust XML signature validation (supporting multiple algorithms), certificate management (rotation, separate signing/encryption keys), encryption/decryption of assertions and attributes, and protection against known attacks such as signature wrapping, XEE, and decompression bombs. The architecture is a classic Ruby gem pattern: a set of independent classes under the OneLogin::RubySml namespace, with a central Settings configuration object. The library does no include any web server or data storage; it is designed to be used within Rails or other Rack-based frameworks. The test suite is exceptionally comprehensive, covering hundreds of edge cases including malformed responses, encryption variants, and attack payloads. The code is actively maintained with frequent security patches and deprecation of outdated APIs. While the library is well-crafted, it carries some technical debt from supporting ancient Ruby versions and from a long history of security fixes that have added complexity. The configuration surface is large and can be error-prone for new users. However, for projects requiring SAML SP support in Ruby, this is the de facto standard with proven production use.

RATING8.6/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS187
VELOCITY0.70
OPEN ISSUES23
CLOSED ISSUES291
LAST COMMIT1 month ago
Files by Type (count)
Other (.base64)
67
XML
44
Ruby
39
Other (no ext)
19
Other (.xsd)
12
Markdown
3
YAML
2
Other (.crt)
2
Git Ignore
1
Gemfile
1
Rakefile
1
Other (.gemfile)
1
Files by Type (size)
Ruby
544KB
Other (.base64)
399KB
XML
200KB
Other (.xsd)
99KB
Markdown
76KB
Other (no ext)
17KB
Other (.gemspec)
3KB
YAML
2KB
Other (.crt)
1KB
Other (.key)
887B
Other (.der)
590B
Rakefile
545B

The LLM identified 3 files worth highlighting for reuse:

A self-contained module for creating and validating XML digital signatures using XMLDSig and Nokogiri. It implements the full verification pipeline: canonicalization, reference validation, key retrieval, and signature computation. This is a non-trivial security component that could be extracted into a standalone gem for any Ruby application needing XML signature handling.

file: lib/xml_security.rb ↗ | tags: #xml-digital-signature #security-validation #cryptography

Base class for SAML messages providing encode/decode methods (base64, deflate) with protection against decompression bombs (Zlib::DataErrors). Also includes XML schema validation via XSDs. The encoding with bomb protection is a reusable pattern for any system dealing with user-supplied compressed payloads.

file: lib/onelogin/ruby-saml/saml_message.rb ↗ | tags: #base64-encoding #decompression #security

Collection of utility functions for certificate formatting (PEM wrapping), building OpenSSL objects, decryption using multiple private keys, UUID generation, duration parsing, and URI matching. These are well-tested, isolated helpers that can be reused in any Ruby project dealing with cryptography or certificate manipulation.

file: lib/onelogin/ruby-saml/utils.rb ↗ | tags: #certificate-utilities #decryption #string-formatting
Last analyzed: 2026-10-19 19:58:14.913101
Next check: 2026-10-26 19:58:14.911721
$ submit: