evervault 1.3.0 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/evervault/http/request_intercept.rb +11 -5
- data/lib/evervault/version.rb +1 -1
- data/lib/evervault.rb +14 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2df77a79ce53a19ab616f270d0cef3fd7639e23bf4b25a2cd75bb5b70e95dbc4
|
4
|
+
data.tar.gz: 71a830838eaa042e50299b827826327a7b6ed48b3a747ab395746afce754d7e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1cd19d8dc2d3c09a8a10958119bb788082b809dd50aec730562116b2146f1b84d33d0e234bd86529ff982d3148749a428041c0e43ea35da733b4a32eb4f922b
|
7
|
+
data.tar.gz: 17e6c1952d3af892c05a90b2165ee71a8849ae0cea637635c0914f23335a28b450ba9c326e0b9b60f325cd9ee50c5333e19892ec11195a30e35370972b19f222
|
data/.gitignore
CHANGED
@@ -46,7 +46,7 @@ module NetHTTPOverride
|
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
|
-
def
|
49
|
+
def connect_with_intercept
|
50
50
|
if NetHTTPOverride.should_decrypt(conn_address)
|
51
51
|
@cert_store = OpenSSL::X509::Store.new
|
52
52
|
@cert_store.add_cert(@@cert)
|
@@ -54,19 +54,25 @@ module NetHTTPOverride
|
|
54
54
|
@proxy_address = @@relay_url
|
55
55
|
@proxy_port = @@relay_port
|
56
56
|
end
|
57
|
-
|
57
|
+
connect_without_intercept
|
58
58
|
end
|
59
59
|
|
60
|
-
def
|
60
|
+
def request_with_intercept(req, body = nil, &block)
|
61
61
|
should_decrypt = NetHTTPOverride.should_decrypt(@address)
|
62
62
|
if should_decrypt
|
63
63
|
req["Proxy-Authorization"] = @@api_key
|
64
64
|
end
|
65
|
-
|
65
|
+
request_without_intercept(req, body, &block)
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
-
Net::HTTP.
|
69
|
+
Net::HTTP.class_eval do
|
70
|
+
include NetHTTPOverride
|
71
|
+
alias_method :request_without_intercept, :request
|
72
|
+
alias_method :request, :request_with_intercept
|
73
|
+
alias_method :connect_without_intercept, :connect
|
74
|
+
alias_method :connect, :connect_with_intercept
|
75
|
+
end
|
70
76
|
|
71
77
|
module Evervault
|
72
78
|
module Http
|
data/lib/evervault/version.rb
CHANGED
data/lib/evervault.rb
CHANGED
@@ -6,8 +6,20 @@ module Evervault
|
|
6
6
|
class << self
|
7
7
|
attr_accessor :api_key
|
8
8
|
|
9
|
-
def
|
10
|
-
client.
|
9
|
+
def encrypt(data)
|
10
|
+
client.encrypt(data)
|
11
|
+
end
|
12
|
+
|
13
|
+
def run(function_name, encrypted_data, options = {})
|
14
|
+
client.run(function_name, encrypted_data, options)
|
15
|
+
end
|
16
|
+
|
17
|
+
def enable_outbound_relay(decryption_domains = nil)
|
18
|
+
client.enable_outbound_relay(decryption_domains)
|
19
|
+
end
|
20
|
+
|
21
|
+
def create_run_token(function_name, data = {})
|
22
|
+
client.create_run_token(function_name, data)
|
11
23
|
end
|
12
24
|
|
13
25
|
private def client
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evervault
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonny O'Mahony
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|