aspera-cli 4.14.0 → 4.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/BUGS.md +29 -3
  4. data/CHANGELOG.md +300 -185
  5. data/CONTRIBUTING.md +74 -23
  6. data/README.md +2346 -1619
  7. data/bin/ascli +16 -25
  8. data/bin/asession +15 -15
  9. data/examples/dascli +2 -2
  10. data/examples/proxy.pac +1 -1
  11. data/lib/aspera/aoc.rb +216 -150
  12. data/lib/aspera/ascmd.rb +25 -18
  13. data/lib/aspera/assert.rb +45 -0
  14. data/lib/aspera/cli/basic_auth_plugin.rb +9 -6
  15. data/lib/aspera/cli/error.rb +17 -0
  16. data/lib/aspera/cli/extended_value.rb +51 -16
  17. data/lib/aspera/cli/formatter.rb +276 -174
  18. data/lib/aspera/cli/hints.rb +81 -0
  19. data/lib/aspera/cli/main.rb +114 -147
  20. data/lib/aspera/cli/manager.rb +181 -136
  21. data/lib/aspera/cli/plugin.rb +82 -64
  22. data/lib/aspera/cli/plugins/alee.rb +0 -1
  23. data/lib/aspera/cli/plugins/aoc.rb +327 -331
  24. data/lib/aspera/cli/plugins/ats.rb +12 -8
  25. data/lib/aspera/cli/plugins/bss.rb +2 -2
  26. data/lib/aspera/cli/plugins/config.rb +575 -439
  27. data/lib/aspera/cli/plugins/console.rb +40 -0
  28. data/lib/aspera/cli/plugins/cos.rb +4 -5
  29. data/lib/aspera/cli/plugins/faspex.rb +111 -92
  30. data/lib/aspera/cli/plugins/faspex5.rb +245 -182
  31. data/lib/aspera/cli/plugins/node.rb +239 -160
  32. data/lib/aspera/cli/plugins/orchestrator.rb +56 -19
  33. data/lib/aspera/cli/plugins/preview.rb +54 -38
  34. data/lib/aspera/cli/plugins/server.rb +63 -20
  35. data/lib/aspera/cli/plugins/shares.rb +64 -38
  36. data/lib/aspera/cli/sync_actions.rb +68 -0
  37. data/lib/aspera/cli/transfer_agent.rb +64 -67
  38. data/lib/aspera/cli/transfer_progress.rb +73 -0
  39. data/lib/aspera/cli/version.rb +1 -1
  40. data/lib/aspera/colors.rb +3 -1
  41. data/lib/aspera/command_line_builder.rb +27 -22
  42. data/lib/aspera/cos_node.rb +6 -4
  43. data/lib/aspera/coverage.rb +22 -0
  44. data/lib/aspera/data_repository.rb +33 -2
  45. data/lib/aspera/environment.rb +21 -8
  46. data/lib/aspera/fasp/agent_alpha.rb +116 -0
  47. data/lib/aspera/fasp/agent_base.rb +40 -76
  48. data/lib/aspera/fasp/agent_connect.rb +21 -22
  49. data/lib/aspera/fasp/agent_direct.rb +169 -179
  50. data/lib/aspera/fasp/agent_httpgw.rb +200 -195
  51. data/lib/aspera/fasp/agent_node.rb +43 -35
  52. data/lib/aspera/fasp/agent_trsdk.rb +124 -41
  53. data/lib/aspera/fasp/error_info.rb +2 -2
  54. data/lib/aspera/fasp/faux_file.rb +52 -0
  55. data/lib/aspera/fasp/installation.rb +89 -191
  56. data/lib/aspera/fasp/management.rb +249 -0
  57. data/lib/aspera/fasp/parameters.rb +86 -47
  58. data/lib/aspera/fasp/parameters.yaml +75 -8
  59. data/lib/aspera/fasp/products.rb +162 -0
  60. data/lib/aspera/fasp/resume_policy.rb +7 -5
  61. data/lib/aspera/fasp/sync.rb +273 -0
  62. data/lib/aspera/fasp/transfer_spec.rb +10 -8
  63. data/lib/aspera/fasp/uri.rb +6 -6
  64. data/lib/aspera/faspex_gw.rb +11 -8
  65. data/lib/aspera/faspex_postproc.rb +8 -7
  66. data/lib/aspera/hash_ext.rb +2 -2
  67. data/lib/aspera/id_generator.rb +3 -1
  68. data/lib/aspera/json_rpc.rb +51 -0
  69. data/lib/aspera/keychain/encrypted_hash.rb +46 -11
  70. data/lib/aspera/keychain/macos_security.rb +15 -13
  71. data/lib/aspera/line_logger.rb +23 -0
  72. data/lib/aspera/log.rb +61 -19
  73. data/lib/aspera/nagios.rb +7 -2
  74. data/lib/aspera/node.rb +105 -21
  75. data/lib/aspera/node_simulator.rb +214 -0
  76. data/lib/aspera/oauth.rb +57 -36
  77. data/lib/aspera/open_application.rb +4 -4
  78. data/lib/aspera/persistency_action_once.rb +13 -14
  79. data/lib/aspera/persistency_folder.rb +5 -4
  80. data/lib/aspera/preview/file_types.rb +56 -268
  81. data/lib/aspera/preview/generator.rb +28 -39
  82. data/lib/aspera/preview/options.rb +2 -0
  83. data/lib/aspera/preview/terminal.rb +36 -16
  84. data/lib/aspera/preview/utils.rb +23 -29
  85. data/lib/aspera/proxy_auto_config.rb +6 -3
  86. data/lib/aspera/rest.rb +127 -80
  87. data/lib/aspera/rest_call_error.rb +1 -1
  88. data/lib/aspera/rest_error_analyzer.rb +16 -14
  89. data/lib/aspera/rest_errors_aspera.rb +39 -34
  90. data/lib/aspera/secret_hider.rb +18 -17
  91. data/lib/aspera/ssh.rb +10 -5
  92. data/lib/aspera/temp_file_manager.rb +11 -4
  93. data/lib/aspera/web_auth.rb +10 -7
  94. data/lib/aspera/web_server_simple.rb +11 -5
  95. data.tar.gz.sig +0 -0
  96. metadata +108 -39
  97. metadata.gz.sig +0 -0
  98. data/lib/aspera/cli/listener/line_dump.rb +0 -19
  99. data/lib/aspera/cli/listener/logger.rb +0 -22
  100. data/lib/aspera/cli/listener/progress.rb +0 -50
  101. data/lib/aspera/cli/listener/progress_multi.rb +0 -84
  102. data/lib/aspera/cli/plugins/sync.rb +0 -44
  103. data/lib/aspera/fasp/listener.rb +0 -13
  104. data/lib/aspera/sync.rb +0 -213
@@ -12,48 +12,53 @@ module Aspera
12
12
  Log.log.debug('registering Aspera REST error handlers')
13
13
  # Faspex 4: both user_message and internal_message, and code 200
14
14
  # example: missing meta data on package creation
15
- RestErrorAnalyzer.instance.add_simple_handler('Type 1: error:user_message', 'error', 'user_message', true)
16
- RestErrorAnalyzer.instance.add_simple_handler('Type 2: error:description', 'error', 'description')
17
- RestErrorAnalyzer.instance.add_simple_handler('Type 3: error:internal_message', 'error', 'internal_message')
15
+ RestErrorAnalyzer.instance.add_simple_handler(name: 'Type 1: error:user_message', path: %w[error user_message], always: true)
16
+ RestErrorAnalyzer.instance.add_simple_handler(name: 'Type 2: error:description', path: %w[error description])
17
+ RestErrorAnalyzer.instance.add_simple_handler(name: 'Type 3: error:internal_message', path: %w[error internal_message])
18
18
  # AoC Automation
19
- RestErrorAnalyzer.instance.add_simple_handler('AoC Automation', 'error')
20
- RestErrorAnalyzer.instance.add_simple_handler('Type 5', 'error_description')
21
- RestErrorAnalyzer.instance.add_simple_handler('Type 6', 'message')
22
- RestErrorAnalyzer.instance.add_handler('Type 7: errors[]') do |name, call_context|
23
- if call_context[:data].is_a?(Hash) && call_context[:data]['errors'].is_a?(Hash)
24
- call_context[:data]['errors'].each do |k, v|
25
- RestErrorAnalyzer.add_error(call_context, name, "#{k}: #{v}")
26
- end
19
+ RestErrorAnalyzer.instance.add_simple_handler(name: 'AoC Automation', path: ['error'])
20
+ RestErrorAnalyzer.instance.add_simple_handler(name: 'Type 5', path: ['error_description'])
21
+ RestErrorAnalyzer.instance.add_simple_handler(name: 'Type 6', path: ['message'])
22
+ RestErrorAnalyzer.instance.add_handler('Type 7: errors[]') do |type, call_context|
23
+ next unless call_context[:data].is_a?(Hash) && call_context[:data]['errors'].is_a?(Hash)
24
+ # special for Shares: false positive ? (update global transfer_settings)
25
+ next if call_context[:data].key?('min_connect_version')
26
+ call_context[:data]['errors'].each do |k, v|
27
+ RestErrorAnalyzer.add_error(call_context, type, "#{k}: #{v}")
27
28
  end
28
29
  end
29
30
  # call to upload_setup and download_setup of node api
30
31
  RestErrorAnalyzer.instance.add_handler('T8:node: *_setup') do |type, call_context|
31
- if call_context[:data].is_a?(Hash)
32
- d_t_s = call_context[:data]['transfer_specs']
33
- if d_t_s.is_a?(Array)
34
- d_t_s.each do |res|
35
- # r_err=res['transfer_spec']['error']
36
- r_err = res['error']
37
- if r_err.is_a?(Hash)
38
- RestErrorAnalyzer.add_error(call_context, type, "#{r_err['code']}: #{r_err['reason']}: #{r_err['user_message']}")
39
- end
40
- end
41
- end
32
+ next unless call_context[:data].is_a?(Hash)
33
+ d_t_s = call_context[:data]['transfer_specs']
34
+ next unless d_t_s.is_a?(Array)
35
+ d_t_s.each do |res|
36
+ r_err = res.dig(*%w[transfer_spec error])
37
+ next unless r_err.is_a?(Hash)
38
+ RestErrorAnalyzer.add_error(call_context, type, "#{r_err['code']}: #{r_err['reason']}: #{r_err['user_message']}")
42
39
  end
43
40
  end
44
- RestErrorAnalyzer.instance.add_simple_handler('T9:IBM cloud IAM', 'errorMessage')
45
- RestErrorAnalyzer.instance.add_simple_handler('T10:faspex v4', 'user_message')
41
+ RestErrorAnalyzer.instance.add_simple_handler(name: 'T9:IBM cloud IAM', path: ['errorMessage'])
42
+ RestErrorAnalyzer.instance.add_simple_handler(name: 'T10:faspex v4', path: ['user_message'])
46
43
  RestErrorAnalyzer.instance.add_handler('bss graphql') do |type, call_context|
47
- if call_context[:data].is_a?(Hash)
48
- d_t_s = call_context[:data]['errors']
49
- if d_t_s.is_a?(Array)
50
- d_t_s.each do |res|
51
- r_err = res['message']
52
- if r_err.is_a?(String)
53
- RestErrorAnalyzer.add_error(call_context, type, r_err)
54
- end
55
- end
56
- end
44
+ next unless call_context[:data].is_a?(Hash)
45
+ d_t_s = call_context[:data]['errors']
46
+ next unless d_t_s.is_a?(Array)
47
+ d_t_s.each do |res|
48
+ r_err = res['message']
49
+ next unless r_err.is_a?(String)
50
+ RestErrorAnalyzer.add_error(call_context, type, r_err)
51
+ end
52
+ end
53
+ RestErrorAnalyzer.instance.add_handler('Orchestrator') do |type, call_context|
54
+ next if call_context[:response].code.start_with?('2')
55
+ data = call_context[:data]
56
+ next unless data.is_a?(Hash)
57
+ work_order = data['work_order']
58
+ next unless work_order.is_a?(Hash)
59
+ RestErrorAnalyzer.add_error(call_context, type, work_order['statusDetails'])
60
+ data['missing_parameters']&.each do |param|
61
+ RestErrorAnalyzer.add_error(call_context, type, "missing parameter: #{param}")
57
62
  end
58
63
  end
59
64
  end # register_handlers
@@ -1,34 +1,40 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # cspell:ignore FILEPASS
3
4
  require 'logger'
4
5
 
5
6
  module Aspera
6
7
  # remove secret from logs and output
7
8
  class SecretHider
9
+ # configurable:
10
+ ADDITIONAL_KEYS_TO_HIDE = []
8
11
  # display string for hidden secrets
9
12
  HIDDEN_PASSWORD = '🔑'
10
13
  # env vars for ascp with secrets
11
14
  ASCP_ENV_SECRETS = %w[ASPERA_SCP_PASS ASPERA_SCP_KEY ASPERA_SCP_FILEPASS ASPERA_PROXY_PASS ASPERA_SCP_TOKEN].freeze
12
15
  # keys in hash that contain secrets
13
16
  KEY_SECRETS = %w[password secret passphrase _key apikey crn token].freeze
14
- ALL_SECRETS = [ASCP_ENV_SECRETS, KEY_SECRETS].flatten.freeze
15
- FALSE_POSITIVES = [/^access_key$/].freeze
17
+ HTTP_SECRETS = %w[Authorization].freeze
18
+ ALL_SECRETS = [ASCP_ENV_SECRETS, KEY_SECRETS, HTTP_SECRETS].flatten.freeze
19
+ KEY_FALSE_POSITIVES = [/^access_key$/, /^fallback_private_key$/].freeze
16
20
  # regex that define named captures :begin and :end
17
21
  REGEX_LOG_REPLACES = [
18
22
  # CLI manager get/set options
19
- /(?<begin>[sg]et (#{KEY_SECRETS.join('|')})=).*(?<end>)/,
23
+ /(?<begin>[sg]et (?:#{KEY_SECRETS.join('|')})=).*(?<end>)/,
20
24
  # env var ascp exec
21
- /(?<begin> (#{ASCP_ENV_SECRETS.join('|')})=)(\\.|[^ ])*(?<end> )/,
22
- # rendered JSON
23
- /(?<begin>["':][^"]*(#{ALL_SECRETS.join('|')})[^"]*["']?[=>: ]+")[^"]+(?<end>")/,
25
+ /(?<begin> (?:#{ASCP_ENV_SECRETS.join('|')})=)(\\.|[^ ])*(?<end> )/,
26
+ # rendered JSON or Ruby
27
+ /(?<begin>(?:(?<quote>["'])|:)[^"':=]*(?:#{ALL_SECRETS.join('|')})[^"':=]*\k<quote>?(?:=>|:) *")[^"]+(?<end>")/,
24
28
  # option "secret"
25
29
  /(?<begin>"[^"]*(secret)[^"]*"=>{)[^}]+(?<end>})/,
26
30
  # option "secrets"
27
31
  /(?<begin>(secrets)={)[^}]+(?<end>})/,
28
32
  # private key values
29
- /(?<begin>--+BEGIN .+ KEY--+)[[:ascii:]]+?(?<end>--+?END .+ KEY--+)/
33
+ /(?<begin>--+BEGIN [^-]+ KEY--+)[[:ascii:]]+?(?<end>--+?END [^-]+ KEY--+)/,
34
+ # cred in http dump
35
+ /(?<begin>(?:#{HTTP_SECRETS.join('|')}): )[^\\]+(?<end>\\)/i
30
36
  ].freeze
31
- private_constant :HIDDEN_PASSWORD, :ASCP_ENV_SECRETS, :KEY_SECRETS, :ALL_SECRETS, :REGEX_LOG_REPLACES
37
+ private_constant :HIDDEN_PASSWORD, :ASCP_ENV_SECRETS, :KEY_SECRETS, :HTTP_SECRETS, :ALL_SECRETS, :KEY_FALSE_POSITIVES, :REGEX_LOG_REPLACES
32
38
  @log_secrets = false
33
39
  class << self
34
40
  attr_accessor :log_secrets
@@ -51,21 +57,16 @@ module Aspera
51
57
  # only Strings can be secrets, not booleans, or hash, arrays
52
58
  return false unless keyword.is_a?(String) && value.is_a?(String)
53
59
  # those are not secrets
54
- return false if FALSE_POSITIVES.any?{|f|f.match?(keyword)}
60
+ return false if KEY_FALSE_POSITIVES.any?{|f|f.match?(keyword)}
61
+ return true if ADDITIONAL_KEYS_TO_HIDE.include?(keyword)
55
62
  # check if keyword (name) contains an element that designate it as a secret
56
63
  ALL_SECRETS.any?{|kw|keyword.include?(kw)}
57
64
  end
58
65
 
59
- def deep_remove_secret(obj, is_name_value: false)
66
+ def deep_remove_secret(obj)
60
67
  case obj
61
68
  when Array
62
- if is_name_value
63
- obj.each do |i|
64
- i['value'] = HIDDEN_PASSWORD if secret?(i['parameter'], i['value'])
65
- end
66
- else
67
- obj.each{|i|deep_remove_secret(i)}
68
- end
69
+ obj.each{|i|deep_remove_secret(i)}
69
70
  when Hash
70
71
  obj.each do |k, v|
71
72
  if secret?(k, v)
data/lib/aspera/ssh.rb CHANGED
@@ -2,11 +2,16 @@
2
2
 
3
3
  require 'net/ssh'
4
4
 
5
- # HACK: deactivate ed25519 and ecdsa private keys from ssh identities, as it usually hurts
6
- begin
7
- module Net; module SSH; module Authentication; class Session; private; def default_keys; %w[~/.ssh/id_dsa ~/.ssh/id_rsa ~/.ssh2/id_dsa ~/.ssh2/id_rsa]; end; end; end; end; end # rubocop:disable Layout/AccessModifierIndentation, Layout/EmptyLinesAroundAccessModifier, Layout/LineLength, Style/Semicolon
8
- rescue StandardError
9
- # ignore errors
5
+ if ENV.fetch('ASCLI_ENABLE_ED25519', 'false').eql?('false')
6
+ # HACK: deactivate ed25519 and ecdsa private keys from ssh identities, as it usually cause problems
7
+ old_verbose = $VERBOSE
8
+ $VERBOSE = nil
9
+ begin
10
+ module Net; module SSH; module Authentication; class Session; private; def default_keys; %w[~/.ssh/id_dsa ~/.ssh/id_rsa ~/.ssh2/id_dsa ~/.ssh2/id_rsa]; end; end; end; end; end # rubocop:disable Layout/AccessModifierIndentation, Layout/EmptyLinesAroundAccessModifier, Layout/LineLength, Style/Semicolon
11
+ rescue StandardError
12
+ # ignore errors
13
+ end
14
+ $VERBOSE = old_verbose
10
15
  end
11
16
 
12
17
  module Aspera
@@ -14,14 +14,21 @@ module Aspera
14
14
  FILE_LIST_AGE_MAX_SEC = SEC_IN_DAY * 5
15
15
  private_constant :SEC_IN_DAY, :FILE_LIST_AGE_MAX_SEC
16
16
  include Singleton
17
+ attr_accessor :cleanup_on_exit
18
+
17
19
  def initialize
18
20
  @created_files = []
21
+ @cleanup_on_exit = true
22
+ end
23
+
24
+ def delete_file(filepath)
25
+ File.delete(filepath) if @cleanup_on_exit
19
26
  end
20
27
 
21
28
  # call this on process exit
22
29
  def cleanup
23
30
  @created_files.each do |filepath|
24
- File.delete(filepath) if File.file?(filepath)
31
+ delete_file(filepath) if File.file?(filepath)
25
32
  end
26
33
  @created_files = []
27
34
  end
@@ -29,13 +36,13 @@ module Aspera
29
36
  # ensure that provided folder exists, or create it, generate a unique filename
30
37
  # @return path to that unique file
31
38
  def new_file_path_in_folder(temp_folder, add_base = '')
32
- FileUtils.mkdir_p(temp_folder) unless Dir.exist?(temp_folder)
39
+ FileUtils.mkdir_p(temp_folder)
33
40
  new_file = File.join(temp_folder, add_base + SecureRandom.uuid)
34
41
  @created_files.push(new_file)
35
42
  new_file
36
43
  end
37
44
 
38
- # same as above but in global temp folder
45
+ # same as above but in global temp folder, with user's name
39
46
  def new_file_path_global(base_name)
40
47
  username =
41
48
  begin
@@ -54,7 +61,7 @@ module Aspera
54
61
  # check age of file, delete too old
55
62
  if File.file?(file_path) && (age_sec > FILE_LIST_AGE_MAX_SEC)
56
63
  Log.log.debug{"garbage collecting #{name}"}
57
- File.delete(file_path)
64
+ delete_file(file_path)
58
65
  end
59
66
  end
60
67
  end
@@ -6,20 +6,22 @@ require 'stringio'
6
6
  module Aspera
7
7
  # servlet called on callback: it records the callback request
8
8
  class WebAuthServlet < WEBrick::HTTPServlet::AbstractServlet
9
- def initialize(server, application) # additional args get here
9
+ # @param server [WEBrick::HTTPServer]
10
+ # @param web_auth [WebAuth]
11
+ def initialize(server, web_auth)
10
12
  Log.log.debug('WebAuthServlet initialize')
11
13
  super(server)
12
- @app = application
14
+ @web_auth = web_auth
13
15
  end
14
16
 
15
17
  def service(request, response)
16
18
  Log.log.debug{"received request from browser #{request.request_method} #{request.path}"}
17
19
  raise WEBrick::HTTPStatus::MethodNotAllowed, "unexpected method: #{request.request_method}" unless request.request_method.eql?('GET')
18
- raise WEBrick::HTTPStatus::NotFound, "unexpected path: #{request.path}" unless request.path.eql?(@app.expected_path)
20
+ raise WEBrick::HTTPStatus::NotFound, "unexpected path: #{request.path}" unless request.path.eql?(@web_auth.expected_path)
19
21
  # acquire lock and signal change
20
- @app.mutex.synchronize do
21
- @app.query = request.query
22
- @app.cond.signal
22
+ @web_auth.mutex.synchronize do
23
+ @web_auth.query = request.query
24
+ @web_auth.cond.signal
23
25
  end
24
26
  response.status = 200
25
27
  response.content_type = 'text/html'
@@ -42,7 +44,8 @@ module Aspera
42
44
  @cond = ConditionVariable.new
43
45
  @expected_path = uri.path.empty? ? '/' : uri.path
44
46
  @query = nil
45
- mount(@expected_path, WebAuthServlet, self) # additional args provided to constructor
47
+ # last argument (self) is provided to constructor of servlet
48
+ mount(@expected_path, WebAuthServlet, self)
46
49
  Thread.new { start }
47
50
  end
48
51
 
@@ -3,17 +3,23 @@
3
3
  require 'webrick'
4
4
  require 'webrick/https'
5
5
  require 'aspera/log'
6
+ require 'aspera/assert'
6
7
  require 'openssl'
7
8
 
8
9
  module Aspera
9
10
  class WebServerSimple < WEBrick::HTTPServer
10
11
  CERT_PARAMETERS = %i[key cert chain].freeze
12
+ GENERIC_ISSUER = '/C=FR/O=Test/OU=Test/CN=Test'
13
+ ONE_YEAR_SECONDS = 365 * 24 * 60 * 60
14
+
15
+ private_constant :CERT_PARAMETERS, :GENERIC_ISSUER, :ONE_YEAR_SECONDS
16
+
11
17
  class << self
12
18
  # generates and adds self signed cert to provided webrick options
13
- def fill_self_signed_cert(cert, key)
14
- cert.subject = cert.issuer = OpenSSL::X509::Name.parse('/C=FR/O=Test/OU=Test/CN=Test')
19
+ def fill_self_signed_cert(cert, key, digest = 'SHA256')
20
+ cert.subject = cert.issuer = OpenSSL::X509::Name.parse(GENERIC_ISSUER)
15
21
  cert.not_before = Time.now
16
- cert.not_after = Time.now + 365 * 24 * 60 * 60
22
+ cert.not_after = Time.now + ONE_YEAR_SECONDS
17
23
  cert.public_key = key.public_key
18
24
  cert.serial = 0x0
19
25
  cert.version = 2
@@ -26,7 +32,7 @@ module Aspera
26
32
  # ef.create_extension('keyUsage', 'cRLSign,keyCertSign', true),
27
33
  ]
28
34
  cert.add_extension(ef.create_extension('authorityKeyIdentifier', 'keyid:always,issuer:always'))
29
- cert.sign(key, OpenSSL::Digest.new('SHA256'))
35
+ cert.sign(key, OpenSSL::Digest.new(digest))
30
36
  end
31
37
  end
32
38
 
@@ -47,7 +53,7 @@ module Aspera
47
53
  if certificate.nil?
48
54
  webrick_options[:SSLCertName] = [['CN', WEBrick::Utils.getservername]]
49
55
  else
50
- raise 'certificate must be Hash' unless certificate.is_a?(Hash)
56
+ assert_type(certificate, Hash)
51
57
  certificate = certificate.symbolize_keys
52
58
  raise "unexpected key in certificate config: only: #{CERT_PARAMETERS.join(', ')}" if certificate.keys.any?{|k|!CERT_PARAMETERS.include?(k)}
53
59
  webrick_options[:SSLPrivateKey] = if certificate.key?(:key)
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aspera-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.14.0
4
+ version: 4.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurent Martin
@@ -37,8 +37,70 @@ cert_chain:
37
37
  eTf9kxhVM40wGQOECVNA8UsEEZHD48eF+csUYZtAJOF5oxTI8UyV9T/o6CgO0c9/
38
38
  Gzz+Qm5ULOUcPiJLjSpaiTrkiIVYiDGnqNSr6R1Hb1c=
39
39
  -----END CERTIFICATE-----
40
- date: 2023-09-22 00:00:00.000000000 Z
40
+ date: 2024-02-14 00:00:00.000000000 Z
41
41
  dependencies:
42
+ - !ruby/object:Gem::Dependency
43
+ name: base64
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: 0.2.0
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: 0.2.0
56
+ - !ruby/object:Gem::Dependency
57
+ name: bigdecimal
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '3.1'
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: 3.1.6
66
+ type: :runtime
67
+ prerelease: false
68
+ version_requirements: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - "~>"
71
+ - !ruby/object:Gem::Version
72
+ version: '3.1'
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 3.1.6
76
+ - !ruby/object:Gem::Dependency
77
+ name: blankslate
78
+ requirement: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.1'
83
+ type: :runtime
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.1'
90
+ - !ruby/object:Gem::Dependency
91
+ name: csv
92
+ requirement: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '3.0'
97
+ type: :runtime
98
+ prerelease: false
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '3.0'
42
104
  - !ruby/object:Gem::Dependency
43
105
  name: execjs
44
106
  requirement: !ruby/object:Gem::Requirement
@@ -68,19 +130,19 @@ dependencies:
68
130
  - !ruby/object:Gem::Version
69
131
  version: '2.0'
70
132
  - !ruby/object:Gem::Dependency
71
- name: net-smtp
133
+ name: mime-types
72
134
  requirement: !ruby/object:Gem::Requirement
73
135
  requirements:
74
136
  - - "~>"
75
137
  - !ruby/object:Gem::Version
76
- version: '0.3'
138
+ version: '3.5'
77
139
  type: :runtime
78
140
  prerelease: false
79
141
  version_requirements: !ruby/object:Gem::Requirement
80
142
  requirements:
81
143
  - - "~>"
82
144
  - !ruby/object:Gem::Version
83
- version: '0.3'
145
+ version: '3.5'
84
146
  - !ruby/object:Gem::Dependency
85
147
  name: net-ssh
86
148
  requirement: !ruby/object:Gem::Requirement
@@ -95,6 +157,20 @@ dependencies:
95
157
  - - "~>"
96
158
  - !ruby/object:Gem::Version
97
159
  version: '7.0'
160
+ - !ruby/object:Gem::Dependency
161
+ name: rainbow
162
+ requirement: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '3.0'
167
+ type: :runtime
168
+ prerelease: false
169
+ version_requirements: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '3.0'
98
174
  - !ruby/object:Gem::Dependency
99
175
  name: ruby-progressbar
100
176
  requirement: !ruby/object:Gem::Requirement
@@ -208,47 +284,33 @@ dependencies:
208
284
  - !ruby/object:Gem::Version
209
285
  version: '1.0'
210
286
  - !ruby/object:Gem::Dependency
211
- name: mimemagic
212
- requirement: !ruby/object:Gem::Requirement
213
- requirements:
214
- - - "~>"
215
- - !ruby/object:Gem::Version
216
- version: '0.3'
217
- type: :development
218
- prerelease: false
219
- version_requirements: !ruby/object:Gem::Requirement
220
- requirements:
221
- - - "~>"
222
- - !ruby/object:Gem::Version
223
- version: '0.3'
224
- - !ruby/object:Gem::Dependency
225
- name: bundler
287
+ name: rake
226
288
  requirement: !ruby/object:Gem::Requirement
227
289
  requirements:
228
290
  - - "~>"
229
291
  - !ruby/object:Gem::Version
230
- version: '2.0'
292
+ version: '13.0'
231
293
  type: :development
232
294
  prerelease: false
233
295
  version_requirements: !ruby/object:Gem::Requirement
234
296
  requirements:
235
297
  - - "~>"
236
298
  - !ruby/object:Gem::Version
237
- version: '2.0'
299
+ version: '13.0'
238
300
  - !ruby/object:Gem::Dependency
239
- name: rake
301
+ name: reek
240
302
  requirement: !ruby/object:Gem::Requirement
241
303
  requirements:
242
304
  - - "~>"
243
305
  - !ruby/object:Gem::Version
244
- version: '13.0'
306
+ version: 6.1.0
245
307
  type: :development
246
308
  prerelease: false
247
309
  version_requirements: !ruby/object:Gem::Requirement
248
310
  requirements:
249
311
  - - "~>"
250
312
  - !ruby/object:Gem::Version
251
- version: '13.0'
313
+ version: 6.1.0
252
314
  - !ruby/object:Gem::Dependency
253
315
  name: rspec
254
316
  requirement: !ruby/object:Gem::Requirement
@@ -325,28 +387,28 @@ dependencies:
325
387
  requirements:
326
388
  - - "~>"
327
389
  - !ruby/object:Gem::Version
328
- version: '0.18'
390
+ version: '0.22'
329
391
  type: :development
330
392
  prerelease: false
331
393
  version_requirements: !ruby/object:Gem::Requirement
332
394
  requirements:
333
395
  - - "~>"
334
396
  - !ruby/object:Gem::Version
335
- version: '0.18'
397
+ version: '0.22'
336
398
  - !ruby/object:Gem::Dependency
337
399
  name: solargraph
338
400
  requirement: !ruby/object:Gem::Requirement
339
401
  requirements:
340
402
  - - "~>"
341
403
  - !ruby/object:Gem::Version
342
- version: '0.44'
404
+ version: '0.50'
343
405
  type: :development
344
406
  prerelease: false
345
407
  version_requirements: !ruby/object:Gem::Requirement
346
408
  requirements:
347
409
  - - "~>"
348
410
  - !ruby/object:Gem::Version
349
- version: '0.44'
411
+ version: '0.50'
350
412
  description: Command line interface for IBM Aspera products
351
413
  email:
352
414
  - laurent.martin.aspera@fr.ibm.com
@@ -367,15 +429,14 @@ files:
367
429
  - examples/rubyc
368
430
  - lib/aspera/aoc.rb
369
431
  - lib/aspera/ascmd.rb
432
+ - lib/aspera/assert.rb
370
433
  - lib/aspera/ats_api.rb
371
434
  - lib/aspera/cli/basic_auth_plugin.rb
435
+ - lib/aspera/cli/error.rb
372
436
  - lib/aspera/cli/extended_value.rb
373
437
  - lib/aspera/cli/formatter.rb
438
+ - lib/aspera/cli/hints.rb
374
439
  - lib/aspera/cli/info.rb
375
- - lib/aspera/cli/listener/line_dump.rb
376
- - lib/aspera/cli/listener/logger.rb
377
- - lib/aspera/cli/listener/progress.rb
378
- - lib/aspera/cli/listener/progress_multi.rb
379
440
  - lib/aspera/cli/main.rb
380
441
  - lib/aspera/cli/manager.rb
381
442
  - lib/aspera/cli/plugin.rb
@@ -393,12 +454,14 @@ files:
393
454
  - lib/aspera/cli/plugins/preview.rb
394
455
  - lib/aspera/cli/plugins/server.rb
395
456
  - lib/aspera/cli/plugins/shares.rb
396
- - lib/aspera/cli/plugins/sync.rb
457
+ - lib/aspera/cli/sync_actions.rb
397
458
  - lib/aspera/cli/transfer_agent.rb
459
+ - lib/aspera/cli/transfer_progress.rb
398
460
  - lib/aspera/cli/version.rb
399
461
  - lib/aspera/colors.rb
400
462
  - lib/aspera/command_line_builder.rb
401
463
  - lib/aspera/cos_node.rb
464
+ - lib/aspera/coverage.rb
402
465
  - lib/aspera/data/1
403
466
  - lib/aspera/data/2
404
467
  - lib/aspera/data/3
@@ -407,6 +470,7 @@ files:
407
470
  - lib/aspera/data/6
408
471
  - lib/aspera/data_repository.rb
409
472
  - lib/aspera/environment.rb
473
+ - lib/aspera/fasp/agent_alpha.rb
410
474
  - lib/aspera/fasp/agent_base.rb
411
475
  - lib/aspera/fasp/agent_connect.rb
412
476
  - lib/aspera/fasp/agent_direct.rb
@@ -415,22 +479,28 @@ files:
415
479
  - lib/aspera/fasp/agent_trsdk.rb
416
480
  - lib/aspera/fasp/error.rb
417
481
  - lib/aspera/fasp/error_info.rb
482
+ - lib/aspera/fasp/faux_file.rb
418
483
  - lib/aspera/fasp/installation.rb
419
- - lib/aspera/fasp/listener.rb
484
+ - lib/aspera/fasp/management.rb
420
485
  - lib/aspera/fasp/parameters.rb
421
486
  - lib/aspera/fasp/parameters.yaml
487
+ - lib/aspera/fasp/products.rb
422
488
  - lib/aspera/fasp/resume_policy.rb
489
+ - lib/aspera/fasp/sync.rb
423
490
  - lib/aspera/fasp/transfer_spec.rb
424
491
  - lib/aspera/fasp/uri.rb
425
492
  - lib/aspera/faspex_gw.rb
426
493
  - lib/aspera/faspex_postproc.rb
427
494
  - lib/aspera/hash_ext.rb
428
495
  - lib/aspera/id_generator.rb
496
+ - lib/aspera/json_rpc.rb
429
497
  - lib/aspera/keychain/encrypted_hash.rb
430
498
  - lib/aspera/keychain/macos_security.rb
499
+ - lib/aspera/line_logger.rb
431
500
  - lib/aspera/log.rb
432
501
  - lib/aspera/nagios.rb
433
502
  - lib/aspera/node.rb
503
+ - lib/aspera/node_simulator.rb
434
504
  - lib/aspera/oauth.rb
435
505
  - lib/aspera/open_application.rb
436
506
  - lib/aspera/persistency_action_once.rb
@@ -450,7 +520,6 @@ files:
450
520
  - lib/aspera/rest_errors_aspera.rb
451
521
  - lib/aspera/secret_hider.rb
452
522
  - lib/aspera/ssh.rb
453
- - lib/aspera/sync.rb
454
523
  - lib/aspera/temp_file_manager.rb
455
524
  - lib/aspera/timer_limiter.rb
456
525
  - lib/aspera/uri_reader.rb
@@ -462,8 +531,8 @@ licenses:
462
531
  metadata:
463
532
  allowed_push_host: https://rubygems.org
464
533
  homepage_uri: https://github.com/IBM/aspera-cli
465
- source_code_uri: https://github.com/IBM/aspera-cli
466
- changelog_uri: https://github.com/IBM/aspera-cli
534
+ source_code_uri: https://github.com/IBM/aspera-cli/tree/main/lib/aspera
535
+ changelog_uri: https://github.com/IBM/aspera-cli/CHANGELOG.md
467
536
  rubygems_uri: https://rubygems.org/gems/aspera-cli
468
537
  documentation_uri: https://www.rubydoc.info/gems/aspera-cli
469
538
  post_install_message:
@@ -482,7 +551,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
482
551
  version: '0'
483
552
  requirements:
484
553
  - Read the manual for any requirement
485
- rubygems_version: 3.4.10
554
+ rubygems_version: 3.4.19
486
555
  signing_key:
487
556
  specification_version: 4
488
557
  summary: 'Execute actions using command line on IBM Aspera Server products: Aspera
metadata.gz.sig CHANGED
Binary file
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'aspera/fasp/listener'
4
- require 'json'
5
-
6
- module Aspera
7
- module Cli
8
- module Listener
9
- # listener for FASP transfers (debug)
10
- # FASP event listener display management events as JSON
11
- class LineDump < Aspera::Fasp::Listener
12
- def event_enhanced(data)
13
- $stdout.puts(JSON.generate(data))
14
- $stdout.flush
15
- end
16
- end
17
- end
18
- end
19
- end