cie-es 0.0.7 → 0.0.8
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/.document +0 -0
- data/Gemfile +0 -0
- data/LICENSE +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/cie-es.gemspec +1 -1
- data/lib/cie-es.rb +0 -0
- data/lib/cie/ruby-saml/authrequest.rb +0 -0
- data/lib/cie/ruby-saml/coding.rb +0 -0
- data/lib/cie/ruby-saml/error_handling.rb +0 -0
- data/lib/cie/ruby-saml/logging.rb +0 -0
- data/lib/cie/ruby-saml/logout_request.rb +0 -0
- data/lib/cie/ruby-saml/logout_response.rb +0 -0
- data/lib/cie/ruby-saml/metadata.rb +94 -35
- data/lib/cie/ruby-saml/request.rb +0 -0
- data/lib/cie/ruby-saml/response.rb +0 -0
- data/lib/cie/ruby-saml/settings.rb +1 -1
- data/lib/cie/ruby-saml/utils.rb +0 -0
- data/lib/cie/ruby-saml/validation_error.rb +0 -0
- data/lib/cie/ruby-saml/version.rb +0 -0
- data/lib/cie/xml_security.rb +0 -0
- data/lib/cie/xml_security_new.rb +1 -1
- data/lib/schemas/saml20assertion_schema.xsd +0 -0
- data/lib/schemas/saml20protocol_schema.xsd +0 -0
- data/lib/schemas/xenc_schema.xsd +0 -0
- data/lib/schemas/xmldsig_schema.xsd +0 -0
- data/test/certificates/certificate1 +0 -0
- data/test/logoutrequest_test.rb +0 -0
- data/test/request_test.rb +0 -0
- data/test/response_test.rb +0 -0
- data/test/responses/adfs_response_sha1.xml +0 -0
- data/test/responses/adfs_response_sha256.xml +0 -0
- data/test/responses/adfs_response_sha384.xml +0 -0
- data/test/responses/adfs_response_sha512.xml +0 -0
- data/test/responses/no_signature_ns.xml +0 -0
- data/test/responses/open_saml_response.xml +0 -0
- data/test/responses/response1.xml.base64 +0 -0
- data/test/responses/response2.xml.base64 +0 -0
- data/test/responses/response3.xml.base64 +0 -0
- data/test/responses/response4.xml.base64 +0 -0
- data/test/responses/response5.xml.base64 +0 -0
- data/test/responses/response_with_ampersands.xml +0 -0
- data/test/responses/response_with_ampersands.xml.base64 +0 -0
- data/test/responses/simple_saml_php.xml +0 -0
- data/test/responses/wrapped_response_2.xml.base64 +0 -0
- data/test/settings_test.rb +0 -0
- data/test/test_helper.rb +0 -0
- data/test/xml_security_test.rb +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e9b45df15ab2a270e39bababdbfe65400e2b71579f595f9f1ea984d4eea22f9a
|
|
4
|
+
data.tar.gz: 33d10e6d3434f710053ca31696498318e7cb8422e95a052ae0e067406581dbef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f108fb0af0e6bbe2ba8277763d88399e94f6b3d7b1c3cb3cef629b59c7bff06f5033fb708e2b273ec9296c8aeff5404d62af9bba0da16742c26f80f20a7b2aa4
|
|
7
|
+
data.tar.gz: ea5a8cd9060333536452a6e95608cea296d225be6fe2251c3aecf175e190649b53da7f519fe5ff7ee34edbf1984ecb54171bca3a79aa994366bda08b65b45e88
|
data/.document
CHANGED
|
File without changes
|
data/Gemfile
CHANGED
|
File without changes
|
data/LICENSE
CHANGED
|
File without changes
|
data/README.md
CHANGED
|
File without changes
|
data/Rakefile
CHANGED
|
File without changes
|
data/cie-es.gemspec
CHANGED
|
@@ -2,7 +2,7 @@ $LOAD_PATH.push File.expand_path('../lib', __FILE__)
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = 'cie-es'
|
|
5
|
-
s.version = '0.0.
|
|
5
|
+
s.version = '0.0.8'
|
|
6
6
|
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
8
8
|
s.authors = ["Fabiano Pavan"]
|
data/lib/cie-es.rb
CHANGED
|
File without changes
|
|
File without changes
|
data/lib/cie/ruby-saml/coding.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -33,7 +33,8 @@ module Cie
|
|
|
33
33
|
meta_doc = Cie::XMLSecurityNew::Document.new
|
|
34
34
|
root = meta_doc.add_element "md:EntityDescriptor", {
|
|
35
35
|
"xmlns:md" => "urn:oasis:names:tc:SAML:2.0:metadata",
|
|
36
|
-
"xmlns:xml" => "http://www.w3.org/XML/1998/namespace"
|
|
36
|
+
"xmlns:xml" => "http://www.w3.org/XML/1998/namespace",
|
|
37
|
+
"xmlns:cie" => "https://www.cartaidentita.interno.gov.it/saml-extensions"
|
|
37
38
|
}
|
|
38
39
|
if settings.issuer != nil
|
|
39
40
|
root.attributes["entityID"] = settings.issuer
|
|
@@ -202,40 +203,6 @@ module Cie
|
|
|
202
203
|
end
|
|
203
204
|
}
|
|
204
205
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
#Per EIDAS
|
|
209
|
-
# #AttributeConsumingService
|
|
210
|
-
# attr_cons_service = sp_sso.add_element "md:AttributeConsumingService", {
|
|
211
|
-
# "index" => "99",
|
|
212
|
-
# }
|
|
213
|
-
# service_name
|
|
214
|
-
# = attr_cons_service.add_element "md:ServiceName", {
|
|
215
|
-
# "xml:lang" => "it"
|
|
216
|
-
# }
|
|
217
|
-
# service_name.text = "eIDAS Natural Person Minimum Attribute Set"
|
|
218
|
-
# settings.requested_attribute.each_with_index{ |attribute, index|
|
|
219
|
-
# attr_cons_service.add_element "md:RequestedAttribute", {
|
|
220
|
-
# "Name" => attribute
|
|
221
|
-
# }
|
|
222
|
-
# }
|
|
223
|
-
|
|
224
|
-
# #AttributeConsumingService
|
|
225
|
-
# attr_cons_service = sp_sso.add_element "md:AttributeConsumingService", {
|
|
226
|
-
# "index" => "100",
|
|
227
|
-
# }
|
|
228
|
-
# service_name = attr_cons_service.add_element "md:ServiceName", {
|
|
229
|
-
# "xml:lang" => "it"
|
|
230
|
-
# }
|
|
231
|
-
# service_name.text = "eIDAS Natural Person Full Attribute Set"
|
|
232
|
-
# settings.requested_attribute.each_with_index{ |attribute, index|
|
|
233
|
-
# attr_cons_service.add_element "md:RequestedAttribute", {
|
|
234
|
-
# "Name" => attribute
|
|
235
|
-
# }
|
|
236
|
-
# }
|
|
237
|
-
|
|
238
|
-
|
|
239
206
|
end
|
|
240
207
|
#organization
|
|
241
208
|
organization = root.add_element "md:Organization"
|
|
@@ -252,6 +219,98 @@ module Cie
|
|
|
252
219
|
}
|
|
253
220
|
org_url.text = settings.organization['org_url']
|
|
254
221
|
|
|
222
|
+
#Nuovi tag contactperson
|
|
223
|
+
|
|
224
|
+
contact_person_administrative = root.add_element "md:ContactPerson", {
|
|
225
|
+
"contactType" => "administrative"
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
extensions_administrative = contact_person_administrative.add_element "md:Extensions"
|
|
229
|
+
|
|
230
|
+
public_extension = extensions_administrative.add_element "cie:Public"
|
|
231
|
+
public_extension.text = ""
|
|
232
|
+
|
|
233
|
+
unless settings.hash_ente['ipa_code'].blank?
|
|
234
|
+
ipa_code_ente = extensions_administrative.add_element "cie:IPACode"
|
|
235
|
+
ipa_code_ente.text = settings.hash_ente['ipa_code']
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
ipa_code_catente = extensions_administrative.add_element "cie:IPACategory"
|
|
239
|
+
|
|
240
|
+
unless settings.hash_ente['belfiore'].blank?
|
|
241
|
+
belfiore_ente = extensions_administrative.add_element "cie:Municipality"
|
|
242
|
+
belfiore_ente.text = ( settings.hash_ente['belfiore'].blank? ? '' : settings.hash_ente['belfiore'].upcase )
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
unless settings.hash_ente['organization_name'].blank?
|
|
246
|
+
company_ente = contact_person_administrative.add_element "md:Company"
|
|
247
|
+
company_ente.text = settings.hash_ente['organization_name']
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
unless settings.hash_ente['organization_email'].blank?
|
|
251
|
+
email_address_ente = contact_person_administrative.add_element "md:EmailAddress"
|
|
252
|
+
email_address_ente.text = settings.hash_ente['organization_email']
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
unless settings.hash_ente['organization_tel'].blank?
|
|
256
|
+
telephone_number_ente = contact_person_administrative.add_element "md:TelephoneNumber"
|
|
257
|
+
telephone_number_ente.text = settings.hash_ente['organization_tel']
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
contact_person_technical = root.add_element "md:ContactPerson", {
|
|
262
|
+
"contactType" => "technical"
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
extensions_private = contact_person_technical.add_element "md:Extensions"
|
|
266
|
+
|
|
267
|
+
private_extension = extensions_private.add_element "cie:Private"
|
|
268
|
+
private_extension.text = ""
|
|
269
|
+
|
|
270
|
+
unless settings.hash_fornitore_servizi['p_iva'].blank?
|
|
271
|
+
vat_number_fornitore = extensions_private.add_element "cie:VATNumber"
|
|
272
|
+
vat_number_fornitore.text = settings.hash_fornitore_servizi['p_iva']
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
unless settings.hash_fornitore_servizi['cf'].blank?
|
|
276
|
+
cf_fornitore = extensions_private.add_element "cie:FiscalCode"
|
|
277
|
+
cf_fornitore.text = settings.hash_fornitore_servizi['cf']
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
unless settings.hash_fornitore_servizi['cod_ateco'].blank?
|
|
281
|
+
cod_ateco_fornitore = extensions_private.add_element "cie:NACE2Code"
|
|
282
|
+
cod_ateco_fornitore.text = settings.hash_fornitore_servizi['cod_ateco']
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
unless settings.hash_fornitore_servizi['cod_istat'].blank?
|
|
286
|
+
cod_istat_fornitore = extensions_private.add_element "cie:Municipality"
|
|
287
|
+
cod_istat_fornitore.text = settings.hash_fornitore_servizi['cod_istat']
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
unless settings.hash_fornitore_servizi['prov'].blank?
|
|
291
|
+
prov_fornitore = extensions_private.add_element "cie:Province"
|
|
292
|
+
prov_fornitore.text = settings.hash_fornitore_servizi['prov']
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
stato_fornitore = extensions_private.add_element "cie:Country"
|
|
296
|
+
stato_fornitore.text = 'IT'
|
|
297
|
+
|
|
298
|
+
unless settings.hash_fornitore_servizi['nome_fornitore'].blank?
|
|
299
|
+
company_aggregatore = contact_person_technical.add_element "md:Company"
|
|
300
|
+
company_aggregatore.text = settings.hash_fornitore_servizi['nome_fornitore']
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
unless settings.hash_fornitore_servizi['email_fornitore'].blank?
|
|
304
|
+
email_address_aggregatore = contact_person_technical.add_element "md:EmailAddress"
|
|
305
|
+
email_address_aggregatore.text = settings.hash_fornitore_servizi['email_fornitore']
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
unless settings.hash_fornitore_servizi['tel_fornitore'].blank?
|
|
309
|
+
telephone_number_aggregatore = contact_person_technical.add_element "md:TelephoneNumber"
|
|
310
|
+
telephone_number_aggregatore.text = settings.hash_fornitore_servizi['tel_fornitore']
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
|
|
255
314
|
#meta_doc << REXML::XMLDecl.new(version='1.0', encoding='UTF-8')
|
|
256
315
|
meta_doc << REXML::XMLDecl.new("1.0", "UTF-8")
|
|
257
316
|
|
|
File without changes
|
|
File without changes
|
|
@@ -10,7 +10,7 @@ module Cie
|
|
|
10
10
|
attr_accessor :name_identifier_value, :name_identifier_format
|
|
11
11
|
attr_accessor :sessionindex, :issuer, :destination_service_url, :authn_context, :requester_identificator
|
|
12
12
|
attr_accessor :single_logout_service_url, :single_logout_service_binding, :single_logout_destination
|
|
13
|
-
attr_accessor :skip_validation
|
|
13
|
+
attr_accessor :skip_validation, :hash_ente, :hash_fornitore_servizi
|
|
14
14
|
|
|
15
15
|
def initialize(config = {})
|
|
16
16
|
config.each do |k,v|
|
data/lib/cie/ruby-saml/utils.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/cie/xml_security.rb
CHANGED
|
File without changes
|
data/lib/cie/xml_security_new.rb
CHANGED
|
@@ -126,7 +126,7 @@ module Cie
|
|
|
126
126
|
signed_info_element.add_element("ds:SignatureMethod", {"Algorithm"=>signature_method})
|
|
127
127
|
|
|
128
128
|
# Add Reference
|
|
129
|
-
reference_element = signed_info_element.add_element("ds:Reference"
|
|
129
|
+
reference_element = signed_info_element.add_element("ds:Reference")
|
|
130
130
|
|
|
131
131
|
# Add Transforms
|
|
132
132
|
transforms_element = reference_element.add_element("ds:Transforms")
|
|
File without changes
|
|
File without changes
|
data/lib/schemas/xenc_schema.xsd
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/test/logoutrequest_test.rb
CHANGED
|
File without changes
|
data/test/request_test.rb
CHANGED
|
File without changes
|
data/test/response_test.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/test/settings_test.rb
CHANGED
|
File without changes
|
data/test/test_helper.rb
CHANGED
|
File without changes
|
data/test/xml_security_test.rb
CHANGED
|
File without changes
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cie-es
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fabiano Pavan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-04-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: canonix
|