aaf-mdqt 0.8.8 → 0.8.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7f884d01697f865d55c804cdcdc6effe83d1f80023de88cd5e557d395a34aba
4
- data.tar.gz: a6bc73de15949019ccfae61edb365bd4633db5f77f1c7729126f35ff4fae982a
3
+ metadata.gz: 5cc2bc55e897684661a090bba2b8ec7c528b5aa6d3bc5bd5220ed556fd764e70
4
+ data.tar.gz: 761690287c886a7c4ffa0413e66cfe7541895a22cfd8e07ff606e1d954d9c0ce
5
5
  SHA512:
6
- metadata.gz: f2dd7c004d066083182426d878b421611713c29d847ea483787770e59bfa64c84c6ede5e15d6d8942370f76c66c9c8416126c23bb66ed65d293252370296075d
7
- data.tar.gz: 7979f13e2252926ecd6a76e9921cce791ea825b13e555a91fdb3765770667efdb9b97af07794e08ff81caa8069d7ecdae2c56f0146936fd1e21a3efea0b2d285
6
+ metadata.gz: 193d8fd0613e0032f2f557b0342ea7ccc01d6f0f61ca2d8263d6baa445eda57737382ad26d1e15b07e6feb5ad55164db904d66354d0e672961562130e8f23287
7
+ data.tar.gz: 910eed4e7cdca8ccd47b5d9f36b2f8fdd0ee39203d360fe25ce8dfe0ccb49365895d3ddbcc0b6fd2262d54e3bee5630922d8d8ea7373eeefa48ce1ee1784f93b
data/lib/mdqt/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module MDQT
2
- VERSION = "0.8.8"
2
+ VERSION = "0.8.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aaf-mdqt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.8
4
+ version: 0.8.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Birkinshaw
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2024-09-13 00:00:00.000000000 Z
12
+ date: 2025-01-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: commander
@@ -85,14 +85,14 @@ dependencies:
85
85
  name: activesupport
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - "~>"
88
+ - - ">="
89
89
  - !ruby/object:Gem::Version
90
90
  version: '7'
91
91
  type: :runtime
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - "~>"
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: '7'
98
98
  - !ruby/object:Gem::Dependency
@@ -242,25 +242,6 @@ executables:
242
242
  extensions: []
243
243
  extra_rdoc_files: []
244
244
  files:
245
- - ".github/workflows/ruby.yml"
246
- - ".gitignore"
247
- - ".rspec"
248
- - ".rubocop.yml"
249
- - ".rubocop_todo.yml"
250
- - ".ruby-version"
251
- - ".tool-versions"
252
- - ".travis.yml"
253
- - CHANGELOG.md
254
- - CODE_OF_CONDUCT.md
255
- - Gemfile
256
- - LICENSE.txt
257
- - Makefile
258
- - README.md
259
- - Rakefile
260
- - aaf-mdqt.gemspec
261
- - bin/console
262
- - bin/setup
263
- - cucumber.yml
264
245
  - exe/mdqt
265
246
  - lib/mdqt.rb
266
247
  - lib/mdqt/cli.rb
@@ -302,10 +283,6 @@ files:
302
283
  - lib/mdqt/schema/xml.xsd
303
284
  - lib/mdqt/schema/xmldsig-core-schema.xsd
304
285
  - lib/mdqt/version.rb
305
- - lib/tasks/cucumber.rake
306
- - lib/tasks/spec.rake
307
- - lib/tasks/tests.rake
308
- - lib/tasks/yard.rake
309
286
  homepage: https://github.com/Digital-Identity-Labs/mdqt
310
287
  licenses:
311
288
  - MIT
@@ -325,7 +302,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
325
302
  - !ruby/object:Gem::Version
326
303
  version: '0'
327
304
  requirements: []
328
- rubygems_version: 3.5.16
305
+ rubygems_version: 3.5.22
329
306
  signing_key:
330
307
  specification_version: 4
331
308
  summary: Commandline utility for accessing MDQ services
@@ -1,41 +0,0 @@
1
- # This workflow uses actions that are not certified by GitHub.
2
- # They are provided by a third-party and are governed by
3
- # separate terms of service, privacy policy, and support
4
- # documentation.
5
- # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
- # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
-
8
- name: Ruby
9
-
10
- env:
11
- LANG: "en_GB.UTF-8"
12
-
13
- on:
14
- push:
15
- branches: [ "master" ]
16
- pull_request:
17
- branches: [ "master" ]
18
-
19
- permissions:
20
- contents: read
21
-
22
- jobs:
23
- test:
24
-
25
- runs-on: ubuntu-latest
26
- strategy:
27
- matrix:
28
- ruby-version: ['3.0']
29
-
30
- steps:
31
- - uses: actions/checkout@v3
32
- - name: Set up Ruby
33
- # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
34
- # change this to (see https://github.com/ruby/setup-ruby#versioning):
35
- # uses: ruby/setup-ruby@v1
36
- uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
37
- with:
38
- ruby-version: ${{ matrix.ruby-version }}
39
- bundler-cache: true # runs 'bundle install' and caches installed gems automatically
40
- - name: Run tests
41
- run: bundle exec rake features
data/.gitignore DELETED
@@ -1,25 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- /out.xml
11
- /out.txt
12
- /mdqt_cache.log
13
- *.gem
14
- /ukfederation-mdq.pem
15
- /mdq-beta-cert.pem
16
- /out
17
- /xout
18
- out*.xml
19
- /.idea
20
- /*.xml
21
- /bt
22
- *.html
23
- /t/aggregate.xml
24
- /t/indiid.xml
25
- /t/uom.xml
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --format documentation
2
- --color
data/.rubocop.yml DELETED
@@ -1 +0,0 @@
1
- inherit_from: .rubocop_todo.yml
data/.rubocop_todo.yml DELETED
@@ -1,296 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2018-05-03 07:42:59 +0100 using RuboCop version 0.55.0.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 1
10
- # Cop supports --auto-correct.
11
- # Configuration parameters: Include, TreatCommentsAsGroupSeparators.
12
- # Include: **/*.gemspec
13
- Gemspec/OrderedDependencies:
14
- Exclude:
15
- - 'aaf-mdqt.gemspec'
16
-
17
- # Offense count: 1
18
- # Configuration parameters: Include.
19
- # Include: **/*.gemspec
20
- Gemspec/RequiredRubyVersion:
21
- Exclude:
22
- - 'aaf-mdqt.gemspec'
23
-
24
- # Offense count: 1
25
- # Cop supports --auto-correct.
26
- Layout/CommentIndentation:
27
- Exclude:
28
- - 'lib/mdqt/cli/base.rb'
29
-
30
- # Offense count: 1
31
- # Cop supports --auto-correct.
32
- # Configuration parameters: AllowBorderComment, AllowMarginComment.
33
- Layout/EmptyComment:
34
- Exclude:
35
- - 'lib/mdqt/cli/base.rb'
36
-
37
- # Offense count: 1
38
- # Cop supports --auto-correct.
39
- Layout/EmptyLineAfterMagicComment:
40
- Exclude:
41
- - 'aaf-mdqt.gemspec'
42
-
43
- # Offense count: 3
44
- # Cop supports --auto-correct.
45
- Layout/EmptyLines:
46
- Exclude:
47
- - 'lib/mdqt/cli.rb'
48
- - 'aaf-mdqt.gemspec'
49
- - 'spec/client/client_spec.rb'
50
-
51
- # Offense count: 3
52
- # Cop supports --auto-correct.
53
- # Configuration parameters: EnforcedStyle.
54
- # SupportedStyles: empty_lines, no_empty_lines
55
- Layout/EmptyLinesAroundBlockBody:
56
- Exclude:
57
- - 'exe/mdqt'
58
- - 'spec/client/client_spec.rb'
59
-
60
- # Offense count: 22
61
- # Cop supports --auto-correct.
62
- # Configuration parameters: EnforcedStyle.
63
- # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
64
- Layout/EmptyLinesAroundClassBody:
65
- Exclude:
66
- - 'lib/mdqt/cli.rb'
67
- - 'lib/mdqt/cli/base.rb'
68
- - 'lib/mdqt/cli/defaults.rb'
69
- - 'lib/mdqt/cli/get.rb'
70
- - 'lib/mdqt/client.rb'
71
- - 'lib/mdqt/client/metadata_service.rb'
72
-
73
- # Offense count: 11
74
- # Cop supports --auto-correct.
75
- Layout/EmptyLinesAroundMethodBody:
76
- Exclude:
77
- - 'lib/mdqt/cli/base.rb'
78
- - 'lib/mdqt/cli/get.rb'
79
- - 'lib/mdqt/client.rb'
80
- - 'lib/mdqt/client/metadata_service.rb'
81
-
82
- # Offense count: 7
83
- # Cop supports --auto-correct.
84
- # Configuration parameters: EnforcedStyle.
85
- # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
86
- Layout/EmptyLinesAroundModuleBody:
87
- Exclude:
88
- - 'lib/mdqt.rb'
89
- - 'lib/mdqt/cli.rb'
90
- - 'lib/mdqt/cli/base.rb'
91
- - 'lib/mdqt/cli/get.rb'
92
- - 'lib/mdqt/client.rb'
93
- - 'lib/mdqt/client/metadata_service.rb'
94
-
95
- # Offense count: 1
96
- # Cop supports --auto-correct.
97
- # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
98
- Layout/ExtraSpacing:
99
- Exclude:
100
- - 'aaf-mdqt.gemspec'
101
-
102
- # Offense count: 3
103
- # Cop supports --auto-correct.
104
- Layout/LeadingCommentSpace:
105
- Exclude:
106
- - 'exe/mdqt'
107
- - 'lib/mdqt/client/metadata_service.rb'
108
-
109
- # Offense count: 1
110
- # Cop supports --auto-correct.
111
- Layout/SpaceAfterComma:
112
- Exclude:
113
- - 'lib/mdqt/client/metadata_service.rb'
114
-
115
- # Offense count: 1
116
- # Cop supports --auto-correct.
117
- # Configuration parameters: .
118
- # SupportedStyles: space, no_space
119
- Layout/SpaceAroundEqualsInParameterDefault:
120
- EnforcedStyle: no_space
121
-
122
- # Offense count: 1
123
- # Cop supports --auto-correct.
124
- # Configuration parameters: AllowForAlignment.
125
- Layout/SpaceAroundOperators:
126
- Exclude:
127
- - 'aaf-mdqt.gemspec'
128
-
129
- # Offense count: 1
130
- # Cop supports --auto-correct.
131
- # Configuration parameters: AllowForAlignment.
132
- Layout/SpaceBeforeFirstArg:
133
- Exclude:
134
- - 'lib/mdqt/client/metadata_service.rb'
135
-
136
- # Offense count: 2
137
- # Cop supports --auto-correct.
138
- # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
139
- # SupportedStyles: space, no_space
140
- # SupportedStylesForEmptyBraces: space, no_space
141
- Layout/SpaceInsideBlockBraces:
142
- Exclude:
143
- - 'lib/mdqt/cli/get.rb'
144
-
145
- # Offense count: 7
146
- # Cop supports --auto-correct.
147
- # Configuration parameters: EnforcedStyle.
148
- # SupportedStyles: final_newline, final_blank_line
149
- Layout/TrailingBlankLines:
150
- Exclude:
151
- - 'exe/mdqt'
152
- - 'lib/mdqt/cli.rb'
153
- - 'lib/mdqt/cli/base.rb'
154
- - 'lib/mdqt/cli/defaults.rb'
155
- - 'lib/mdqt/client.rb'
156
- - 'lib/mdqt/client/metadata_service.rb'
157
- - 'spec/client/client_spec.rb'
158
-
159
- # Offense count: 2
160
- # Cop supports --auto-correct.
161
- # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
162
- Lint/UnusedBlockArgument:
163
- Exclude:
164
- - 'exe/mdqt'
165
-
166
- # Offense count: 2
167
- # Cop supports --auto-correct.
168
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
169
- Lint/UnusedMethodArgument:
170
- Exclude:
171
- - 'lib/mdqt/cli/base.rb'
172
-
173
- # Offense count: 1
174
- Lint/UselessAssignment:
175
- Exclude:
176
- - 'lib/mdqt/client.rb'
177
-
178
- # Offense count: 1
179
- # Configuration parameters: CountComments.
180
- Metrics/MethodLength:
181
- Max: 13
182
-
183
- # Offense count: 8
184
- Style/Documentation:
185
- Exclude:
186
- - 'spec/**/*'
187
- - 'test/**/*'
188
- - 'lib/mdqt.rb'
189
- - 'lib/mdqt/cli.rb'
190
- - 'lib/mdqt/cli/base.rb'
191
- - 'lib/mdqt/cli/defaults.rb'
192
- - 'lib/mdqt/cli/get.rb'
193
- - 'lib/mdqt/client.rb'
194
- - 'lib/mdqt/client/metadata_service.rb'
195
-
196
- # Offense count: 1
197
- # Cop supports --auto-correct.
198
- Style/Encoding:
199
- Exclude:
200
- - 'aaf-mdqt.gemspec'
201
-
202
- # Offense count: 2
203
- # Cop supports --auto-correct.
204
- Style/ExpandPathArguments:
205
- Exclude:
206
- - 'aaf-mdqt.gemspec'
207
- - 'spec/spec_helper.rb'
208
-
209
- # Offense count: 16
210
- # Cop supports --auto-correct.
211
- # Configuration parameters: EnforcedStyle.
212
- # SupportedStyles: when_needed, always, never
213
- Style/FrozenStringLiteralComment:
214
- Enabled: false
215
-
216
- # Offense count: 2
217
- # Cop supports --auto-correct.
218
- # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
219
- # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
220
- Style/HashSyntax:
221
- Exclude:
222
- - 'Rakefile'
223
- - 'lib/mdqt/client/metadata_service.rb'
224
-
225
- # Offense count: 1
226
- # Cop supports --auto-correct.
227
- Style/MutableConstant:
228
- Exclude:
229
- - 'lib/mdqt/version.rb'
230
-
231
- # Offense count: 1
232
- # Cop supports --auto-correct.
233
- # Configuration parameters: Whitelist.
234
- # Whitelist: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with
235
- Style/NestedParenthesizedCalls:
236
- Exclude:
237
- - 'lib/mdqt/client/metadata_service.rb'
238
-
239
- # Offense count: 2
240
- # Cop supports --auto-correct.
241
- # Configuration parameters: PreferredDelimiters.
242
- Style/PercentLiteralDelimiters:
243
- Exclude:
244
- - 'aaf-mdqt.gemspec'
245
-
246
- # Offense count: 1
247
- # Cop supports --auto-correct.
248
- Style/RedundantSelf:
249
- Exclude:
250
- - 'lib/mdqt/cli/base.rb'
251
-
252
- # Offense count: 37
253
- # Cop supports --auto-correct.
254
- # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
255
- # SupportedStyles: single_quotes, double_quotes
256
- Style/StringLiterals:
257
- Exclude:
258
- - 'Rakefile'
259
- - 'bin/console'
260
- - 'lib/mdqt.rb'
261
- - 'lib/mdqt/cli/base.rb'
262
- - 'lib/mdqt/cli/get.rb'
263
- - 'lib/mdqt/client/metadata_service.rb'
264
- - 'lib/mdqt/version.rb'
265
- - 'aaf-mdqt.gemspec'
266
- - 'spec/mdqt_spec.rb'
267
- - 'spec/spec_helper.rb'
268
-
269
- # Offense count: 1
270
- # Cop supports --auto-correct.
271
- # Configuration parameters: EnforcedStyleForMultiline.
272
- # SupportedStylesForMultiline: comma, consistent_comma, no_comma
273
- Style/TrailingCommaInHashLiteral:
274
- Exclude:
275
- - 'lib/mdqt/cli/defaults.rb'
276
-
277
- # Offense count: 3
278
- # Cop supports --auto-correct.
279
- # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.
280
- # Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
281
- Style/TrivialAccessors:
282
- Exclude:
283
- - 'lib/mdqt/client.rb'
284
- - 'lib/mdqt/client/metadata_service.rb'
285
-
286
- # Offense count: 2
287
- # Cop supports --auto-correct.
288
- Style/UnneededPercentQ:
289
- Exclude:
290
- - 'aaf-mdqt.gemspec'
291
-
292
- # Offense count: 7
293
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
294
- # URISchemes: http, https
295
- Metrics/LineLength:
296
- Max: 130
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 3.3.5
data/.tool-versions DELETED
@@ -1 +0,0 @@
1
- ruby 3.2.0
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.2.2
5
- - 2.5.0
6
- - jruby
7
- before_install: gem install bundler -v 1.16.1
data/CHANGELOG.md DELETED
@@ -1,168 +0,0 @@
1
- # Changelog
2
-
3
- ## 0.8.0
4
-
5
- ## Breaking Changes
6
-
7
- - MDQT now requires Ruby 3.0 or later, due to updated dependencies and their requirements
8
- - MDQT now installs XML handling gems automatically - Nokogiri and XMLDSig are no longer optional. Nokogiri seems to be
9
- less troublesome to install now and is needed by some useful current and planned features. Please let me know if this
10
- causes you any problems.
11
-
12
- ## Improvements
13
-
14
- - New HTTP library means caching should be slightly faster and HTTP2 is now supported
15
- - MDQ base URLs should end with a slash, so slashless URLs are now normalised to include one.
16
-
17
- ## Fixes
18
-
19
- - URLs for MDQ entity records now properly support paths - previously only MDQ services at the root path would work
20
-
21
- ## 0.7.0
22
-
23
- ### Improvements
24
-
25
- - `mdqt check` can now (I think) cope with SAML metadata from Microsoft AD/ADFS services full of WS-* extensions.
26
- - Tested with Ruby 3.2.0: `File.exists?` has been removed from 3.2.0 (it's been deprecated for years and I used it out of habit)
27
- so this has been replaced in MDQT with `File.exist?` - as a result Ruby 3.2.0 onwards will work, but Ruby older than v2.2
28
- will no longer work.
29
-
30
- ### Fixes
31
-
32
- - The inline help synopsis for `mdqt check` has been corrected.
33
-
34
- ### Known issues
35
-
36
- - Running mdqt without STDIN available (outside of a normal shell environment) can cause it to freeze unless
37
- `export MDQT_STDIN=off` is set. See [Issue 8](https://github.com/Digital-Identity-Labs/mdqt/issues/8)
38
- - Checking signatures on very large aggregate XML files can sometimes fail on M1/M2 MacOS and trying to work out why
39
- has made me slightly balder and a lot more puzzled. See [Issue 9](https://github.com/Digital-Identity-Labs/mdqt/issues/9)
40
-
41
- ## 0.6.0
42
-
43
- ### New Features
44
-
45
- - STDIN and pipes: Arguments (such as filenames and entity IDs) can now be piped into mdqt. This
46
- enables pipelining, so you can chain commands together.
47
- - The `rename` command now has a `--link` option that creates a symlink from the original
48
- filename to the renamed file.
49
- - The `get` command now has a `--list` option that works when `--save-to` is used, to list filenames being
50
- written to disk.
51
-
52
- ### Improvements
53
-
54
- - Emacs backup files (so called turd files) ending with ~ and files ending with .bak
55
- are now ignored.
56
-
57
- ### Removed features
58
-
59
- - `link` and `rename` now require files to be specified: you now *cannot* run `mdqt rename`
60
- to rename everything in the current directory.
61
-
62
- - The `--link_id` option for `get` saved a link to each downloaded file that is almost the same as the
63
- filename - maybe this made sense in mdqt 0.1.0 but it's quite useless now. If anyone can remember what it was
64
- actually for I'll put it back.
65
-
66
- ## 0.5.0
67
-
68
- ### New Features
69
-
70
- - New `entities` command extracts entity IDs and sha1 hashes from metadata files on disk
71
- - New `ln` command will create symlinks to files using their sha1 hashes
72
- - New `ls` command will list the entity IDs of metadata files
73
- - New `list` command lists all entity IDs available from the MDQ service
74
- - New `services` command shows known MDQ services and aliases
75
- - New `rename` command renames metadata files to use their sha1 hash as a name
76
- - New `url` command shows the full url for an entity at the MDQ service
77
-
78
- ### Improvements
79
-
80
- - Known MDQ services can be specified using simple aliases as well as URLs
81
- - Caching is now on by default
82
- - `--refresh` options forces downloads and ignores cached data
83
- - Cache is cleaned whenever `get` is used, to remove expired files
84
- - Added default service details for DFN
85
- - Tidier output when stopped with ctrl-c
86
-
87
- ### Fixes
88
-
89
- - Compatible with Ruby 3
90
- - Updated dependencies to latest versions
91
- - Improved test reliability and added more tests
92
- - Extended timeouts to better handle slow networks
93
-
94
- ## 0.4.0
95
-
96
- ### New Features
97
- - The `check` command will validate XML files against SAML metadata schema and verify signatures
98
- - A `--validate` switch for `get` forces XML validation, using basic SAML2 metadata schema
99
- - A `--tls-risky` switch for `get` disables verification of TLS certificates
100
-
101
- ### Improvements
102
- - Connection failures now show an explanation (such as TLS problems)
103
-
104
- ### Fixes
105
- - "Not Required" was shown when using commands that don't interact with an MDQ server
106
-
107
- ## 0.3.1
108
-
109
- ### Fixes
110
- - A missing xmldsig gem is now handled properly *everywhere*. Hopefully.
111
-
112
- ## 0.3.0
113
-
114
- ### New Features
115
- - Signature verification (at last!) using `--verify-with` option for get command
116
- - A `reset` command to clear all cached metadata
117
- - A `transform` command to convert entityID URIs to {sha1} identifiers
118
- - The `--explain` option for `get` will show header information
119
- - The `--save-to` option for `get` will write metadata to disk
120
- - The `--link-id` option for `get --save-to` will create aliases
121
-
122
- ### Improvements
123
- - Coloured feedback
124
- - Improved README documentation
125
- - Servers' 304 responses for cached files are handled correctly
126
- - Invalid SHA1 transformed identitifiers can't be sent
127
- - 500 errors at the server will be shown correctly
128
- - Verbose mode shows MDQT version
129
-
130
- ### Fixes
131
- - Don't show empty identifier in OK message after downloading aggregate
132
- - Cache status in introduction text is now correct
133
-
134
- ## 0.2.1
135
-
136
- ### Fixes
137
- - Send Accept header rather than Content-Type header 🙄
138
-
139
- ## 0.2.0
140
-
141
- ### New Features
142
- - Option to cache HTTP requests to the MDQ service
143
- - Supports Gzip compression by default
144
- - Default MDQ service selection (rather crude, maybe not a good idea at all)
145
-
146
- ### Improvements
147
- - Supports redirect responses
148
- - Helpful error messages and status messages
149
- - Verbose mode will show successful connection information
150
- - Warnings about unspecified MDQ service
151
- - Catch bad URLs for the MDQ service and fail with a better error message
152
-
153
- ### Fixes
154
- - Aggregates are now requested with /entities not /entities/, as per spec
155
-
156
- ### Other
157
- - First few Cucumber features to define and test the executable
158
- - Beginning of an RSpec suit to define the API
159
- - Minimum version of Ruby is now 2.1, but only 2.2+ is tested using CI
160
-
161
- ## 0.1.1
162
-
163
- ### Fixes
164
- - Bug that prevented the mdqt executable from running outside a Bundler environment
165
-
166
- ## 0.1.0
167
-
168
- - Initial release
data/CODE_OF_CONDUCT.md DELETED
@@ -1,74 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at pete@binary-ape.org. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile DELETED
@@ -1,9 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in mdq.gemspec
4
- gemspec
5
-
6
- gem 'simplecov', require: false, group: :test
7
-
8
- gem 'pry'
9
- gem 'rake'
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2018 Pete Birkinshaw
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
data/Makefile DELETED
@@ -1,4 +0,0 @@
1
- publish-gem:
2
- gem build aaf-mdqt.gemspec
3
- gem push aaf-mdqt-*.gem
4
- rm aaf-mdqt-*.gem
data/README.md DELETED
@@ -1,267 +0,0 @@
1
- # NOTE: forked from <https://github.com/Digital-Identity-Labs/mdqt>
2
-
3
- # MDQT - A Metadata Query Tool
4
-
5
- [![Gem Version](https://badge.fury.io/rb/aaf-mdqt.svg)](https://badge.fury.io/rb/aaf-mdqt)
6
-
7
- MDQT is small library and commandline tool to query MDQ services for SAML metadata.
8
- You could do this with `curl` and `xmlsec1` but it's a little more convenient to use `mdqt` instead.
9
-
10
- MDQT also has features for managing local metadata files, to help when running an MDQ service or a Shibboleth IdP or SP.
11
-
12
- MDQ currently provides these features:
13
-
14
- - Downloading single entities, lists or aggregates
15
- - Signature verification
16
- - Validating metadata against SAML2 schema
17
- - Saving metadata to disk
18
- - Extracting entity IDs from both aggregate and individual metadata files
19
- - Renaming metadata files to their entity ID sha1 hashes (for use with LocalDynamicMetadataProvider)
20
- - Creating sha1 hash symlinks to metadata files (also for use with Local Dynamic Metadata)
21
- - Listing the entity IDs of downloaded metadata files
22
- - Showing the full URL of an entity
23
- - Caching entity metadata and using Gzip compression
24
-
25
- ## MDQ?
26
-
27
- MDQ is a simple HTTP-based standard for looking up individual SAML entity metadata. Rather than regularly
28
- downloading large metadata aggregates containing thousands of entity descriptions,
29
- an IdP or SP can download the metadata for an individual entity whenever it is needed.
30
-
31
- The UK Access Management Federation has a
32
- [useful page explaining MDQ](https://www.ukfederation.org.uk/content/Documents/MDQ)
33
-
34
- ## Installation
35
-
36
- MDQT is tested on recent MacOS and Linux, and should work with
37
- Ruby 3.0.0 or later and recent JRuby releases.
38
-
39
- ### As a gem for general use
40
-
41
- To install system-wide on your default Ruby, use
42
-
43
- sudo gem install mdqt
44
-
45
- If using a per-user Ruby via `rbenv`, `asdf` or similar, you'll need
46
-
47
- gem install mdqt
48
-
49
- ### As part of a Ruby project
50
-
51
- To add MDQT to a Ruby project include this line in your application's `Gemfile`
52
-
53
- ```ruby
54
- gem 'mdqt'
55
- ```
56
-
57
- and then execute:
58
-
59
- bundle
60
-
61
- ### As a Docker container
62
-
63
- (Experimental)
64
- See the instructions at [MDQT-Container](https://github.com/Digital-Identity-Labs/mdqt-container)
65
-
66
- ### Verifying signed metadata, installing Nokogiri
67
-
68
- MDQT can check that metadata has not been tampered with by verifying its
69
- signature. Some MDQ services use unencrypted HTTP connections and rely
70
- on signed metadata.
71
-
72
- MDQT supports signature verification but requires a Ruby library called
73
- Nokogiri to do the hard work. Nokogiri is fast and useful but can sometimes
74
- be awkward to install for non-developers (it can sometimes require a C development
75
- environment and various XML libraries). In most cases Nokogiri will install
76
- automatically, without problems, when you install MDQT, but if you encounter any
77
- problems installing Nokogiri the [Installing Nokogiri](http://www.nokogiri.org/tutorials/installing_nokogiri.html) documentation is very helpful.
78
-
79
- ## Commandline Usage as an MDQ client
80
-
81
- You can see a list of commandline options by typing:
82
-
83
- mdqt help
84
-
85
- To see more information about a command, use the `--help` option after the command or type `help <command>`:
86
-
87
- mdqt help get
88
-
89
- ### Selecting an MDQ service to access
90
-
91
- You can specify the MDQ service with a commandline option:
92
-
93
- mdqt get --service https://mdq.example.com/mdq http://entity.ac.uk/shibboleth
94
-
95
- It's more convenient to set an environment variable to specify a default MDQ
96
- service. Set `MDQT_SERVICE` or `MDQ_BASE_URL` to the base URL of your MDQ service.
97
-
98
- export MDQT_SERVICE=https://mdq.example.com/mdq
99
- mdqt get http://entity.ac.uk/shibboleth
100
- mdqt get http://example.org/service
101
-
102
- Finally, if you don't specify an MDQ service with `--service` or `MDQT_SERVICE` then `mdqt` *might* be
103
- able to guess your local NREN's MDQ service. Do not do this in production!
104
-
105
- If an MDQ service is known to MDQT it can be selected using an alias:
106
-
107
- mdqt get --service incommon http://entity.edu/shibboleth
108
-
109
- You can see known services and their aliases using `mdqt services`
110
-
111
- ### Downloading entity metadata
112
-
113
- Downloading entity metadata to STDOUT:
114
-
115
- mdqt get https://test-idp.ukfederation.org.uk/idp/shibboleth
116
-
117
- Using the sha1 hashed version of entity IDs requires quotes or escaping in some shells:
118
-
119
- mdqt get "{sha1}52e2065fc0d53744e8d4ee2c2f30696ebfc5def9"
120
-
121
- mdqt get \{sha1\}52e2065fc0d53744e8d4ee2c2f30696ebfc5def9
122
-
123
- mdqt get [sha1]52e2065fc0d53744e8d4ee2c2f30696ebfc5def9
124
-
125
- Requesting all metadata from an MDQ endpoint is done by specifying `--all`:
126
-
127
- mdqt get --all
128
-
129
- ### Caching metadata
130
-
131
- Caching can be enabled using `--cache`. At the moment the `mdqt` executable
132
- only supports caching to disk. It will create a cache directory in your temporary
133
- directory.
134
-
135
- mdqt get --cache --service https://mdq.example.com/mdq http://entity.ac.uk/shibboleth
136
-
137
- Caching is now on by default. To force a single command to *not* use the cache, include `--reset`
138
-
139
- mdqt get --reset --service https://mdq.example.com/mdq http://entity.ac.uk/shibboleth
140
-
141
- You can clear the cache by using the `reset` command:
142
-
143
- mdqt reset
144
-
145
- ### Verifying metadata
146
-
147
- If you have enabled verification by installing `xmldsig` (and have downloaded and checked a suitable
148
- certificate for your MDQ server) you can require verification by passing
149
- they `verify-with` flag with the path of your certificate.
150
-
151
- mdqt get --verify-with myfederation.pem https://indiid.net/idp/shibboleth
152
-
153
- It's possible to pass more than one certificate by separating them with commas
154
-
155
- mdqt get --verify-with myfederation.pem,previous.pem https://indiid.net/idp/shibboleth
156
-
157
- Basic XML correctness and validation against SAML2 Metadata schema can be enabled with the
158
- `--validate` switch:
159
-
160
- mdqt get --validate https://indiid.net/idp/shibboleth
161
-
162
- If you need to check metadata that has already been downloaded then try the `check`
163
- command:
164
-
165
- mdqt check metadata.xml # Just validate
166
- mdqt check --verify-with myfederation.pem metadata.xml # Verify signature too
167
-
168
- You shouldn't need to *validate* XML from a trusted MDQ service such as one run by a
169
- national federation. You should however always *verify* the signature of XML sent over an unencrypyted HTTP connection,
170
- and probably even over HTTPS. MDQT's validation check is mostly for use when writing
171
- or debugging your own MDQ service.
172
-
173
- ### Saving metadata as files
174
-
175
- The simplest way to save metadata is to redirect output from the `get` command:
176
-
177
- mdqt get http://entity.ac.uk/shibboleth > metadata.xml
178
-
179
- MDQT also offers the `--save-to` option to write all metadata into a directory
180
-
181
- mdqt get http://entity.ac.uk/shibboleth --save-to metadata_directory
182
-
183
- The `--save-to` option requires a directory to be specified. All files will be saved
184
- with a name based on their transformed identifier (sha1 hash) such as
185
- `77603e0cbda1e00d50373ca8ca20a375f5d1f171.xml`
186
-
187
- ### Other Features
188
-
189
- For more information about current settings, download results, and so on, add
190
- `--verbose` to commands:
191
-
192
- $mdqt get --verbose http://entity.ac.uk/shibboleth
193
-
194
- To convert normal URI entity IDs into MDQ SHA1 hashed transformed identifiers use the `transform` command:
195
-
196
- mdqt transform http://example.org/service
197
-
198
- Transforming identifiers that have already been transformed should not re-transform them.
199
-
200
- To see more details of what is being sent and received by a `get` command add the `--explain` flag
201
-
202
- mdqt get --explain --service https://mdq.example.com/mdq http://entity.ac.uk/shibboleth
203
-
204
- MDQT will then show a table of sent and received headers which may be useful when debugging servers.
205
-
206
- To extract a list of all entity IDs from a file:
207
-
208
- mdqt entities metadata.xml
209
-
210
- mdqt entities --sha1 metadata.xml
211
-
212
- To create sha1 symlinks to a metadata file:
213
-
214
- mdqt ln example_idp.xml
215
-
216
- To rename a file to its entity ID sha1 has:
217
-
218
- mdqt rename example_idp.xml
219
-
220
- To list the entity IDs of files in a directory:
221
-
222
- mdqt ls
223
-
224
- To list all entities available at an MDQ service:
225
-
226
- mdqt list
227
-
228
- To show the MDQ services known to MDQT, and their aliases:
229
-
230
- mdqt services
231
-
232
- To show the full MDQ URL of an entity
233
-
234
- mdqt url http://entity.ac.uk/shibboleth
235
-
236
- MDQT can accept input on stdin, allowing composition and pipelining
237
-
238
- cat list_of_ids.txt | mdqt url
239
-
240
- mdqt list | grep cern.ch | mdqt get --save-to cern_metadata/ --list | mdqt ls
241
-
242
- ## Alternatives
243
-
244
- - [SAML Library](https://github.com/trscavo/saml-library) is a set of scripts to help with metadata-related tasks, written
245
- by Tom Scavo of Internet2. Some of the scripts provide similar functionality to MDQT, and are designed to be piped together.
246
-
247
- ## Library Usage
248
-
249
- Please don't! We originally had plans to include a usable generic library was part of MDQT but unless there's new demand
250
- for it that's now unlikely to happen. However, we do now have a set of libraries for the Elixir language, based around
251
- [Smee](https://github.com/Digital-Identity-Labs/smee) - not very helpful for Ruby projects but possibly of use for new
252
- projects.
253
-
254
- ## Development
255
-
256
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
257
-
258
- To install this gem onto your local machine, run `bundle exec rake install`.
259
-
260
- ## Contributing
261
-
262
- Bug reports and pull requests are welcome on GitHub at <https://github.com/Digital-Identity-Labs/mdqt>.
263
- This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
264
-
265
- ## License
266
-
267
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile DELETED
@@ -1,5 +0,0 @@
1
- require "bundler/gem_tasks"
2
-
3
- Dir.glob('lib/tasks/*.rake').each { |r| load r}
4
-
5
- task :default => :tests
data/aaf-mdqt.gemspec DELETED
@@ -1,46 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'mdqt/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "aaf-mdqt"
8
- spec.version = MDQT::VERSION
9
- spec.authors = ["Pete Birkinshaw", "Australian Access Federation"]
10
- spec.email = []
11
-
12
- spec.summary = %q{Commandline utility for accessing MDQ services}
13
- spec.description = %q{Commandline utility for downloading SAML metadata from MDQ services}
14
- spec.homepage = "https://github.com/Digital-Identity-Labs/mdqt"
15
- spec.license = "MIT"
16
-
17
- spec.required_ruby_version = '>= 3.0.0'
18
-
19
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
20
- f.match(%r{^(test|spec|features)/})
21
- end
22
- spec.bindir = "exe"
23
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
- spec.require_paths = ["lib"]
25
-
26
- spec.add_dependency 'commander', "~>4"
27
- spec.add_dependency 'faraday', "~>2"
28
- spec.add_dependency 'faraday-http-cache', "~>2"
29
- spec.add_dependency 'faraday-follow_redirects', "~>0.3"
30
- spec.add_dependency 'httpx', "~>1"
31
- spec.add_dependency 'activesupport', "~>7"
32
- spec.add_dependency 'dalli', "~>3"
33
- spec.add_dependency 'pastel', "~>0.8"
34
- spec.add_dependency 'terminal-table', "~>3"
35
- spec.add_dependency 'concurrent-ruby-ext', "~>1"
36
- spec.add_dependency 'xmldsig', "~>0.7"
37
-
38
- # spec.add_development_dependency "bundler", "~>2"
39
- # spec.add_development_dependency "rake", ">= 13.1.0"
40
- spec.add_development_dependency "rspec", "~> 3.10"
41
- spec.add_development_dependency "cucumber", "~> 7.1"
42
- spec.add_development_dependency "aruba", "~> 2.0"
43
- spec.add_development_dependency "vcr", "~> 6.0"
44
- spec.add_development_dependency "yard", "~> 0.9"
45
- #spec.add_development_dependency "yard-cucumber", "~> 4.0"
46
- end
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "mdqt"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/cucumber.yml DELETED
@@ -1,2 +0,0 @@
1
- default: --publish
2
-
@@ -1,8 +0,0 @@
1
- require 'rubygems'
2
- require 'cucumber'
3
- require 'cucumber/rake/task'
4
-
5
- desc "Run Cucumber tests"
6
- Cucumber::Rake::Task.new(:features) do |t|
7
- t.cucumber_opts = "features --format pretty"
8
- end
data/lib/tasks/spec.rake DELETED
@@ -1,5 +0,0 @@
1
- require "rspec/core/rake_task"
2
-
3
-
4
-
5
- RSpec::Core::RakeTask.new(:spec)
data/lib/tasks/tests.rake DELETED
@@ -1,6 +0,0 @@
1
-
2
- desc "Run all tests and gather coverage information"
3
- task :tests => [:spec, :features] do
4
-
5
-
6
- end
data/lib/tasks/yard.rake DELETED
@@ -1,6 +0,0 @@
1
- require 'yard'
2
-
3
- YARD::Rake::YardocTask.new do |t|
4
- t.files = ['features/*.feature', 'features/*.rb']
5
- t.options = ['--any', '--extra', '--opts'] # optional
6
- end