aspera-cli 4.7.0 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.md +1267 -999
- data/bin/ascli +20 -1
- data/bin/asession +37 -34
- data/docs/test_env.conf +7 -3
- data/examples/aoc.rb +13 -12
- data/examples/dascli +23 -0
- data/examples/faspex4.rb +34 -29
- data/examples/{transfer.rb → node.rb} +31 -59
- data/examples/server.rb +93 -0
- data/lib/aspera/aoc.rb +153 -143
- data/lib/aspera/ascmd.rb +56 -45
- data/lib/aspera/ats_api.rb +9 -6
- data/lib/aspera/cli/basic_auth_plugin.rb +18 -16
- data/lib/aspera/cli/extended_value.rb +33 -30
- data/lib/aspera/cli/formater.rb +105 -111
- data/lib/aspera/cli/info.rb +3 -2
- data/lib/aspera/cli/listener/line_dump.rb +1 -0
- data/lib/aspera/cli/listener/logger.rb +1 -0
- data/lib/aspera/cli/listener/progress.rb +13 -12
- data/lib/aspera/cli/listener/progress_multi.rb +21 -20
- data/lib/aspera/cli/main.rb +110 -90
- data/lib/aspera/cli/manager.rb +99 -88
- data/lib/aspera/cli/plugin.rb +98 -39
- data/lib/aspera/cli/plugins/alee.rb +6 -5
- data/lib/aspera/cli/plugins/aoc.rb +581 -450
- data/lib/aspera/cli/plugins/ats.rb +84 -83
- data/lib/aspera/cli/plugins/bss.rb +30 -27
- data/lib/aspera/cli/plugins/config.rb +488 -397
- data/lib/aspera/cli/plugins/console.rb +17 -15
- data/lib/aspera/cli/plugins/cos.rb +26 -35
- data/lib/aspera/cli/plugins/faspex.rb +206 -172
- data/lib/aspera/cli/plugins/faspex5.rb +109 -74
- data/lib/aspera/cli/plugins/node.rb +379 -189
- data/lib/aspera/cli/plugins/orchestrator.rb +71 -65
- data/lib/aspera/cli/plugins/preview.rb +131 -122
- data/lib/aspera/cli/plugins/server.rb +50 -150
- data/lib/aspera/cli/plugins/shares.rb +61 -27
- data/lib/aspera/cli/plugins/sync.rb +15 -14
- data/lib/aspera/cli/transfer_agent.rb +75 -64
- data/lib/aspera/cli/version.rb +2 -1
- data/lib/aspera/colors.rb +29 -28
- data/lib/aspera/command_line_builder.rb +50 -43
- data/lib/aspera/cos_node.rb +64 -38
- data/lib/aspera/data_repository.rb +1 -0
- data/lib/aspera/environment.rb +33 -10
- data/lib/aspera/fasp/agent_base.rb +35 -30
- data/lib/aspera/fasp/agent_connect.rb +35 -30
- data/lib/aspera/fasp/agent_direct.rb +68 -60
- data/lib/aspera/fasp/agent_httpgw.rb +71 -64
- data/lib/aspera/fasp/agent_node.rb +24 -23
- data/lib/aspera/fasp/agent_trsdk.rb +19 -20
- data/lib/aspera/fasp/error.rb +2 -1
- data/lib/aspera/fasp/error_info.rb +79 -68
- data/lib/aspera/fasp/installation.rb +130 -126
- data/lib/aspera/fasp/listener.rb +1 -0
- data/lib/aspera/fasp/parameters.rb +71 -60
- data/lib/aspera/fasp/parameters.yaml +69 -17
- data/lib/aspera/fasp/resume_policy.rb +14 -11
- data/lib/aspera/fasp/transfer_spec.rb +6 -5
- data/lib/aspera/fasp/uri.rb +25 -24
- data/lib/aspera/faspex_gw.rb +83 -72
- data/lib/aspera/hash_ext.rb +23 -13
- data/lib/aspera/id_generator.rb +16 -13
- data/lib/aspera/keychain/encrypted_hash.rb +61 -46
- data/lib/aspera/keychain/macos_security.rb +26 -24
- data/lib/aspera/log.rb +35 -39
- data/lib/aspera/nagios.rb +36 -28
- data/lib/aspera/node.rb +19 -19
- data/lib/aspera/oauth.rb +120 -100
- data/lib/aspera/open_application.rb +25 -22
- data/lib/aspera/persistency_action_once.rb +9 -8
- data/lib/aspera/persistency_folder.rb +13 -9
- data/lib/aspera/preview/file_types.rb +261 -266
- data/lib/aspera/preview/generator.rb +74 -73
- data/lib/aspera/preview/image_error.png +0 -0
- data/lib/aspera/preview/options.rb +7 -6
- data/lib/aspera/preview/utils.rb +30 -33
- data/lib/aspera/preview/video_error.png +0 -0
- data/lib/aspera/proxy_auto_config.rb +27 -23
- data/lib/aspera/rest.rb +73 -74
- data/lib/aspera/rest_call_error.rb +1 -0
- data/lib/aspera/rest_error_analyzer.rb +23 -19
- data/lib/aspera/rest_errors_aspera.rb +43 -40
- data/lib/aspera/secret_hider.rb +74 -0
- data/lib/aspera/ssh.rb +13 -10
- data/lib/aspera/sync.rb +49 -47
- data/lib/aspera/temp_file_manager.rb +7 -5
- data/lib/aspera/timer_limiter.rb +9 -8
- data/lib/aspera/uri_reader.rb +17 -18
- data/lib/aspera/web_auth.rb +17 -15
- data.tar.gz.sig +5 -0
- metadata +119 -35
- metadata.gz.sig +0 -0
- data/bin/dascli +0 -13
data/lib/aspera/ssh.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'net/ssh'
|
3
4
|
|
4
5
|
# Hack: deactivate ed25519 and ecdsa private keys from ssh identities, as it usually hurts
|
5
6
|
begin
|
6
|
-
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
|
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
|
7
8
|
rescue StandardError
|
8
9
|
# ignore errors
|
9
10
|
end
|
@@ -16,33 +17,35 @@ module Aspera
|
|
16
17
|
# see: https://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start
|
17
18
|
def initialize(host,username,ssh_options)
|
18
19
|
Log.log.debug("ssh:#{username}@#{host}")
|
19
|
-
|
20
|
-
@
|
21
|
-
@
|
22
|
-
@ssh_options
|
20
|
+
Log.log.debug("ssh_options:#{ssh_options}")
|
21
|
+
@host = host
|
22
|
+
@username = username
|
23
|
+
@ssh_options = ssh_options
|
24
|
+
@ssh_options[:logger] = Log.log
|
23
25
|
end
|
24
26
|
|
25
27
|
def execute(cmd,input=nil)
|
26
28
|
if cmd.is_a?(Array)
|
27
29
|
# concatenate arguments, enclose in double quotes
|
28
|
-
cmd=cmd.map{|v|%Q("#{v}")}.join(' ')
|
30
|
+
cmd = cmd.map{|v|%Q("#{v}")}.join(' ')
|
29
31
|
end
|
30
32
|
Log.log.debug("cmd=#{cmd}")
|
31
33
|
response = []
|
32
34
|
Net::SSH.start(@host, @username, @ssh_options) do |session|
|
33
|
-
ssh_channel=session.open_channel do |channel|
|
35
|
+
ssh_channel = session.open_channel do |channel|
|
34
36
|
# prepare stdout processing
|
35
37
|
channel.on_data{|_chan,data|response.push(data)}
|
36
38
|
# prepare stderr processing, stderr if type = 1
|
37
39
|
channel.on_extended_data do |_chan, _type, data|
|
38
|
-
errormsg="#{cmd}: [#{data.chomp}]"
|
40
|
+
errormsg = "#{cmd}: [#{data.chomp}]"
|
39
41
|
# Happens when windows user hasn't logged in and created home account.
|
40
42
|
if data.include?('Could not chdir to home directory')
|
41
|
-
errormsg+="\nHint: home not created in Windows?"
|
43
|
+
errormsg += "\nHint: home not created in Windows?"
|
42
44
|
end
|
43
45
|
raise errormsg
|
44
46
|
end
|
45
|
-
channel
|
47
|
+
# send commannd to SSH channel (execute)
|
48
|
+
channel.send('cexe'.reverse,cmd){|_ch,_success|channel.send_data(input) unless input.nil?}
|
46
49
|
end
|
47
50
|
# wait for channel to finish (command exit)
|
48
51
|
ssh_channel.wait
|
data/lib/aspera/sync.rb
CHANGED
@@ -1,49 +1,50 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'aspera/command_line_builder'
|
3
4
|
|
4
5
|
module Aspera
|
5
6
|
# builds command line arg for async
|
6
7
|
class Sync
|
7
|
-
INSTANCE_PARAMS=
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
SESSION_PARAMS=
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
8
|
+
INSTANCE_PARAMS =
|
9
|
+
{
|
10
|
+
'alt_logdir' => { cltype: :opt_with_arg, accepted_types: :string},
|
11
|
+
'watchd' => { cltype: :opt_with_arg, accepted_types: :string},
|
12
|
+
'apply_local_docroot' => { cltype: :opt_without_arg},
|
13
|
+
'quiet' => { cltype: :opt_without_arg}
|
14
|
+
}.freeze
|
15
|
+
SESSION_PARAMS =
|
16
|
+
{
|
17
|
+
'name' => { cltype: :opt_with_arg, accepted_types: :string},
|
18
|
+
'local_dir' => { cltype: :opt_with_arg, accepted_types: :string},
|
19
|
+
'remote_dir' => { cltype: :opt_with_arg, accepted_types: :string},
|
20
|
+
'local_db_dir' => { cltype: :opt_with_arg, accepted_types: :string},
|
21
|
+
'remote_db_dir' => { cltype: :opt_with_arg, accepted_types: :string},
|
22
|
+
'host' => { cltype: :opt_with_arg, accepted_types: :string},
|
23
|
+
'user' => { cltype: :opt_with_arg, accepted_types: :string},
|
24
|
+
'private_key_path' => { cltype: :opt_with_arg, accepted_types: :string},
|
25
|
+
'direction' => { cltype: :opt_with_arg, accepted_types: :string},
|
26
|
+
'checksum' => { cltype: :opt_with_arg, accepted_types: :string},
|
27
|
+
'tcp_port' => { cltype: :opt_with_arg, accepted_types: :int},
|
28
|
+
'rate_policy' => { cltype: :opt_with_arg, accepted_types: :string},
|
29
|
+
'target_rate' => { cltype: :opt_with_arg, accepted_types: :string},
|
30
|
+
'cooloff' => { cltype: :opt_with_arg, accepted_types: :int},
|
31
|
+
'pending_max' => { cltype: :opt_with_arg, accepted_types: :int},
|
32
|
+
'scan_intensity' => { cltype: :opt_with_arg, accepted_types: :string},
|
33
|
+
'cipher' => { cltype: :opt_with_arg, accepted_types: :string},
|
34
|
+
'transfer_threads' => { cltype: :opt_with_arg, accepted_types: :int},
|
35
|
+
'preserve_time' => { cltype: :opt_without_arg},
|
36
|
+
'preserve_access_time' => { cltype: :opt_without_arg},
|
37
|
+
'preserve_modification_time' => { cltype: :opt_without_arg},
|
38
|
+
'preserve_uid' => { cltype: :opt_without_arg},
|
39
|
+
'preserve_gid' => { cltype: :opt_without_arg},
|
40
|
+
'create_dir' => { cltype: :opt_without_arg},
|
41
|
+
'reset' => { cltype: :opt_without_arg},
|
42
|
+
# note: only one env var, but multiple sessions... may be a problem
|
43
|
+
'remote_password' => { cltype: :envvar, clvarname: 'ASPERA_SCP_PASS'},
|
44
|
+
'cookie' => { cltype: :envvar, clvarname: 'ASPERA_SCP_COOKIE'},
|
45
|
+
'token' => { cltype: :envvar, clvarname: 'ASPERA_SCP_TOKEN'},
|
46
|
+
'license' => { cltype: :envvar, clvarname: 'ASPERA_SCP_LICENSE'}
|
47
|
+
}.freeze
|
47
48
|
|
48
49
|
Aspera::CommandLineBuilder.normalize_description(INSTANCE_PARAMS)
|
49
50
|
Aspera::CommandLineBuilder.normalize_description(SESSION_PARAMS)
|
@@ -51,25 +52,26 @@ module Aspera
|
|
51
52
|
private_constant :INSTANCE_PARAMS,:SESSION_PARAMS
|
52
53
|
|
53
54
|
def initialize(sync_params)
|
54
|
-
@sync_params=sync_params
|
55
|
+
@sync_params = sync_params
|
55
56
|
end
|
56
57
|
|
57
|
-
MANDATORY_KEYS=[
|
58
|
+
MANDATORY_KEYS = %w[instance sessions].freeze
|
58
59
|
|
59
60
|
def compute_args
|
60
61
|
raise StandardError,'parameter must be Hash' unless @sync_params.is_a?(Hash)
|
61
|
-
raise StandardError,"parameter hash must have at least 'sessions', and optionally 'instance' keys." unless
|
62
|
+
raise StandardError,"parameter hash must have at least 'sessions', and optionally 'instance' keys." unless
|
63
|
+
@sync_params.keys.push('instance').uniq.sort.eql?(MANDATORY_KEYS)
|
62
64
|
raise StandardError,'sessions key must be Array' unless @sync_params['sessions'].is_a?(Array)
|
63
65
|
raise StandardError,'sessions key must has at least one element (hash)' unless @sync_params['sessions'].first.is_a?(Hash)
|
64
66
|
|
65
|
-
env_args={
|
67
|
+
env_args = {
|
66
68
|
args: [],
|
67
|
-
env:
|
69
|
+
env: {}
|
68
70
|
}
|
69
71
|
|
70
72
|
if @sync_params.has_key?('instance')
|
71
73
|
raise StandardError,'instance key must be hash' unless @sync_params['instance'].is_a?(Hash)
|
72
|
-
instance_builder=CommandLineBuilder.new(@sync_params['instance'],INSTANCE_PARAMS)
|
74
|
+
instance_builder = CommandLineBuilder.new(@sync_params['instance'],INSTANCE_PARAMS)
|
73
75
|
instance_builder.process_params
|
74
76
|
instance_builder.add_env_args(env_args[:env],env_args[:args])
|
75
77
|
end
|
@@ -77,7 +79,7 @@ module Aspera
|
|
77
79
|
@sync_params['sessions'].each do |session_params|
|
78
80
|
raise StandardError,'sessions must contain hashes' unless session_params.is_a?(Hash)
|
79
81
|
raise StandardError,'session must contain at leat name' unless session_params.has_key?('name')
|
80
|
-
session_builder=CommandLineBuilder.new(session_params,SESSION_PARAMS)
|
82
|
+
session_builder = CommandLineBuilder.new(session_params,SESSION_PARAMS)
|
81
83
|
session_builder.process_params
|
82
84
|
session_builder.add_env_args(env_args[:env],env_args[:args])
|
83
85
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'singleton'
|
3
4
|
require 'fileutils'
|
4
5
|
require 'etc'
|
@@ -36,11 +37,12 @@ module Aspera
|
|
36
37
|
|
37
38
|
# same as above but in global temp folder
|
38
39
|
def new_file_path_global(base_name)
|
39
|
-
username =
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
40
|
+
username =
|
41
|
+
begin
|
42
|
+
Etc.getlogin || Etc.getpwuid(Process.uid).name || 'unknown_user'
|
43
|
+
rescue StandardError
|
44
|
+
'unknown_user'
|
45
|
+
end
|
44
46
|
new_file_path_in_folder(Etc.systmpdir, base_name + '_' + username + '_')
|
45
47
|
end
|
46
48
|
|
data/lib/aspera/timer_limiter.rb
CHANGED
@@ -1,20 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module Aspera
|
3
4
|
# used to throttle logs
|
4
5
|
class TimerLimiter
|
5
6
|
# @param delay in seconds (float)
|
6
7
|
def initialize(delay)
|
7
|
-
@delay=delay
|
8
|
-
@last_time=nil
|
9
|
-
@count=0
|
8
|
+
@delay = delay
|
9
|
+
@last_time = nil
|
10
|
+
@count = 0
|
10
11
|
end
|
11
12
|
|
12
13
|
def trigger?
|
13
|
-
old_time
|
14
|
-
@last_time=Time.now.to_f
|
15
|
-
@count+=1
|
16
|
-
if old_time.nil? || ((@last_time-old_time)
|
17
|
-
@count=0
|
14
|
+
old_time = @last_time
|
15
|
+
@last_time = Time.now.to_f
|
16
|
+
@count += 1
|
17
|
+
if old_time.nil? || ((@last_time - old_time) > @delay)
|
18
|
+
@count = 0
|
18
19
|
return true
|
19
20
|
end
|
20
21
|
return false
|
data/lib/aspera/uri_reader.rb
CHANGED
@@ -1,27 +1,26 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'uri'
|
3
|
-
require '
|
4
|
-
require 'net/https'
|
4
|
+
require 'aspera/rest'
|
5
5
|
|
6
6
|
module Aspera
|
7
7
|
module UriReader
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
8
|
+
class << self
|
9
|
+
# read some content from some URI, support file: , http: and https: schemes
|
10
|
+
def read(uri_to_read)
|
11
|
+
proxy_uri = URI.parse(uri_to_read)
|
12
|
+
case proxy_uri.scheme
|
13
|
+
when 'http','https'
|
14
|
+
return Rest.new(base_url: uri_to_read,redirect_max: 5).call(operation: 'GET', subpath: '', headers: {'Accept' => 'text/plain'})[:data]
|
15
|
+
when 'file',NilClass
|
16
|
+
local_file_path = proxy_uri.path
|
17
|
+
raise 'URL shall have a path, check syntax' if local_file_path.nil?
|
18
|
+
local_file_path = File.expand_path(local_file_path.gsub(/^\//,'')) if /^\/(~|.|..)\//.match?(local_file_path)
|
19
|
+
return File.read(local_file_path)
|
20
|
+
else
|
21
|
+
raise "unknown scheme: [#{proxy_uri.scheme}] for [#{uri_to_read}]"
|
22
|
+
end
|
23
23
|
end
|
24
|
-
raise "no scheme: [#{proxy_uri.scheme}] for [#{proxy_pac_uri}]"
|
25
24
|
end
|
26
25
|
end
|
27
26
|
end
|
data/lib/aspera/web_auth.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'webrick'
|
3
4
|
require 'webrick/https'
|
5
|
+
require 'stringio'
|
4
6
|
|
5
7
|
module Aspera
|
6
8
|
# servlet called on callback: it records the callback request
|
@@ -8,7 +10,7 @@ module Aspera
|
|
8
10
|
def initialize(server,application) # additional args get here
|
9
11
|
Log.log.debug('WebAuthServlet initialize')
|
10
12
|
super(server)
|
11
|
-
@app=application
|
13
|
+
@app = application
|
12
14
|
end
|
13
15
|
|
14
16
|
def service(request, response)
|
@@ -17,12 +19,12 @@ module Aspera
|
|
17
19
|
raise WEBrick::HTTPStatus::NotFound,"unexpected path: #{request.path}" unless request.path.eql?(@app.expected_path)
|
18
20
|
# acquire lock and signal change
|
19
21
|
@app.mutex.synchronize do
|
20
|
-
@app.query=request.query
|
22
|
+
@app.query = request.query
|
21
23
|
@app.cond.signal
|
22
24
|
end
|
23
|
-
response.status=200
|
25
|
+
response.status = 200
|
24
26
|
response.content_type = 'text/html'
|
25
|
-
response.body='<html><head><title>Ok</title></head><body><h1>Thank you !</h1><p>You can close this window.</p></body></html>'
|
27
|
+
response.body = '<html><head><title>Ok</title></head><body><h1>Thank you !</h1><p>You can close this window.</p></body></html>'
|
26
28
|
return nil
|
27
29
|
end
|
28
30
|
end # WebAuthServlet
|
@@ -53,25 +55,24 @@ module Aspera
|
|
53
55
|
attr_writer :query
|
54
56
|
# @param endpoint_url [String] e.g. 'https://127.0.0.1:12345'
|
55
57
|
def initialize(endpoint_url)
|
56
|
-
uri=URI.parse(endpoint_url)
|
58
|
+
uri = URI.parse(endpoint_url)
|
57
59
|
# parameters for servlet
|
58
|
-
@query=nil
|
59
|
-
@mutex=Mutex.new
|
60
|
-
@cond=ConditionVariable.new
|
61
|
-
@expected_path=uri.path.empty? ? '/' : uri.path
|
60
|
+
@query = nil
|
61
|
+
@mutex = Mutex.new
|
62
|
+
@cond = ConditionVariable.new
|
63
|
+
@expected_path = uri.path.empty? ? '/' : uri.path
|
62
64
|
# see https://www.rubydoc.info/stdlib/webrick/WEBrick/Config
|
63
65
|
webrick_options = {
|
64
66
|
BindAddress: uri.host,
|
65
67
|
Port: uri.port,
|
66
68
|
Logger: Log.log,
|
67
|
-
AccessLog: [[self, WEBrick::AccessLog::COMMON_LOG_FORMAT]] #
|
69
|
+
AccessLog: [[self, WEBrick::AccessLog::COMMON_LOG_FORMAT]] # replace default access log to call local method "<<" below
|
68
70
|
}
|
69
71
|
case uri.scheme
|
70
72
|
when 'http'
|
71
73
|
Log.log.debug('HTTP mode')
|
72
74
|
when 'https'
|
73
|
-
webrick_options[:SSLEnable]=true
|
74
|
-
webrick_options[:SSLVerifyClient] = OpenSSL::SSL::VERIFY_NONE
|
75
|
+
webrick_options[:SSLEnable] = true
|
75
76
|
# a- automatic certificate generation
|
76
77
|
webrick_options[:SSLCertName] = [['CN',WEBrick::Utils.getservername]]
|
77
78
|
# b- generate self signed cert
|
@@ -82,12 +83,13 @@ module Aspera
|
|
82
83
|
#webrick_options[:SSLPrivateKey] = OpenSSL::PKey::RSA.new(File.read('.../myserver.key'))
|
83
84
|
#webrick_options[:SSLCertificate] = OpenSSL::X509::Certificate.new(File.read('.../myserver.crt'))
|
84
85
|
end
|
85
|
-
|
86
|
+
# self signed certificate generates characters on STDERR, see create_self_signed_cert in webrick/ssl.rb
|
87
|
+
Log.capture_stderr { @server = WEBrick::HTTPServer.new(webrick_options) }
|
86
88
|
@server.mount(@expected_path, WebAuthServlet, self) # additional args provided to constructor
|
87
89
|
Thread.new { @server.start }
|
88
90
|
end
|
89
91
|
|
90
|
-
# log web server access
|
92
|
+
# log web server access ( option AccessLog )
|
91
93
|
def <<(access_log)
|
92
94
|
Log.log.debug{"webrick log #{access_log.chomp}"}
|
93
95
|
end
|
@@ -101,7 +103,7 @@ module Aspera
|
|
101
103
|
@mutex.synchronize{@cond.wait(@mutex)}
|
102
104
|
# tell server thread to stop
|
103
105
|
@server.shutdown
|
104
|
-
@server=nil
|
106
|
+
@server = nil
|
105
107
|
return @query
|
106
108
|
end
|
107
109
|
end
|
data.tar.gz.sig
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
B�i�)
|
2
|
+
�����Җ��$�a��W�N�I�Q��+��ALb�%.i��=6�F�(GcU��G�B,87h}��1O�D��@ǢR�����KȐJ�M�ei⩤(��y�I
|
3
|
+
��J�6ޚ껪��
|
4
|
+
�1j�}�h�%�mi��ϥ��j�3s]%���3�4��}T=�T��D�5�>�c��i��l�����lH(�0^nQ���`�\�2Rj�~9��"��N�3=��X�|(w�tV?�ڸ�m_�����{�V�h���g���:mU�Fp��Z$��["�!����0ہ�:����ժzc�G���5&+Ͻ��U}�|�����0DZ�mӛ�O3,%�|�C��E�[`�A�.3���z��6�!�ė�
|
5
|
+
-�C!��
|
metadata
CHANGED
@@ -1,14 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aspera-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Laurent Martin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIEeDCCAuCgAwIBAgIBATANBgkqhkiG9w0BAQsFADA0MTIwMAYDVQQDDClsYXVy
|
14
|
+
ZW50Lm1hcnRpbi5hc3BlcmEvREM9ZnIvREM9aWJtL0RDPWNvbTAeFw0yMjA2MTUy
|
15
|
+
MzQ5NDdaFw0yMzA2MTUyMzQ5NDdaMDQxMjAwBgNVBAMMKWxhdXJlbnQubWFydGlu
|
16
|
+
LmFzcGVyYS9EQz1mci9EQz1pYm0vREM9Y29tMIIBojANBgkqhkiG9w0BAQEFAAOC
|
17
|
+
AY8AMIIBigKCAYEAn4dpdgpX97n2d+jsdQFBlvCLpWluceH+0bJ/UfGEm+3m5nwW
|
18
|
+
Y3TfdcxT45QytqA0cQXu8FeiybkZxSclTK0ozc2r3615y4ssHKI9D37YNTTISeq0
|
19
|
+
ifSYTgtHzqUXEe4TlHJz/babvi94pYFmA8nngJ2WBvMq7x8QPPPxaSi3Eb+e9yEK
|
20
|
+
AH4TiMFAZpJMs8Do8nzaOmWOHzftulLjkdWHmKoFD0S6Fo8hXgQU3XpiReCdKGz3
|
21
|
+
TtIUyMu1rrAewnu4k7ZpFJuNpRqrGQvQZqjCOEvKTyK1YJHiN/A+HbsCaVNcm3Gz
|
22
|
+
+r1O8KCy9tihjVVQvdBKVuhfNuGLiUJSxdvRT/T7RNTXVEFBk6OwVqE2uTTPYQ7X
|
23
|
+
wr/w3/W/BWp5MCbMFdg2GUIzsTaGkdEu5Jwr/8Gn8fUg3NAy4G5k8Il9GiXJ8Ep+
|
24
|
+
vbi508sTE+Fpl9B5FvE4Epez96BCBo52p8alymarH4SJq4Xh77u2XDYXwNhl7grZ
|
25
|
+
fESTXTzcNOLsohf/AgMBAAGjgZQwgZEwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
26
|
+
HQYDVR0OBBYEFL+Mx+Puf+5IF80dbzB4Pr9NFHQcMCsGA1UdEQQkMCKBIGxhdXJl
|
27
|
+
bnQubWFydGluLmFzcGVyYUBmci5pYm0uY29tMCsGA1UdEgQkMCKBIGxhdXJlbnQu
|
28
|
+
bWFydGluLmFzcGVyYUBmci5pYm0uY29tMA0GCSqGSIb3DQEBCwUAA4IBgQA/BaXr
|
29
|
+
ddNpCMj74ghL92WQjfyzADKIIfhS13QcF2lN6+DzkmQUnirwfdFtk+vJQWVtnyPy
|
30
|
+
gvt6hw9gv+6WbN7YXPMtoHPZesSsgAU6MFaw2x4DGdWH/seXawQaSSVkvNW+8SZl
|
31
|
+
P/8ZbO/X8mRjSa8uGZvQRngdb2ajS+uPto9YAJdilIeWsxs0oxnbJLgYRn8zP98X
|
32
|
+
OGwD0JctNQp7ZIpy164upiZdMnlmLICyzRu3CBuGfzYvD0RTuAfoVA6Pzmm60q42
|
33
|
+
+gbbl+Dt4NNKuyATdKpWOoSshPYWmW6QASbpiPjeHkD3bxq1IlE/Q2Y+AV4fAloy
|
34
|
+
mzeTfE4dv3AXnqn0VpZyiA9hdVsSyPProknfhFwZhjp6eMS38za2UXDJotfDZrBv
|
35
|
+
ZjkOWbUc1aLIsfaQFHWyNfisY9X2RgkFHjX0p5493wnoA7aWh52MUhc145npFh8z
|
36
|
+
v4P9xwkT02Shkert4B4iwNvVjoAUGk+J4090svZCroAyXBjon5LV7MJ4fyw=
|
37
|
+
-----END CERTIFICATE-----
|
38
|
+
date: 2022-09-14 00:00:00.000000000 Z
|
12
39
|
dependencies:
|
13
40
|
- !ruby/object:Gem::Dependency
|
14
41
|
name: execjs
|
@@ -24,20 +51,6 @@ dependencies:
|
|
24
51
|
- - "~>"
|
25
52
|
- !ruby/object:Gem::Version
|
26
53
|
version: '2.0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: grpc
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '1.0'
|
41
54
|
- !ruby/object:Gem::Dependency
|
42
55
|
name: jwt
|
43
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,20 +65,6 @@ dependencies:
|
|
52
65
|
- - "~>"
|
53
66
|
- !ruby/object:Gem::Version
|
54
67
|
version: '2.0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: mimemagic
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0.3'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0.3'
|
69
68
|
- !ruby/object:Gem::Dependency
|
70
69
|
name: net-smtp
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
@@ -226,6 +225,34 @@ dependencies:
|
|
226
225
|
- - "~>"
|
227
226
|
- !ruby/object:Gem::Version
|
228
227
|
version: '1.0'
|
228
|
+
- !ruby/object:Gem::Dependency
|
229
|
+
name: grpc
|
230
|
+
requirement: !ruby/object:Gem::Requirement
|
231
|
+
requirements:
|
232
|
+
- - "~>"
|
233
|
+
- !ruby/object:Gem::Version
|
234
|
+
version: '1.0'
|
235
|
+
type: :development
|
236
|
+
prerelease: false
|
237
|
+
version_requirements: !ruby/object:Gem::Requirement
|
238
|
+
requirements:
|
239
|
+
- - "~>"
|
240
|
+
- !ruby/object:Gem::Version
|
241
|
+
version: '1.0'
|
242
|
+
- !ruby/object:Gem::Dependency
|
243
|
+
name: mimemagic
|
244
|
+
requirement: !ruby/object:Gem::Requirement
|
245
|
+
requirements:
|
246
|
+
- - "~>"
|
247
|
+
- !ruby/object:Gem::Version
|
248
|
+
version: '0.3'
|
249
|
+
type: :development
|
250
|
+
prerelease: false
|
251
|
+
version_requirements: !ruby/object:Gem::Requirement
|
252
|
+
requirements:
|
253
|
+
- - "~>"
|
254
|
+
- !ruby/object:Gem::Version
|
255
|
+
version: '0.3'
|
229
256
|
- !ruby/object:Gem::Dependency
|
230
257
|
name: bundler
|
231
258
|
requirement: !ruby/object:Gem::Requirement
|
@@ -296,25 +323,81 @@ dependencies:
|
|
296
323
|
- - "~>"
|
297
324
|
- !ruby/object:Gem::Version
|
298
325
|
version: '1.4'
|
326
|
+
- !ruby/object:Gem::Dependency
|
327
|
+
name: rubocop-performance
|
328
|
+
requirement: !ruby/object:Gem::Requirement
|
329
|
+
requirements:
|
330
|
+
- - "~>"
|
331
|
+
- !ruby/object:Gem::Version
|
332
|
+
version: '1.10'
|
333
|
+
type: :development
|
334
|
+
prerelease: false
|
335
|
+
version_requirements: !ruby/object:Gem::Requirement
|
336
|
+
requirements:
|
337
|
+
- - "~>"
|
338
|
+
- !ruby/object:Gem::Version
|
339
|
+
version: '1.10'
|
340
|
+
- !ruby/object:Gem::Dependency
|
341
|
+
name: rubocop-shopify
|
342
|
+
requirement: !ruby/object:Gem::Requirement
|
343
|
+
requirements:
|
344
|
+
- - "~>"
|
345
|
+
- !ruby/object:Gem::Version
|
346
|
+
version: '2.0'
|
347
|
+
type: :development
|
348
|
+
prerelease: false
|
349
|
+
version_requirements: !ruby/object:Gem::Requirement
|
350
|
+
requirements:
|
351
|
+
- - "~>"
|
352
|
+
- !ruby/object:Gem::Version
|
353
|
+
version: '2.0'
|
354
|
+
- !ruby/object:Gem::Dependency
|
355
|
+
name: simplecov
|
356
|
+
requirement: !ruby/object:Gem::Requirement
|
357
|
+
requirements:
|
358
|
+
- - "~>"
|
359
|
+
- !ruby/object:Gem::Version
|
360
|
+
version: '0.18'
|
361
|
+
type: :development
|
362
|
+
prerelease: false
|
363
|
+
version_requirements: !ruby/object:Gem::Requirement
|
364
|
+
requirements:
|
365
|
+
- - "~>"
|
366
|
+
- !ruby/object:Gem::Version
|
367
|
+
version: '0.18'
|
368
|
+
- !ruby/object:Gem::Dependency
|
369
|
+
name: solargraph
|
370
|
+
requirement: !ruby/object:Gem::Requirement
|
371
|
+
requirements:
|
372
|
+
- - "~>"
|
373
|
+
- !ruby/object:Gem::Version
|
374
|
+
version: '0.44'
|
375
|
+
type: :development
|
376
|
+
prerelease: false
|
377
|
+
version_requirements: !ruby/object:Gem::Requirement
|
378
|
+
requirements:
|
379
|
+
- - "~>"
|
380
|
+
- !ruby/object:Gem::Version
|
381
|
+
version: '0.44'
|
299
382
|
description: Command line interface for IBM Aspera products
|
300
383
|
email:
|
301
384
|
- laurent.martin.aspera@fr.ibm.com
|
302
385
|
executables:
|
303
386
|
- ascli
|
304
387
|
- asession
|
305
|
-
- dascli
|
306
388
|
extensions: []
|
307
389
|
extra_rdoc_files: []
|
308
390
|
files:
|
309
391
|
- README.md
|
310
392
|
- bin/ascli
|
311
393
|
- bin/asession
|
312
|
-
- bin/dascli
|
313
394
|
- docs/test_env.conf
|
314
395
|
- examples/aoc.rb
|
396
|
+
- examples/dascli
|
315
397
|
- examples/faspex4.rb
|
398
|
+
- examples/node.rb
|
316
399
|
- examples/proxy.pac
|
317
|
-
- examples/
|
400
|
+
- examples/server.rb
|
318
401
|
- lib/aspera/aoc.rb
|
319
402
|
- lib/aspera/ascmd.rb
|
320
403
|
- lib/aspera/ats_api.rb
|
@@ -397,6 +480,7 @@ files:
|
|
397
480
|
- lib/aspera/rest_call_error.rb
|
398
481
|
- lib/aspera/rest_error_analyzer.rb
|
399
482
|
- lib/aspera/rest_errors_aspera.rb
|
483
|
+
- lib/aspera/secret_hider.rb
|
400
484
|
- lib/aspera/ssh.rb
|
401
485
|
- lib/aspera/sync.rb
|
402
486
|
- lib/aspera/temp_file_manager.rb
|
@@ -429,7 +513,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
429
513
|
version: '0'
|
430
514
|
requirements:
|
431
515
|
- Read the manual for any requirement
|
432
|
-
rubygems_version: 3.
|
516
|
+
rubygems_version: 3.1.6
|
433
517
|
signing_key:
|
434
518
|
specification_version: 4
|
435
519
|
summary: 'Execute actions using command line on IBM Aspera Server products: Aspera
|
metadata.gz.sig
ADDED
Binary file
|
data/bin/dascli
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
tag=martinlaurent/ascli:latest
|
3
|
-
case "$1" in install)
|
4
|
-
docker pull $tag
|
5
|
-
exit 0
|
6
|
-
esac
|
7
|
-
conf_host=${ASCLI_HOME:-$HOME/.aspera/ascli}
|
8
|
-
if test ! -d $conf_host;then
|
9
|
-
echo creating foder: $conf_host
|
10
|
-
mkdir -p $conf_host
|
11
|
-
fi
|
12
|
-
conf_img=/usr/src/app/config
|
13
|
-
exec docker run --tty --interactive --rm --env ASCLI_HOME="$conf_img" --volume "$conf_host:$conf_img" $tag ascli "$@"
|