saml_tools 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/LICENSE +24 -0
- data/README.rdoc +65 -0
- data/Rakefile +28 -0
- data/lib/saml_tool.rb +23 -0
- data/lib/saml_tool/certificate.rb +27 -0
- data/lib/saml_tool/decoder.rb +35 -0
- data/lib/saml_tool/encoder.rb +31 -0
- data/lib/saml_tool/erb_builder.rb +33 -0
- data/lib/saml_tool/reader.rb +40 -0
- data/lib/saml_tool/redirect.rb +45 -0
- data/lib/saml_tool/response_reader.rb +148 -0
- data/lib/saml_tool/rsa_key.rb +13 -0
- data/lib/saml_tool/saml.rb +30 -0
- data/lib/saml_tool/settings.rb +24 -0
- data/lib/saml_tool/validator.rb +40 -0
- data/lib/saml_tool/version.rb +8 -0
- data/lib/saml_tools.rb +1 -0
- data/lib/schema/localised-saml-schema-assertion-2.0.xsd +292 -0
- data/lib/schema/localised-saml-schema-protocol-2.0.xsd +309 -0
- data/lib/schema/localised-xenc-schema.xsd +151 -0
- data/lib/schema/xmldsig-core-schema.xsd +318 -0
- data/test/files/TEST_FILES.rdoc +22 -0
- data/test/files/cacert.pem +21 -0
- data/test/files/open_saml_response.xml +56 -0
- data/test/files/request.saml.erb +28 -0
- data/test/files/response.xml +94 -0
- data/test/files/response_template.xml +63 -0
- data/test/files/usercert.p12 +0 -0
- data/test/files/userkey.pem +18 -0
- data/test/files/valid_saml_request.xml +13 -0
- data/test/test_helper.rb +51 -0
- data/test/units/saml_tool/certificate_test.rb +30 -0
- data/test/units/saml_tool/decoder_test.rb +36 -0
- data/test/units/saml_tool/encoder_test.rb +38 -0
- data/test/units/saml_tool/erb_builder_test.rb +50 -0
- data/test/units/saml_tool/reader_test.rb +104 -0
- data/test/units/saml_tool/redirect_test.rb +70 -0
- data/test/units/saml_tool/response_reader_test.rb +144 -0
- data/test/units/saml_tool/rsa_key_test.rb +21 -0
- data/test/units/saml_tool/saml_test.rb +21 -0
- data/test/units/saml_tool/settings_test.rb +36 -0
- data/test/units/saml_tool/validator_test.rb +16 -0
- metadata +168 -0
@@ -0,0 +1,36 @@
|
|
1
|
+
require_relative '../../test_helper'
|
2
|
+
|
3
|
+
module SamlTool
|
4
|
+
class SettingsTest < Minitest::Test
|
5
|
+
|
6
|
+
def test_creation
|
7
|
+
assert_equal 'bar', settings.foo
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_uuid
|
11
|
+
assert_match /\_[a-z0-9\-]{36}/, settings.uuid
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_uuid_does_not_change_once_set
|
15
|
+
assert_equal settings.uuid, settings.uuid
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_user_defined_uuid
|
19
|
+
settings = Settings.new(uuid: 'foo')
|
20
|
+
assert_equal 'foo', settings.uuid
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_issue_instance
|
24
|
+
assert_match /\d{4}\-\d{2}\-\d{2}T\d{2}\:\d{2}\:\d{2}Z/, settings.issue_instance
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_user_issue_instance
|
28
|
+
settings = Settings.new(issue_instance: 'foo')
|
29
|
+
assert_equal 'foo', settings.issue_instance
|
30
|
+
end
|
31
|
+
|
32
|
+
def settings
|
33
|
+
@setting ||= Settings.new(foo: 'bar')
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require_relative '../../test_helper'
|
2
|
+
|
3
|
+
module SamlTool
|
4
|
+
class ValidatorTest < Minitest::Test
|
5
|
+
|
6
|
+
def test_valid
|
7
|
+
validator = Validator.new(valid_saml_request)
|
8
|
+
assert_equal true, validator.valid?
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_valid_failure
|
12
|
+
validator = Validator.new('<foo>Not valid SAML</foo>')
|
13
|
+
assert_equal false, validator.valid?
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,168 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: saml_tools
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Rob Nichols
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-08-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: nokogiri
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ! '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: hashie
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: xmldsig
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '5.1'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '5.1'
|
69
|
+
description: ! ' SAML 2.0 is an XML-based protocol that uses security tokens containing
|
70
|
+
assertions to pass information about a principal (usually an end user) between a
|
71
|
+
SAML authority, that is, an identity provider, and a SAML consumer, that is, a service
|
72
|
+
provider. SAML 2.0 enables web-based authentication and authorization scenarios
|
73
|
+
including cross-domain single sign-on (SSO), which helps reduce the administrative
|
74
|
+
overhead of distributing multiple authentication tokens to the user.'
|
75
|
+
email:
|
76
|
+
- rob@undervale.co.uk
|
77
|
+
executables: []
|
78
|
+
extensions: []
|
79
|
+
extra_rdoc_files: []
|
80
|
+
files:
|
81
|
+
- LICENSE
|
82
|
+
- README.rdoc
|
83
|
+
- Rakefile
|
84
|
+
- lib/saml_tool.rb
|
85
|
+
- lib/saml_tool/certificate.rb
|
86
|
+
- lib/saml_tool/decoder.rb
|
87
|
+
- lib/saml_tool/encoder.rb
|
88
|
+
- lib/saml_tool/erb_builder.rb
|
89
|
+
- lib/saml_tool/reader.rb
|
90
|
+
- lib/saml_tool/redirect.rb
|
91
|
+
- lib/saml_tool/response_reader.rb
|
92
|
+
- lib/saml_tool/rsa_key.rb
|
93
|
+
- lib/saml_tool/saml.rb
|
94
|
+
- lib/saml_tool/settings.rb
|
95
|
+
- lib/saml_tool/validator.rb
|
96
|
+
- lib/saml_tool/version.rb
|
97
|
+
- lib/saml_tools.rb
|
98
|
+
- lib/schema/localised-saml-schema-assertion-2.0.xsd
|
99
|
+
- lib/schema/localised-saml-schema-protocol-2.0.xsd
|
100
|
+
- lib/schema/localised-xenc-schema.xsd
|
101
|
+
- lib/schema/xmldsig-core-schema.xsd
|
102
|
+
- test/files/TEST_FILES.rdoc
|
103
|
+
- test/files/cacert.pem
|
104
|
+
- test/files/open_saml_response.xml
|
105
|
+
- test/files/request.saml.erb
|
106
|
+
- test/files/response.xml
|
107
|
+
- test/files/response_template.xml
|
108
|
+
- test/files/usercert.p12
|
109
|
+
- test/files/userkey.pem
|
110
|
+
- test/files/valid_saml_request.xml
|
111
|
+
- test/test_helper.rb
|
112
|
+
- test/units/saml_tool/certificate_test.rb
|
113
|
+
- test/units/saml_tool/decoder_test.rb
|
114
|
+
- test/units/saml_tool/encoder_test.rb
|
115
|
+
- test/units/saml_tool/erb_builder_test.rb
|
116
|
+
- test/units/saml_tool/reader_test.rb
|
117
|
+
- test/units/saml_tool/redirect_test.rb
|
118
|
+
- test/units/saml_tool/response_reader_test.rb
|
119
|
+
- test/units/saml_tool/rsa_key_test.rb
|
120
|
+
- test/units/saml_tool/saml_test.rb
|
121
|
+
- test/units/saml_tool/settings_test.rb
|
122
|
+
- test/units/saml_tool/validator_test.rb
|
123
|
+
homepage: https://github.com/warwickshire/saml_tools
|
124
|
+
licenses:
|
125
|
+
- LICENSE
|
126
|
+
metadata: {}
|
127
|
+
post_install_message:
|
128
|
+
rdoc_options: []
|
129
|
+
require_paths:
|
130
|
+
- lib
|
131
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
132
|
+
requirements:
|
133
|
+
- - ! '>='
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '0'
|
136
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
|
+
requirements:
|
138
|
+
- - ! '>='
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
version: '0'
|
141
|
+
requirements: []
|
142
|
+
rubyforge_project:
|
143
|
+
rubygems_version: 2.2.2
|
144
|
+
signing_key:
|
145
|
+
specification_version: 4
|
146
|
+
summary: Tools to simplify the creation, validation and sending of SAML objects
|
147
|
+
test_files:
|
148
|
+
- test/files/TEST_FILES.rdoc
|
149
|
+
- test/files/response.xml
|
150
|
+
- test/files/valid_saml_request.xml
|
151
|
+
- test/files/open_saml_response.xml
|
152
|
+
- test/files/response_template.xml
|
153
|
+
- test/files/usercert.p12
|
154
|
+
- test/files/request.saml.erb
|
155
|
+
- test/files/cacert.pem
|
156
|
+
- test/files/userkey.pem
|
157
|
+
- test/units/saml_tool/validator_test.rb
|
158
|
+
- test/units/saml_tool/reader_test.rb
|
159
|
+
- test/units/saml_tool/response_reader_test.rb
|
160
|
+
- test/units/saml_tool/saml_test.rb
|
161
|
+
- test/units/saml_tool/erb_builder_test.rb
|
162
|
+
- test/units/saml_tool/redirect_test.rb
|
163
|
+
- test/units/saml_tool/rsa_key_test.rb
|
164
|
+
- test/units/saml_tool/certificate_test.rb
|
165
|
+
- test/units/saml_tool/encoder_test.rb
|
166
|
+
- test/units/saml_tool/decoder_test.rb
|
167
|
+
- test/units/saml_tool/settings_test.rb
|
168
|
+
- test/test_helper.rb
|