vault-key 0.0.3 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/native/{vault-key.linux.h → vault.darwin.h} +0 -0
- data/lib/native/{vault-key.darwin.so → vault.darwin.so} +0 -0
- data/lib/native/{vault-key.darwin.h → vault.linux.h} +5 -1
- data/lib/native/{vault-key.linux.so → vault.linux.so} +0 -0
- data/lib/vault.rb +19 -0
- metadata +21 -22
- data/lib/vault-key.rb +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 81e8dff7f65f644fb23d87bf3851c7d4709fcffe9e5f9404391de23aad28f27c
|
4
|
+
data.tar.gz: 486837b1e0ea4ccf7e9152e520a7fde301dbca81626dc7db69617dddb5fe30ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf804cfbf6f02ec86d04224523de31c872bd0eb70e0d9ae1774d21be3da83f5aae5b18d09e1e47ff3dbc7b1482a36deb1d337b91fd964d3aeafbfdeebf7e7cdf
|
7
|
+
data.tar.gz: '082242c252dc9013bd391aea756c2ddb58c96d4a9907cf9d020895a0879a22e7537c2c2c2a23a316c391b8226172126c100da9dab6e4c0ed76e24bdabeb65cf3'
|
File without changes
|
Binary file
|
@@ -3,14 +3,16 @@
|
|
3
3
|
/* package command-line-arguments */
|
4
4
|
|
5
5
|
|
6
|
-
#line 1 "cgo-builtin-prolog"
|
6
|
+
#line 1 "cgo-builtin-export-prolog"
|
7
7
|
|
8
8
|
#include <stddef.h> /* for ptrdiff_t below */
|
9
9
|
|
10
10
|
#ifndef GO_CGO_EXPORT_PROLOGUE_H
|
11
11
|
#define GO_CGO_EXPORT_PROLOGUE_H
|
12
12
|
|
13
|
+
#ifndef GO_CGO_GOSTRING_TYPEDEF
|
13
14
|
typedef struct { const char *p; ptrdiff_t n; } _GoString_;
|
15
|
+
#endif
|
14
16
|
|
15
17
|
#endif
|
16
18
|
|
@@ -50,7 +52,9 @@ typedef double _Complex GoComplex128;
|
|
50
52
|
*/
|
51
53
|
typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1];
|
52
54
|
|
55
|
+
#ifndef GO_CGO_GOSTRING_TYPEDEF
|
53
56
|
typedef _GoString_ GoString;
|
57
|
+
#endif
|
54
58
|
typedef void *GoMap;
|
55
59
|
typedef void *GoChan;
|
56
60
|
typedef struct { void *t; void *v; } GoInterface;
|
Binary file
|
data/lib/vault.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'ffi'
|
2
|
+
require 'json'
|
3
|
+
require 'os'
|
4
|
+
|
5
|
+
module VaultNative
|
6
|
+
extend FFI::Library
|
7
|
+
|
8
|
+
sharedObjectPath = OS.linux? ? "./native/vault.linux.so" : "./native/vault.darwin.so"
|
9
|
+
|
10
|
+
ffi_lib File.expand_path(sharedObjectPath, File.dirname(__FILE__))
|
11
|
+
attach_function :GetSecrets, [:string], :string
|
12
|
+
end
|
13
|
+
|
14
|
+
class Vault
|
15
|
+
def self.getSecrets(secrets)
|
16
|
+
secretsData = VaultNative.GetSecrets(JSON.generate(secrets))
|
17
|
+
JSON.parse(secretsData)
|
18
|
+
end
|
19
|
+
end
|
metadata
CHANGED
@@ -1,59 +1,59 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vault-key
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TeamSnap SREs
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: '1.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: '1.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: os
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.0
|
33
|
+
version: '1.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.0
|
40
|
+
version: '1.0'
|
41
41
|
description: A gem to integrate Vault with GCP auth
|
42
|
-
email:
|
42
|
+
email: ''
|
43
43
|
executables: []
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files: []
|
46
46
|
files:
|
47
|
-
- lib/native/vault
|
48
|
-
- lib/native/vault
|
49
|
-
- lib/native/vault
|
50
|
-
- lib/native/vault
|
51
|
-
- lib/vault
|
52
|
-
homepage:
|
47
|
+
- lib/native/vault.darwin.h
|
48
|
+
- lib/native/vault.darwin.so
|
49
|
+
- lib/native/vault.linux.h
|
50
|
+
- lib/native/vault.linux.so
|
51
|
+
- lib/vault.rb
|
52
|
+
homepage: ''
|
53
53
|
licenses:
|
54
54
|
- MIT
|
55
55
|
metadata: {}
|
56
|
-
post_install_message:
|
56
|
+
post_install_message:
|
57
57
|
rdoc_options: []
|
58
58
|
require_paths:
|
59
59
|
- lib
|
@@ -68,9 +68,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
requirements: []
|
71
|
-
|
72
|
-
|
73
|
-
signing_key:
|
71
|
+
rubygems_version: 3.0.3
|
72
|
+
signing_key:
|
74
73
|
specification_version: 4
|
75
74
|
summary: Vault with GCP auth
|
76
75
|
test_files: []
|
data/lib/vault-key.rb
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
require 'ffi'
|
2
|
-
require 'json'
|
3
|
-
require 'OS'
|
4
|
-
|
5
|
-
module VaultNative
|
6
|
-
extend FFI::Library
|
7
|
-
|
8
|
-
sharedObjectPath = OS.linux? ? "./native/vault-key.linux.so" : "./native/vault-key.darwin.so"
|
9
|
-
|
10
|
-
ffi_lib File.expand_path(sharedObjectPath, File.dirname(__FILE__))
|
11
|
-
attach_function :GetSecrets, [:string], :string
|
12
|
-
end
|
13
|
-
|
14
|
-
class VaultKey
|
15
|
-
def self.getSecrets(secrets)
|
16
|
-
secretsData = VaultNative.GetSecrets(JSON.generate(secrets))
|
17
|
-
JSON.parse(secretsData)
|
18
|
-
end
|
19
|
-
end
|