infisical-sdk 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Rakefile +11 -0
- data/Steepfile +46 -0
- data/infisical-sdk.gemspec +48 -0
- data/lib/clients/auth.rb +100 -0
- data/lib/clients/encryption.rb +90 -0
- data/lib/clients/secrets.rb +169 -0
- data/lib/command_runner.rb +16 -0
- data/lib/infisical-sdk.rb +44 -0
- data/lib/infisical_error.rb +10 -0
- data/lib/infisical_lib.rb +44 -0
- data/lib/linux-arm64/libinfisical_c.so +0 -0
- data/lib/linux-x64/libinfisical_c.so +0 -0
- data/lib/macos-arm64/libinfisical_c.dylib +0 -0
- data/lib/macos-x64/libinfisical_c.dylib +0 -0
- data/lib/schemas.rb +1717 -0
- data/lib/version.rb +5 -0
- data/lib/windows-x64/infisical_c.dll +0 -0
- data/sig/infisical_sdk/auth_client.rbs +20 -0
- data/sig/infisical_sdk/command_runner.rbs +10 -0
- data/sig/infisical_sdk/encryption_client.rbs +15 -0
- data/sig/infisical_sdk/infisical_client.rbs +30 -0
- data/sig/infisical_sdk/infisical_lib.rbs +7 -0
- data/sig/infisical_sdk/sdk.rbs +3 -0
- data/sig/infisical_sdk/secrets_client.rbs +55 -0
- data/sig/infisical_sdk/structs.rbs +37 -0
- metadata +154 -0
data/lib/version.rb
ADDED
Binary file
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module InfisicalSDK
|
2
|
+
class AuthClient
|
3
|
+
@command_runner: untyped
|
4
|
+
|
5
|
+
def initialize: (CommandRunner) -> void
|
6
|
+
|
7
|
+
def universal_auth: (client_id: String, client_secret: String) -> MachineIdentityLogin
|
8
|
+
def kubernetes_auth: (identity_id: String, service_account_token_path: String?) -> MachineIdentityLogin
|
9
|
+
def azure_auth: (identity_id: String) -> MachineIdentityLogin
|
10
|
+
def gcp_id_token_auth: (identity_id: String) -> MachineIdentityLogin
|
11
|
+
def gcp_iam_auth: (identity_id: String, service_account_key_file_path: String) -> MachineIdentityLogin
|
12
|
+
def aws_iam_auth: (identity_id: String) -> MachineIdentityLogin
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def error_handler: (untyped) -> void
|
17
|
+
def handle_auth_response: (untyped) -> MachineIdentityLogin
|
18
|
+
def run_command: (untyped) -> untyped
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module InfisicalSDK
|
2
|
+
class EncryptionClient
|
3
|
+
@command_runner: CommandRunner
|
4
|
+
def initialize: (CommandRunner) -> void
|
5
|
+
|
6
|
+
def create_symmetric_key: -> String
|
7
|
+
def decrypt_symmetric: (ciphertext: String, iv: String, tag: String, key: String) -> String
|
8
|
+
def encrypt_symmetric: (data: String, key: String) -> EncryptedData
|
9
|
+
|
10
|
+
private
|
11
|
+
def error_handler: (untyped) -> void
|
12
|
+
def run_command: (untyped) -> untyped
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module InfisicalSDK
|
2
|
+
class InfisicalClient
|
3
|
+
@handle: untyped
|
4
|
+
@infisical: InfisicalModule
|
5
|
+
@auth: AuthClient
|
6
|
+
@secrets: SecretsClient
|
7
|
+
@command_runner: CommandRunner
|
8
|
+
|
9
|
+
attr_reader command_runner: CommandRunner
|
10
|
+
attr_reader infisical: InfisicalModule
|
11
|
+
|
12
|
+
attr_reader auth: AuthClient
|
13
|
+
attr_reader encryption: EncryptionClient
|
14
|
+
attr_reader secrets: SecretsClient
|
15
|
+
|
16
|
+
def initialize: (String?, Integer?) -> untyped
|
17
|
+
|
18
|
+
def free_mem: -> void
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
module InfisicalSDK
|
23
|
+
class InfisicalModule < Module
|
24
|
+
|
25
|
+
def free_mem: (untyped) -> void
|
26
|
+
def run_command: (untyped, untyped) -> String
|
27
|
+
def init: (untyped) -> untyped
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module InfisicalSDK
|
2
|
+
class SecretsClient
|
3
|
+
@command_runner: CommandRunner
|
4
|
+
def initialize: (CommandRunner) -> void
|
5
|
+
|
6
|
+
def get: (
|
7
|
+
secret_name: String,
|
8
|
+
project_id: String,
|
9
|
+
environment: String,
|
10
|
+
path: String?,
|
11
|
+
include_imports: bool?,
|
12
|
+
type: String?
|
13
|
+
) -> InfisicalSecret
|
14
|
+
|
15
|
+
def list: (
|
16
|
+
project_id: String,
|
17
|
+
environment: String,
|
18
|
+
path: String?,
|
19
|
+
attach_to_process_env: bool?,
|
20
|
+
expand_secret_references: bool?,
|
21
|
+
recursive: bool?,
|
22
|
+
include_imports: bool?,
|
23
|
+
) -> Array[InfisicalSecret]
|
24
|
+
def update: (
|
25
|
+
secret_name: String,
|
26
|
+
secret_value: String,
|
27
|
+
project_id: String,
|
28
|
+
environment: String,
|
29
|
+
path: String?,
|
30
|
+
skip_multiline_encoding: bool?,
|
31
|
+
type: String?
|
32
|
+
) -> InfisicalSecret
|
33
|
+
def create: (
|
34
|
+
secret_name: String,
|
35
|
+
secret_value: String,
|
36
|
+
project_id: String,
|
37
|
+
environment: String,
|
38
|
+
secret_comment: String?,
|
39
|
+
skip_multiline_encoding: bool?,
|
40
|
+
type: String?,
|
41
|
+
path: String?
|
42
|
+
) -> InfisicalSecret
|
43
|
+
def delete: (
|
44
|
+
secret_name: String,
|
45
|
+
project_id: String,
|
46
|
+
environment: String,
|
47
|
+
path: String?,
|
48
|
+
type: String?,
|
49
|
+
) -> InfisicalSecret
|
50
|
+
|
51
|
+
private
|
52
|
+
def error_handler: (untyped) -> void
|
53
|
+
def run_command: (untyped) -> untyped
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
|
2
|
+
class InfisicalSecret
|
3
|
+
attr_reader environment: String?
|
4
|
+
attr_reader isFallback: bool?
|
5
|
+
attr_reader secretComment: String
|
6
|
+
attr_reader secretKey: String
|
7
|
+
attr_reader secretPath: String?
|
8
|
+
attr_reader secretValue: String
|
9
|
+
attr_reader type: String
|
10
|
+
attr_reader version: Integer
|
11
|
+
attr_reader workspace: String
|
12
|
+
|
13
|
+
def initialize: (
|
14
|
+
environment: String,
|
15
|
+
secretComment: String,
|
16
|
+
secretKey: String,
|
17
|
+
secretValue: String,
|
18
|
+
type: String,
|
19
|
+
version: Integer,
|
20
|
+
workspace: String,
|
21
|
+
?isFallback: bool?,
|
22
|
+
?secretPath: String?
|
23
|
+
) -> void
|
24
|
+
end
|
25
|
+
|
26
|
+
class MachineIdentityLogin
|
27
|
+
attr_reader accessToken: String
|
28
|
+
attr_reader accessTokenMaxTTL: Integer
|
29
|
+
attr_reader expiresIn: Integer
|
30
|
+
attr_reader tokenType: String
|
31
|
+
end
|
32
|
+
|
33
|
+
class EncryptedData
|
34
|
+
attr_reader ciphertext: String
|
35
|
+
attr_reader iv: String
|
36
|
+
attr_reader tag: String
|
37
|
+
end
|
metadata
ADDED
@@ -0,0 +1,154 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: infisical-sdk
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Infisical Inc.
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-07-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: dry-struct
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: dry-types
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.7'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.7'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: ffi
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.15'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.15'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: json
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.6'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.6'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '13.0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '13.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.21'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.21'
|
97
|
+
description: The official Infisical Ruby SDK.
|
98
|
+
email:
|
99
|
+
- team@infisical.com
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- Rakefile
|
105
|
+
- Steepfile
|
106
|
+
- infisical-sdk.gemspec
|
107
|
+
- lib/clients/auth.rb
|
108
|
+
- lib/clients/encryption.rb
|
109
|
+
- lib/clients/secrets.rb
|
110
|
+
- lib/command_runner.rb
|
111
|
+
- lib/infisical-sdk.rb
|
112
|
+
- lib/infisical_error.rb
|
113
|
+
- lib/infisical_lib.rb
|
114
|
+
- lib/linux-arm64/libinfisical_c.so
|
115
|
+
- lib/linux-x64/libinfisical_c.so
|
116
|
+
- lib/macos-arm64/libinfisical_c.dylib
|
117
|
+
- lib/macos-x64/libinfisical_c.dylib
|
118
|
+
- lib/schemas.rb
|
119
|
+
- lib/version.rb
|
120
|
+
- lib/windows-x64/infisical_c.dll
|
121
|
+
- sig/infisical_sdk/auth_client.rbs
|
122
|
+
- sig/infisical_sdk/command_runner.rbs
|
123
|
+
- sig/infisical_sdk/encryption_client.rbs
|
124
|
+
- sig/infisical_sdk/infisical_client.rbs
|
125
|
+
- sig/infisical_sdk/infisical_lib.rbs
|
126
|
+
- sig/infisical_sdk/sdk.rbs
|
127
|
+
- sig/infisical_sdk/secrets_client.rbs
|
128
|
+
- sig/infisical_sdk/structs.rbs
|
129
|
+
homepage: https://infisical.com
|
130
|
+
licenses: []
|
131
|
+
metadata:
|
132
|
+
homepage_uri: https://infisical.com
|
133
|
+
source_code_uri: https://github.com/infisical/sdk
|
134
|
+
changelog_uri: https://infisical.com/docs/changelog/overview
|
135
|
+
post_install_message:
|
136
|
+
rdoc_options: []
|
137
|
+
require_paths:
|
138
|
+
- lib
|
139
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '2.7'
|
144
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
|
+
requirements:
|
146
|
+
- - ">="
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '0'
|
149
|
+
requirements: []
|
150
|
+
rubygems_version: 3.4.19
|
151
|
+
signing_key:
|
152
|
+
specification_version: 4
|
153
|
+
summary: Ruby SDK for interacting with the Infisical platform.
|
154
|
+
test_files: []
|