multiwoven-integrations 0.3.3 → 0.3.4
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cb9f117bf574599b93ccfd2238f1629166c473184837ec48a16a447650b1dc54
|
|
4
|
+
data.tar.gz: efa39262c596d2b50bbd04d2d8a9d98889b708a9e2859e6ec3801b2c6eb79169
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 959b53319cb4581fd8aeb2731891f967031a23096c42e1e855fa79802bf81e799a746ba62c1c08f20484c3a443418d2175e1d9218abd28939eceaf89b6f87964
|
|
7
|
+
data.tar.gz: 22c706c8d47d9803cbdee5fa91a8f6862f7d0efb11c13466e2b0b0e07753a5e784e43443487a939a05f0cee0457bf310d12ce274e24ad322e5aa2cf8767c05ea
|
|
@@ -34,6 +34,9 @@ module Multiwoven
|
|
|
34
34
|
AIRTABLE_BASES_ENDPOINT = "https://api.airtable.com/v0/meta/bases"
|
|
35
35
|
AIRTABLE_GET_BASE_SCHEMA_ENDPOINT = "https://api.airtable.com/v0/meta/bases/{baseId}/tables"
|
|
36
36
|
|
|
37
|
+
AWS_ACCESS_KEY_ID = ENV["AWS_ACCESS_KEY_ID"]
|
|
38
|
+
AWS_SECRET_ACCESS_KEY = ENV["AWS_SECRET_ACCESS_KEY"]
|
|
39
|
+
|
|
37
40
|
# HTTP
|
|
38
41
|
HTTP_GET = "GET"
|
|
39
42
|
HTTP_POST = "POST"
|
|
@@ -50,15 +50,17 @@ module Multiwoven::Integrations::Source
|
|
|
50
50
|
private
|
|
51
51
|
|
|
52
52
|
def get_auth_data(connection_config)
|
|
53
|
-
session = @session_name
|
|
53
|
+
session = @session_name.gsub(/\s+/, "-")
|
|
54
54
|
@session_name = ""
|
|
55
55
|
if connection_config[:auth_type] == "user"
|
|
56
56
|
Aws::Credentials.new(connection_config[:access_id], connection_config[:secret_access])
|
|
57
57
|
elsif connection_config[:auth_type] == "role"
|
|
58
|
-
|
|
58
|
+
credentials = Aws::Credentials.new(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
|
|
59
|
+
sts_client = Aws::STS::Client.new(region: connection_config[:region], credentials: credentials)
|
|
59
60
|
resp = sts_client.assume_role({
|
|
60
61
|
role_arn: connection_config[:arn],
|
|
61
|
-
role_session_name: session
|
|
62
|
+
role_session_name: session,
|
|
63
|
+
external_id: connection_config[:external_id]
|
|
62
64
|
})
|
|
63
65
|
Aws::Credentials.new(
|
|
64
66
|
resp.credentials.access_key_id,
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"region",
|
|
30
30
|
"bucket",
|
|
31
31
|
"arn",
|
|
32
|
+
"external_id",
|
|
32
33
|
"file_type"
|
|
33
34
|
]
|
|
34
35
|
},
|
|
@@ -53,16 +54,22 @@
|
|
|
53
54
|
"title": "IAM Role ARN",
|
|
54
55
|
"order": 1
|
|
55
56
|
},
|
|
57
|
+
"external_id": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"title": "External Id",
|
|
60
|
+
"description": "Unique ID that allows handshake between AWS accounts.",
|
|
61
|
+
"order": 2
|
|
62
|
+
},
|
|
56
63
|
"access_id": {
|
|
57
64
|
"type": "string",
|
|
58
65
|
"title": "Access Id",
|
|
59
|
-
"order":
|
|
66
|
+
"order": 3
|
|
60
67
|
},
|
|
61
68
|
"secret_access": {
|
|
62
69
|
"type": "string",
|
|
63
70
|
"title": "Secret Access",
|
|
64
71
|
"multiwoven_secret": true,
|
|
65
|
-
"order":
|
|
72
|
+
"order": 4
|
|
66
73
|
},
|
|
67
74
|
"region": {
|
|
68
75
|
"description": "AWS region",
|
|
@@ -71,13 +78,13 @@
|
|
|
71
78
|
],
|
|
72
79
|
"type": "string",
|
|
73
80
|
"title": "Region",
|
|
74
|
-
"order":
|
|
81
|
+
"order": 5
|
|
75
82
|
},
|
|
76
83
|
"bucket": {
|
|
77
84
|
"description": "Bucket Name",
|
|
78
85
|
"type": "string",
|
|
79
86
|
"title": "Bucket",
|
|
80
|
-
"order":
|
|
87
|
+
"order": 6
|
|
81
88
|
},
|
|
82
89
|
"path": {
|
|
83
90
|
"description": "Path to csv or parquet files",
|
|
@@ -86,7 +93,7 @@
|
|
|
86
93
|
],
|
|
87
94
|
"type": "string",
|
|
88
95
|
"title": "Path",
|
|
89
|
-
"order":
|
|
96
|
+
"order": 7
|
|
90
97
|
},
|
|
91
98
|
"file_type": {
|
|
92
99
|
"description": "The type of file to read",
|
|
@@ -96,7 +103,7 @@
|
|
|
96
103
|
"csv",
|
|
97
104
|
"parquet"
|
|
98
105
|
],
|
|
99
|
-
"order":
|
|
106
|
+
"order": 8
|
|
100
107
|
}
|
|
101
108
|
}
|
|
102
109
|
}
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: multiwoven-integrations
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Subin T P
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-07-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|