Skip to content

Commit 715cc44

Browse files
Merge pull request #163 from bbodenmiller/patch-1
show idp_cert_multi support
2 parents a0eedd6 + 9e72ae5 commit 715cc44

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ use OmniAuth::Strategies::SAML,
3737
:idp_sso_target_url => "idp_sso_target_url",
3838
:idp_sso_target_url_runtime_params => {:original_request_param => :mapped_idp_param},
3939
:idp_cert => "-----BEGIN CERTIFICATE-----\n...-----END CERTIFICATE-----",
40+
:idp_cert_multi => {
41+
:signing => ["-----BEGIN CERTIFICATE-----\n...-----END CERTIFICATE-----", "-----BEGIN CERTIFICATE-----\n...-----END CERTIFICATE-----", ...],
42+
:encryption => []
43+
}
4044
:idp_cert_fingerprint => "E7:91:B2:E1:...",
4145
:idp_cert_fingerprint_validator => lambda { |fingerprint| fingerprint },
4246
:name_identifier_format => "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"
@@ -60,6 +64,10 @@ Rails.application.config.middleware.use OmniAuth::Builder do
6064
:idp_sso_target_url => "idp_sso_target_url",
6165
:idp_sso_target_url_runtime_params => {:original_request_param => :mapped_idp_param},
6266
:idp_cert => "-----BEGIN CERTIFICATE-----\n...-----END CERTIFICATE-----",
67+
:idp_cert_multi => {
68+
:signing => ["-----BEGIN CERTIFICATE-----\n...-----END CERTIFICATE-----", "-----BEGIN CERTIFICATE-----\n...-----END CERTIFICATE-----", ...],
69+
:encryption => []
70+
}
6371
:idp_cert_fingerprint => "E7:91:B2:E1:...",
6472
:idp_cert_fingerprint_validator => lambda { |fingerprint| fingerprint },
6573
:name_identifier_format => "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"
@@ -107,16 +115,20 @@ Note that when [integrating with Devise](#devise-integration), the URL path will
107115
`original_param_value`. Optional.
108116

109117
* `:idp_cert` - The identity provider's certificate in PEM format. Takes precedence
110-
over the fingerprint option below. This option or `:idp_cert_fingerprint` or `:idp_cert_fingerprint_validator` must
118+
over the fingerprint option below. This option or `:idp_cert_multi` or `:idp_cert_fingerprint` or `:idp_cert_fingerprint_validator` must
111119
be present.
120+
121+
* `:idp_cert_multi` - Multiple identity provider certificates in PEM format. Takes precedence
122+
over the fingerprint option below. This option `:idp_cert` or `:idp_cert_fingerprint` or `:idp_cert_fingerprint_validator` must
123+
be present.
112124

113125
* `:idp_cert_fingerprint` - The SHA1 fingerprint of the certificate, e.g.
114126
"90:CC:16:F0:8D:...". This is provided from the identity provider when setting up
115-
the relationship. This option or `:idp_cert` or `:idp_cert_fingerprint_validator` MUST be present.
127+
the relationship. This option or `:idp_cert` or `:idp_cert_multi` or `:idp_cert_fingerprint_validator` MUST be present.
116128

117129
* `:idp_cert_fingerprint_validator` - A lambda that MUST accept one parameter
118130
(the fingerprint), verify if it is valid and return it if successful. This option
119-
or `:idp_cert` or `:idp_cert_fingerprint` MUST be present.
131+
or `:idp_cert` or `:idp_cert_multi` or `:idp_cert_fingerprint` MUST be present.
120132

121133
* `:name_identifier_format` - Used during SP-initiated SSO. Describes the format of
122134
the username required by this application. If you need the email address, use

0 commit comments

Comments
 (0)