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 +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +8 -0
- data/lib/omniauth/strategies/txssc_sso2.rb +11 -0
- data/lib/omniauth/txssc_sso2/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 113fd20e716ee72204a39653d54f66aa7121494bec3c84d3d853ff3e648ec5b7
|
|
4
|
+
data.tar.gz: b392e5a4521a7069dddd2af8f684d49525813a88bef3308ad349d0589b870608
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|