omniauth-txssc-sso2 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7edb14517a8106484bdb94e93989e8e00ed06d3249e88b76b1175afa83feccba
4
- data.tar.gz: e47521a5bde4e8d682212cab4d30d37ce9340c7ff20f9e5be7be734b68760eb6
3
+ metadata.gz: 113fd20e716ee72204a39653d54f66aa7121494bec3c84d3d853ff3e648ec5b7
4
+ data.tar.gz: b392e5a4521a7069dddd2af8f684d49525813a88bef3308ad349d0589b870608
5
5
  SHA512:
6
- metadata.gz: 110611dfd9cf503f00dc55394c1547a10648337b76ae958fd53bbadeb1c1fa745ad0a4fe47e1675ff51f0828be1c0b832e3d55008b9afd9e7dfffc698ce1f913
7
- data.tar.gz: 9e034aed55556d8ab633eda02967a5ec1dca01cb21b49d81de22bb7c57570d1afbf66abaac2d45ec59aee7183856c226f2059a20da0104bd630c137c0cdbae3b
6
+ metadata.gz: 3cfc2e41774bff374487ba580b1cd8dbd01cf98a296d6f1025240028a0865efc7d2e99f510517579191f26cf6135f9a3bce3ae63c8992ffb097a6b58a08a1709
7
+ data.tar.gz: f74e57671d1ee6315e49fb043d656c998f42cfa71930ff002e838a67ffa0cc42281f70ba6a20b433c121f59c1acd5b269436817a1180f87a266fd9495b275c25
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.1 (unreleased)
4
+
5
+ - A TLS failure on the token exchange (for example a container that doesn't trust SSO2's
6
+ certificate chain) is reported as the `failed_to_connect` failure instead of raising
7
+ `Faraday::SSLError` out of the callback.
8
+ - README: client containers on Debian bookworm or older need the SSL.com 2022 root certificates
9
+ added to their trust store, or the token exchange with SSO2 fails TLS verification.
10
+
3
11
  ## 0.1.0 (2026-11-19)
4
12
 
5
13
  - First version: `txssc_sso2` OmniAuth strategy for SSO2's authorization code flow.
data/README.md CHANGED
@@ -155,6 +155,14 @@ app's token with that app's client secret, apps keep working through the change
155
155
  and browsers leave `SameSite=Lax` cookies (the Rails default) off cross-site POSTs, for example during local
156
156
  development (`localhost`) against SSO2 qual. `relay_form_post` turns that POST into a same-URL GET, where
157
157
  Lax cookies are sent, so no cookie changes are needed in any environment.
158
+ - The token exchange is a server-to-server HTTPS call from your app to SSO2, so your app's **container must
159
+ trust SSO2's certificate chain**. IT's certificates chain to the SSL.com TLS Root CA 2022 roots, which the
160
+ `ca-certificates` package in Debian bookworm and older (for example `ruby:3.3-slim` and every Ruby 2.7 image)
161
+ does not include. The symptom is a failed login with `certificate verify failed (unable to get local issuer
162
+ certificate)` in the log; the strategy reports it as `failed_to_connect`. Fix: copy the two SSL.com 2022 root
163
+ certificates into the image and run `update-ca-certificates` in the Dockerfile's base stage; SSO2.0-Test-App's
164
+ `docker/ca-certificates/` has the files and the two Dockerfile lines. Debian trixie images
165
+ (`ruby:3.4.8-slim` and newer) already trust these roots.
158
166
 
159
167
  ## Development
160
168
 
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "jwt"
4
+ require "openssl"
4
5
  require "uri"
5
6
  require "omniauth-oauth2"
6
7
 
@@ -85,6 +86,16 @@ module OmniAuth
85
86
  super
86
87
  end
87
88
 
89
+ # A TLS failure on the token exchange (usually a container that doesn't trust SSO2's
90
+ # certificate chain; see the README) is not rescued by omniauth-oauth2, so it would
91
+ # surface as an unhandled exception. Report it as failed_to_connect instead; the
92
+ # OpenSSL message goes to OmniAuth's log.
93
+ def callback_phase
94
+ super
95
+ rescue ::Faraday::SSLError, ::OpenSSL::SSL::SSLError => e
96
+ fail!(:failed_to_connect, e)
97
+ end
98
+
88
99
  protected
89
100
 
90
101
  def build_access_token
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module TxsscSso2
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-txssc-sso2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Hawks