gcp-vault 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 41d84907841ef1e9720d48150d42043be4d90caf
4
+ data.tar.gz: ccd4cd851e8166e4c2a663c4a89decf39890f746
5
+ SHA512:
6
+ metadata.gz: 6fdcb2ad4021da1f6fb06ef2b10b45b45a3c45ecc633d9c3eea1ef13ba9f6816ae338aa292e4f24c0c945eca08974eb6bf364cb59defc82f3e130dc5fbe8213e
7
+ data.tar.gz: '09199c13acd19508d635f8cb9ead1d032b6184762d3d3735f861e6e2d1ff7834f1369f56bad421255e3161f0fac9fe72adba3af1a39ec9fc279cf65c160b5291'
@@ -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 GcpVault
15
+ def self.getSecrets(secrets)
16
+ secretsData = VaultNative.GetSecrets(JSON.generate(secrets))
17
+ JSON.parse(secretsData)
18
+ end
19
+ end
@@ -0,0 +1,76 @@
1
+ /* Code generated by cmd/cgo; DO NOT EDIT. */
2
+
3
+ /* package command-line-arguments */
4
+
5
+
6
+ #line 1 "cgo-builtin-export-prolog"
7
+
8
+ #include <stddef.h> /* for ptrdiff_t below */
9
+
10
+ #ifndef GO_CGO_EXPORT_PROLOGUE_H
11
+ #define GO_CGO_EXPORT_PROLOGUE_H
12
+
13
+ #ifndef GO_CGO_GOSTRING_TYPEDEF
14
+ typedef struct { const char *p; ptrdiff_t n; } _GoString_;
15
+ #endif
16
+
17
+ #endif
18
+
19
+ /* Start of preamble from import "C" comments. */
20
+
21
+
22
+
23
+
24
+ /* End of preamble from import "C" comments. */
25
+
26
+
27
+ /* Start of boilerplate cgo prologue. */
28
+ #line 1 "cgo-gcc-export-header-prolog"
29
+
30
+ #ifndef GO_CGO_PROLOGUE_H
31
+ #define GO_CGO_PROLOGUE_H
32
+
33
+ typedef signed char GoInt8;
34
+ typedef unsigned char GoUint8;
35
+ typedef short GoInt16;
36
+ typedef unsigned short GoUint16;
37
+ typedef int GoInt32;
38
+ typedef unsigned int GoUint32;
39
+ typedef long long GoInt64;
40
+ typedef unsigned long long GoUint64;
41
+ typedef GoInt64 GoInt;
42
+ typedef GoUint64 GoUint;
43
+ typedef __SIZE_TYPE__ GoUintptr;
44
+ typedef float GoFloat32;
45
+ typedef double GoFloat64;
46
+ typedef float _Complex GoComplex64;
47
+ typedef double _Complex GoComplex128;
48
+
49
+ /*
50
+ static assertion to make sure the file is being used on architecture
51
+ at least with matching size of GoInt.
52
+ */
53
+ typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1];
54
+
55
+ #ifndef GO_CGO_GOSTRING_TYPEDEF
56
+ typedef _GoString_ GoString;
57
+ #endif
58
+ typedef void *GoMap;
59
+ typedef void *GoChan;
60
+ typedef struct { void *t; void *v; } GoInterface;
61
+ typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
62
+
63
+ #endif
64
+
65
+ /* End of boilerplate cgo prologue. */
66
+
67
+ #ifdef __cplusplus
68
+ extern "C" {
69
+ #endif
70
+
71
+
72
+ extern char* GetSecrets(char* p0);
73
+
74
+ #ifdef __cplusplus
75
+ }
76
+ #endif
@@ -0,0 +1,76 @@
1
+ /* Code generated by cmd/cgo; DO NOT EDIT. */
2
+
3
+ /* package command-line-arguments */
4
+
5
+
6
+ #line 1 "cgo-builtin-export-prolog"
7
+
8
+ #include <stddef.h> /* for ptrdiff_t below */
9
+
10
+ #ifndef GO_CGO_EXPORT_PROLOGUE_H
11
+ #define GO_CGO_EXPORT_PROLOGUE_H
12
+
13
+ #ifndef GO_CGO_GOSTRING_TYPEDEF
14
+ typedef struct { const char *p; ptrdiff_t n; } _GoString_;
15
+ #endif
16
+
17
+ #endif
18
+
19
+ /* Start of preamble from import "C" comments. */
20
+
21
+
22
+
23
+
24
+ /* End of preamble from import "C" comments. */
25
+
26
+
27
+ /* Start of boilerplate cgo prologue. */
28
+ #line 1 "cgo-gcc-export-header-prolog"
29
+
30
+ #ifndef GO_CGO_PROLOGUE_H
31
+ #define GO_CGO_PROLOGUE_H
32
+
33
+ typedef signed char GoInt8;
34
+ typedef unsigned char GoUint8;
35
+ typedef short GoInt16;
36
+ typedef unsigned short GoUint16;
37
+ typedef int GoInt32;
38
+ typedef unsigned int GoUint32;
39
+ typedef long long GoInt64;
40
+ typedef unsigned long long GoUint64;
41
+ typedef GoInt64 GoInt;
42
+ typedef GoUint64 GoUint;
43
+ typedef __SIZE_TYPE__ GoUintptr;
44
+ typedef float GoFloat32;
45
+ typedef double GoFloat64;
46
+ typedef float _Complex GoComplex64;
47
+ typedef double _Complex GoComplex128;
48
+
49
+ /*
50
+ static assertion to make sure the file is being used on architecture
51
+ at least with matching size of GoInt.
52
+ */
53
+ typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1];
54
+
55
+ #ifndef GO_CGO_GOSTRING_TYPEDEF
56
+ typedef _GoString_ GoString;
57
+ #endif
58
+ typedef void *GoMap;
59
+ typedef void *GoChan;
60
+ typedef struct { void *t; void *v; } GoInterface;
61
+ typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
62
+
63
+ #endif
64
+
65
+ /* End of boilerplate cgo prologue. */
66
+
67
+ #ifdef __cplusplus
68
+ extern "C" {
69
+ #endif
70
+
71
+
72
+ extern char* GetSecrets(char* p0);
73
+
74
+ #ifdef __cplusplus
75
+ }
76
+ #endif
metadata ADDED
@@ -0,0 +1,74 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gcp-vault
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - TeamSnap SREs
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-10-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ffi
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 1.11.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 1.11.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: os
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 1.0.1
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.1
41
+ description: A gem to integrate Vault with GCP auth
42
+ email: sre@teamsnap.com
43
+ executables: []
44
+ extensions: []
45
+ extra_rdoc_files: []
46
+ files:
47
+ - lib/gcp-vault.rb
48
+ - lib/native/gcp-vault.darwin.h
49
+ - lib/native/gcp-vault.linux.h
50
+ homepage: https://rubygems.org/gems/gcp-vault
51
+ licenses:
52
+ - MIT
53
+ metadata: {}
54
+ post_install_message:
55
+ rdoc_options: []
56
+ require_paths:
57
+ - lib
58
+ required_ruby_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ required_rubygems_version: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ requirements: []
69
+ rubyforge_project:
70
+ rubygems_version: 2.5.2.3
71
+ signing_key:
72
+ specification_version: 4
73
+ summary: Vault with GCP auth
74
+ test_files: []