saml_idp 0.7.2 → 1.0.0
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 +5 -5
- data/Gemfile +1 -1
- data/README.md +71 -55
- data/lib/saml_idp/assertion_builder.rb +28 -3
- data/lib/saml_idp/configurator.rb +9 -3
- data/lib/saml_idp/controller.rb +27 -16
- data/lib/saml_idp/encryptor.rb +0 -1
- data/lib/saml_idp/fingerprint.rb +19 -0
- data/lib/saml_idp/incoming_metadata.rb +31 -1
- data/lib/saml_idp/metadata_builder.rb +25 -9
- data/lib/saml_idp/persisted_metadata.rb +4 -0
- data/lib/saml_idp/request.rb +103 -13
- data/lib/saml_idp/response_builder.rb +26 -6
- data/lib/saml_idp/saml_response.rb +62 -28
- data/lib/saml_idp/service_provider.rb +16 -6
- data/lib/saml_idp/signable.rb +1 -2
- data/lib/saml_idp/signature_builder.rb +2 -1
- data/lib/saml_idp/signed_info_builder.rb +2 -2
- data/lib/saml_idp/version.rb +1 -1
- data/lib/saml_idp/xml_security.rb +20 -15
- data/lib/saml_idp.rb +4 -3
- data/saml_idp.gemspec +46 -42
- data/spec/acceptance/idp_controller_spec.rb +5 -4
- data/spec/lib/saml_idp/algorithmable_spec.rb +6 -6
- data/spec/lib/saml_idp/assertion_builder_spec.rb +151 -8
- data/spec/lib/saml_idp/attribute_decorator_spec.rb +8 -8
- data/spec/lib/saml_idp/configurator_spec.rb +45 -7
- data/spec/lib/saml_idp/controller_spec.rb +86 -25
- data/spec/lib/saml_idp/encryptor_spec.rb +4 -4
- data/spec/lib/saml_idp/fingerprint_spec.rb +14 -0
- data/spec/lib/saml_idp/incoming_metadata_spec.rb +134 -0
- data/spec/lib/saml_idp/metadata_builder_spec.rb +30 -17
- data/spec/lib/saml_idp/name_id_formatter_spec.rb +3 -3
- data/spec/lib/saml_idp/request_spec.rb +153 -64
- data/spec/lib/saml_idp/response_builder_spec.rb +5 -3
- data/spec/lib/saml_idp/saml_response_spec.rb +146 -12
- data/spec/lib/saml_idp/service_provider_spec.rb +2 -2
- data/spec/lib/saml_idp/signable_spec.rb +1 -1
- data/spec/lib/saml_idp/signature_builder_spec.rb +2 -2
- data/spec/lib/saml_idp/signed_info_builder_spec.rb +3 -3
- data/spec/rails_app/app/controllers/saml_controller.rb +1 -1
- data/spec/rails_app/app/controllers/saml_idp_controller.rb +55 -3
- data/{app → spec/rails_app/app}/views/saml_idp/idp/new.html.erb +3 -4
- data/{app → spec/rails_app/app}/views/saml_idp/idp/saml_post.html.erb +1 -1
- data/spec/rails_app/config/application.rb +1 -6
- data/spec/rails_app/config/boot.rb +1 -1
- data/spec/rails_app/config/environments/development.rb +2 -5
- data/spec/rails_app/config/environments/production.rb +1 -0
- data/spec/rails_app/config/environments/test.rb +1 -0
- data/spec/spec_helper.rb +23 -1
- data/spec/support/certificates/sp_cert_req.csr +12 -0
- data/spec/support/certificates/sp_private_key.pem +16 -0
- data/spec/support/certificates/sp_x509_cert.crt +18 -0
- data/spec/support/saml_request_macros.rb +107 -5
- data/spec/support/security_helpers.rb +12 -2
- data/spec/xml_security_spec.rb +19 -15
- metadata +146 -80
- data/app/controllers/saml_idp/idp_controller.rb +0 -59
- data/spec/lib/saml_idp/.assertion_builder_spec.rb.swp +0 -0
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: saml_idp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jon Phenow
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 2025-10-09 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activesupport
|
|
@@ -16,169 +15,225 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - ">="
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
18
|
+
version: '5.2'
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
23
|
- - ">="
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
25
|
+
version: '5.2'
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
27
|
+
name: builder
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
30
29
|
requirements:
|
|
31
|
-
- - "
|
|
30
|
+
- - ">="
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
32
|
+
version: '3.0'
|
|
34
33
|
type: :runtime
|
|
35
34
|
prerelease: false
|
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
36
|
requirements:
|
|
38
|
-
- - "
|
|
37
|
+
- - ">="
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '
|
|
39
|
+
version: '3.0'
|
|
41
40
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
41
|
+
name: nokogiri
|
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
|
44
43
|
requirements:
|
|
45
|
-
- - "
|
|
44
|
+
- - ">="
|
|
46
45
|
- !ruby/object:Gem::Version
|
|
47
|
-
version:
|
|
46
|
+
version: 1.6.2
|
|
48
47
|
type: :runtime
|
|
49
48
|
prerelease: false
|
|
50
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
50
|
requirements:
|
|
52
|
-
- - "
|
|
51
|
+
- - ">="
|
|
53
52
|
- !ruby/object:Gem::Version
|
|
54
|
-
version:
|
|
53
|
+
version: 1.6.2
|
|
55
54
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
55
|
+
name: ostruct
|
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
|
58
57
|
requirements:
|
|
59
58
|
- - ">="
|
|
60
59
|
- !ruby/object:Gem::Version
|
|
61
|
-
version:
|
|
60
|
+
version: '0'
|
|
62
61
|
type: :runtime
|
|
63
62
|
prerelease: false
|
|
64
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
64
|
requirements:
|
|
66
65
|
- - ">="
|
|
67
66
|
- !ruby/object:Gem::Version
|
|
68
|
-
version:
|
|
67
|
+
version: '0'
|
|
69
68
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name:
|
|
69
|
+
name: rexml
|
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
|
72
71
|
requirements:
|
|
73
|
-
- - "
|
|
72
|
+
- - ">="
|
|
74
73
|
- !ruby/object:Gem::Version
|
|
75
|
-
version:
|
|
76
|
-
type: :
|
|
74
|
+
version: '0'
|
|
75
|
+
type: :runtime
|
|
77
76
|
prerelease: false
|
|
78
77
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
78
|
requirements:
|
|
80
|
-
- - "
|
|
79
|
+
- - ">="
|
|
81
80
|
- !ruby/object:Gem::Version
|
|
82
|
-
version:
|
|
81
|
+
version: '0'
|
|
83
82
|
- !ruby/object:Gem::Dependency
|
|
84
|
-
name:
|
|
83
|
+
name: xmlenc
|
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
|
85
|
+
requirements:
|
|
86
|
+
- - ">="
|
|
87
|
+
- !ruby/object:Gem::Version
|
|
88
|
+
version: 0.7.1
|
|
89
|
+
type: :runtime
|
|
90
|
+
prerelease: false
|
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
92
|
+
requirements:
|
|
93
|
+
- - ">="
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: 0.7.1
|
|
96
|
+
- !ruby/object:Gem::Dependency
|
|
97
|
+
name: activeresource
|
|
85
98
|
requirement: !ruby/object:Gem::Requirement
|
|
86
99
|
requirements:
|
|
87
100
|
- - "~>"
|
|
88
101
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: '
|
|
102
|
+
version: '6.1'
|
|
90
103
|
type: :development
|
|
91
104
|
prerelease: false
|
|
92
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
106
|
requirements:
|
|
94
107
|
- - "~>"
|
|
95
108
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '
|
|
109
|
+
version: '6.1'
|
|
97
110
|
- !ruby/object:Gem::Dependency
|
|
98
|
-
name:
|
|
111
|
+
name: appraisal
|
|
99
112
|
requirement: !ruby/object:Gem::Requirement
|
|
100
113
|
requirements:
|
|
101
|
-
- - "
|
|
114
|
+
- - ">="
|
|
102
115
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '
|
|
116
|
+
version: '0'
|
|
104
117
|
type: :development
|
|
105
118
|
prerelease: false
|
|
106
119
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
120
|
requirements:
|
|
108
|
-
- - "
|
|
121
|
+
- - ">="
|
|
109
122
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: '
|
|
123
|
+
version: '0'
|
|
111
124
|
- !ruby/object:Gem::Dependency
|
|
112
|
-
name:
|
|
125
|
+
name: capybara
|
|
113
126
|
requirement: !ruby/object:Gem::Requirement
|
|
114
127
|
requirements:
|
|
115
|
-
- - "
|
|
128
|
+
- - ">="
|
|
116
129
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: '
|
|
130
|
+
version: '2.16'
|
|
118
131
|
type: :development
|
|
119
132
|
prerelease: false
|
|
120
133
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
134
|
requirements:
|
|
122
|
-
- - "
|
|
135
|
+
- - ">="
|
|
123
136
|
- !ruby/object:Gem::Version
|
|
124
|
-
version: '
|
|
137
|
+
version: '2.16'
|
|
125
138
|
- !ruby/object:Gem::Dependency
|
|
126
139
|
name: rails
|
|
127
140
|
requirement: !ruby/object:Gem::Requirement
|
|
128
141
|
requirements:
|
|
129
|
-
- - "
|
|
142
|
+
- - ">="
|
|
130
143
|
- !ruby/object:Gem::Version
|
|
131
|
-
version: '
|
|
144
|
+
version: '5.2'
|
|
132
145
|
type: :development
|
|
133
146
|
prerelease: false
|
|
134
147
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
148
|
requirements:
|
|
136
|
-
- - "
|
|
149
|
+
- - ">="
|
|
137
150
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: '
|
|
151
|
+
version: '5.2'
|
|
139
152
|
- !ruby/object:Gem::Dependency
|
|
140
|
-
name:
|
|
153
|
+
name: debug
|
|
141
154
|
requirement: !ruby/object:Gem::Requirement
|
|
142
155
|
requirements:
|
|
143
|
-
- - "
|
|
156
|
+
- - ">="
|
|
144
157
|
- !ruby/object:Gem::Version
|
|
145
|
-
version:
|
|
158
|
+
version: '0'
|
|
146
159
|
type: :development
|
|
147
160
|
prerelease: false
|
|
148
161
|
version_requirements: !ruby/object:Gem::Requirement
|
|
149
162
|
requirements:
|
|
150
|
-
- - "
|
|
163
|
+
- - ">="
|
|
151
164
|
- !ruby/object:Gem::Version
|
|
152
|
-
version:
|
|
165
|
+
version: '0'
|
|
153
166
|
- !ruby/object:Gem::Dependency
|
|
154
|
-
name:
|
|
167
|
+
name: rake
|
|
155
168
|
requirement: !ruby/object:Gem::Requirement
|
|
156
169
|
requirements:
|
|
157
|
-
- - "
|
|
170
|
+
- - ">="
|
|
158
171
|
- !ruby/object:Gem::Version
|
|
159
|
-
version: '0
|
|
172
|
+
version: '0'
|
|
160
173
|
type: :development
|
|
161
174
|
prerelease: false
|
|
162
175
|
version_requirements: !ruby/object:Gem::Requirement
|
|
163
176
|
requirements:
|
|
164
|
-
- - "
|
|
177
|
+
- - ">="
|
|
165
178
|
- !ruby/object:Gem::Version
|
|
166
|
-
version: '0
|
|
179
|
+
version: '0'
|
|
167
180
|
- !ruby/object:Gem::Dependency
|
|
168
|
-
name:
|
|
181
|
+
name: rspec
|
|
182
|
+
requirement: !ruby/object:Gem::Requirement
|
|
183
|
+
requirements:
|
|
184
|
+
- - ">="
|
|
185
|
+
- !ruby/object:Gem::Version
|
|
186
|
+
version: 3.7.0
|
|
187
|
+
type: :development
|
|
188
|
+
prerelease: false
|
|
189
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
190
|
+
requirements:
|
|
191
|
+
- - ">="
|
|
192
|
+
- !ruby/object:Gem::Version
|
|
193
|
+
version: 3.7.0
|
|
194
|
+
- !ruby/object:Gem::Dependency
|
|
195
|
+
name: ruby-saml
|
|
169
196
|
requirement: !ruby/object:Gem::Requirement
|
|
170
197
|
requirements:
|
|
171
198
|
- - ">="
|
|
172
199
|
- !ruby/object:Gem::Version
|
|
173
|
-
version:
|
|
200
|
+
version: 1.7.2
|
|
174
201
|
type: :development
|
|
175
202
|
prerelease: false
|
|
176
203
|
version_requirements: !ruby/object:Gem::Requirement
|
|
177
204
|
requirements:
|
|
178
205
|
- - ">="
|
|
179
206
|
- !ruby/object:Gem::Version
|
|
180
|
-
version:
|
|
181
|
-
|
|
207
|
+
version: 1.7.2
|
|
208
|
+
- !ruby/object:Gem::Dependency
|
|
209
|
+
name: simplecov
|
|
210
|
+
requirement: !ruby/object:Gem::Requirement
|
|
211
|
+
requirements:
|
|
212
|
+
- - ">="
|
|
213
|
+
- !ruby/object:Gem::Version
|
|
214
|
+
version: '0'
|
|
215
|
+
type: :development
|
|
216
|
+
prerelease: false
|
|
217
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
218
|
+
requirements:
|
|
219
|
+
- - ">="
|
|
220
|
+
- !ruby/object:Gem::Version
|
|
221
|
+
version: '0'
|
|
222
|
+
- !ruby/object:Gem::Dependency
|
|
223
|
+
name: timecop
|
|
224
|
+
requirement: !ruby/object:Gem::Requirement
|
|
225
|
+
requirements:
|
|
226
|
+
- - ">="
|
|
227
|
+
- !ruby/object:Gem::Version
|
|
228
|
+
version: '0.8'
|
|
229
|
+
type: :development
|
|
230
|
+
prerelease: false
|
|
231
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
232
|
+
requirements:
|
|
233
|
+
- - ">="
|
|
234
|
+
- !ruby/object:Gem::Version
|
|
235
|
+
version: '0.8'
|
|
236
|
+
description: SAML IdP (Identity Provider) Library for Ruby
|
|
182
237
|
email: jon.phenow@sportngin.com
|
|
183
238
|
executables: []
|
|
184
239
|
extensions: []
|
|
@@ -187,9 +242,6 @@ files:
|
|
|
187
242
|
- Gemfile
|
|
188
243
|
- LICENSE
|
|
189
244
|
- README.md
|
|
190
|
-
- app/controllers/saml_idp/idp_controller.rb
|
|
191
|
-
- app/views/saml_idp/idp/new.html.erb
|
|
192
|
-
- app/views/saml_idp/idp/saml_post.html.erb
|
|
193
245
|
- lib/saml_idp.rb
|
|
194
246
|
- lib/saml_idp/algorithmable.rb
|
|
195
247
|
- lib/saml_idp/assertion_builder.rb
|
|
@@ -200,6 +252,7 @@ files:
|
|
|
200
252
|
- lib/saml_idp/default.rb
|
|
201
253
|
- lib/saml_idp/encryptor.rb
|
|
202
254
|
- lib/saml_idp/engine.rb
|
|
255
|
+
- lib/saml_idp/fingerprint.rb
|
|
203
256
|
- lib/saml_idp/hashable.rb
|
|
204
257
|
- lib/saml_idp/incoming_metadata.rb
|
|
205
258
|
- lib/saml_idp/logout_builder.rb
|
|
@@ -220,13 +273,14 @@ files:
|
|
|
220
273
|
- saml_idp.gemspec
|
|
221
274
|
- spec/acceptance/acceptance_helper.rb
|
|
222
275
|
- spec/acceptance/idp_controller_spec.rb
|
|
223
|
-
- spec/lib/saml_idp/.assertion_builder_spec.rb.swp
|
|
224
276
|
- spec/lib/saml_idp/algorithmable_spec.rb
|
|
225
277
|
- spec/lib/saml_idp/assertion_builder_spec.rb
|
|
226
278
|
- spec/lib/saml_idp/attribute_decorator_spec.rb
|
|
227
279
|
- spec/lib/saml_idp/configurator_spec.rb
|
|
228
280
|
- spec/lib/saml_idp/controller_spec.rb
|
|
229
281
|
- spec/lib/saml_idp/encryptor_spec.rb
|
|
282
|
+
- spec/lib/saml_idp/fingerprint_spec.rb
|
|
283
|
+
- spec/lib/saml_idp/incoming_metadata_spec.rb
|
|
230
284
|
- spec/lib/saml_idp/logout_request_builder_spec.rb
|
|
231
285
|
- spec/lib/saml_idp/logout_response_builder_spec.rb
|
|
232
286
|
- spec/lib/saml_idp/metadata_builder_spec.rb
|
|
@@ -251,6 +305,8 @@ files:
|
|
|
251
305
|
- spec/rails_app/app/mailers/.gitkeep
|
|
252
306
|
- spec/rails_app/app/models/.gitkeep
|
|
253
307
|
- spec/rails_app/app/views/layouts/application.html.erb
|
|
308
|
+
- spec/rails_app/app/views/saml_idp/idp/new.html.erb
|
|
309
|
+
- spec/rails_app/app/views/saml_idp/idp/saml_post.html.erb
|
|
254
310
|
- spec/rails_app/config.ru
|
|
255
311
|
- spec/rails_app/config/application.rb
|
|
256
312
|
- spec/rails_app/config/boot.rb
|
|
@@ -291,6 +347,9 @@ files:
|
|
|
291
347
|
- spec/spec_helper.rb
|
|
292
348
|
- spec/support/certificates/certificate1
|
|
293
349
|
- spec/support/certificates/r1_certificate2_base64
|
|
350
|
+
- spec/support/certificates/sp_cert_req.csr
|
|
351
|
+
- spec/support/certificates/sp_private_key.pem
|
|
352
|
+
- spec/support/certificates/sp_x509_cert.crt
|
|
294
353
|
- spec/support/responses/adfs_response_sha1.xml
|
|
295
354
|
- spec/support/responses/adfs_response_sha256.xml
|
|
296
355
|
- spec/support/responses/adfs_response_sha384.xml
|
|
@@ -312,25 +371,28 @@ files:
|
|
|
312
371
|
- spec/support/saml_request_macros.rb
|
|
313
372
|
- spec/support/security_helpers.rb
|
|
314
373
|
- spec/xml_security_spec.rb
|
|
315
|
-
homepage:
|
|
374
|
+
homepage: https://github.com/saml-idp/saml_idp
|
|
316
375
|
licenses:
|
|
317
|
-
-
|
|
318
|
-
metadata:
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
376
|
+
- MIT
|
|
377
|
+
metadata:
|
|
378
|
+
homepage_uri: https://github.com/saml-idp/saml_idp
|
|
379
|
+
source_code_uri: https://github.com/saml-idp/saml_idp
|
|
380
|
+
bug_tracker_uri: https://github.com/saml-idp/saml_idp/issues
|
|
381
|
+
documentation_uri: http://rdoc.info/gems/saml_idp/1.0.0
|
|
382
|
+
post_install_message: |2
|
|
383
|
+
If you're just recently updating saml_idp - please be aware we've changed the default
|
|
384
|
+
certificate. See the PR and a description of why we've done this here:
|
|
385
|
+
https://github.com/saml-idp/saml_idp/pull/29
|
|
326
386
|
|
|
327
|
-
|
|
328
|
-
|
|
387
|
+
If you just need to see the certificate `bundle open saml_idp` and go to
|
|
388
|
+
`lib/saml_idp/default.rb`
|
|
329
389
|
|
|
330
|
-
|
|
390
|
+
Similarly, please see the README about certificates - you should avoid using the
|
|
391
|
+
defaults in a Production environment. Post any issues you to github.
|
|
331
392
|
|
|
332
|
-
|
|
333
|
-
|
|
393
|
+
** New in Version 0.3.0 **
|
|
394
|
+
Encrypted Assertions require the xmlenc gem. See the example in the Controller
|
|
395
|
+
section of the README.
|
|
334
396
|
rdoc_options:
|
|
335
397
|
- "--charset=UTF-8"
|
|
336
398
|
require_paths:
|
|
@@ -339,28 +401,27 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
339
401
|
requirements:
|
|
340
402
|
- - ">="
|
|
341
403
|
- !ruby/object:Gem::Version
|
|
342
|
-
version: '2.
|
|
404
|
+
version: '2.5'
|
|
343
405
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
344
406
|
requirements:
|
|
345
407
|
- - ">="
|
|
346
408
|
- !ruby/object:Gem::Version
|
|
347
409
|
version: '0'
|
|
348
410
|
requirements: []
|
|
349
|
-
|
|
350
|
-
rubygems_version: 2.4.5.2
|
|
351
|
-
signing_key:
|
|
411
|
+
rubygems_version: 3.6.3
|
|
352
412
|
specification_version: 4
|
|
353
|
-
summary: SAML
|
|
413
|
+
summary: SAML Identity Provider for Ruby
|
|
354
414
|
test_files:
|
|
355
415
|
- spec/acceptance/acceptance_helper.rb
|
|
356
416
|
- spec/acceptance/idp_controller_spec.rb
|
|
357
|
-
- spec/lib/saml_idp/.assertion_builder_spec.rb.swp
|
|
358
417
|
- spec/lib/saml_idp/algorithmable_spec.rb
|
|
359
418
|
- spec/lib/saml_idp/assertion_builder_spec.rb
|
|
360
419
|
- spec/lib/saml_idp/attribute_decorator_spec.rb
|
|
361
420
|
- spec/lib/saml_idp/configurator_spec.rb
|
|
362
421
|
- spec/lib/saml_idp/controller_spec.rb
|
|
363
422
|
- spec/lib/saml_idp/encryptor_spec.rb
|
|
423
|
+
- spec/lib/saml_idp/fingerprint_spec.rb
|
|
424
|
+
- spec/lib/saml_idp/incoming_metadata_spec.rb
|
|
364
425
|
- spec/lib/saml_idp/logout_request_builder_spec.rb
|
|
365
426
|
- spec/lib/saml_idp/logout_response_builder_spec.rb
|
|
366
427
|
- spec/lib/saml_idp/metadata_builder_spec.rb
|
|
@@ -385,6 +446,8 @@ test_files:
|
|
|
385
446
|
- spec/rails_app/app/mailers/.gitkeep
|
|
386
447
|
- spec/rails_app/app/models/.gitkeep
|
|
387
448
|
- spec/rails_app/app/views/layouts/application.html.erb
|
|
449
|
+
- spec/rails_app/app/views/saml_idp/idp/new.html.erb
|
|
450
|
+
- spec/rails_app/app/views/saml_idp/idp/saml_post.html.erb
|
|
388
451
|
- spec/rails_app/config.ru
|
|
389
452
|
- spec/rails_app/config/application.rb
|
|
390
453
|
- spec/rails_app/config/boot.rb
|
|
@@ -425,6 +488,9 @@ test_files:
|
|
|
425
488
|
- spec/spec_helper.rb
|
|
426
489
|
- spec/support/certificates/certificate1
|
|
427
490
|
- spec/support/certificates/r1_certificate2_base64
|
|
491
|
+
- spec/support/certificates/sp_cert_req.csr
|
|
492
|
+
- spec/support/certificates/sp_private_key.pem
|
|
493
|
+
- spec/support/certificates/sp_x509_cert.crt
|
|
428
494
|
- spec/support/responses/adfs_response_sha1.xml
|
|
429
495
|
- spec/support/responses/adfs_response_sha256.xml
|
|
430
496
|
- spec/support/responses/adfs_response_sha384.xml
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
|
|
3
|
-
module SamlIdp
|
|
4
|
-
class IdpController < ActionController::Base
|
|
5
|
-
include SamlIdp::Controller
|
|
6
|
-
|
|
7
|
-
unloadable unless Rails::VERSION::MAJOR >= 4
|
|
8
|
-
protect_from_forgery
|
|
9
|
-
|
|
10
|
-
if Rails::VERSION::MAJOR >= 4
|
|
11
|
-
before_action :validate_saml_request, only: [:new, :create]
|
|
12
|
-
else
|
|
13
|
-
before_filter :validate_saml_request, only: [:new, :create]
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def new
|
|
17
|
-
render template: "saml_idp/idp/new"
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def show
|
|
21
|
-
render xml: SamlIdp.metadata.signed
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def create
|
|
25
|
-
unless params[:email].blank? && params[:password].blank?
|
|
26
|
-
person = idp_authenticate(params[:email], params[:password])
|
|
27
|
-
if person.nil?
|
|
28
|
-
@saml_idp_fail_msg = "Incorrect email or password."
|
|
29
|
-
else
|
|
30
|
-
@saml_response = idp_make_saml_response(person)
|
|
31
|
-
render :template => "saml_idp/idp/saml_post", :layout => false
|
|
32
|
-
return
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
render :template => "saml_idp/idp/new"
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
def logout
|
|
39
|
-
idp_logout
|
|
40
|
-
@saml_response = idp_make_saml_response(nil)
|
|
41
|
-
render :template => "saml_idp/idp/saml_post", :layout => false
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
def idp_logout
|
|
45
|
-
raise NotImplementedError
|
|
46
|
-
end
|
|
47
|
-
private :idp_logout
|
|
48
|
-
|
|
49
|
-
def idp_authenticate(email, password)
|
|
50
|
-
raise NotImplementedError
|
|
51
|
-
end
|
|
52
|
-
protected :idp_authenticate
|
|
53
|
-
|
|
54
|
-
def idp_make_saml_response(person)
|
|
55
|
-
raise NotImplementedError
|
|
56
|
-
end
|
|
57
|
-
protected :idp_make_saml_response
|
|
58
|
-
end
|
|
59
|
-
end
|
|
Binary file
|