kitchen-oci 3.0.0 → 3.1.0
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: 5bfc39bf616e0eefecc820abb06a06b61ed2b90e96e90434c73be1d6604c7372
|
|
4
|
+
data.tar.gz: df5a102d375fa58f09e7083957deb3e97ef6ded000d305b7eae03e868a968280
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6841666c45f23dce74e419dd4eb14bf28b9964988d37addb43db84b1a41483b01c16f5601c04d8b86ae83f15e0ebc3b8da62ffc642b17f1b986921a5d1325b37
|
|
7
|
+
data.tar.gz: 5d2269712aa89d1be30882cbd2087ab7fcca506bde7433c2fef949ef6d2867dc4bf17f214073a344ac1a652b6a8e0bba41caefd14964b1d631dc83223555861d
|
|
@@ -92,15 +92,28 @@ module Kitchen
|
|
|
92
92
|
|
|
93
93
|
# Determines the signing method if one is specified.
|
|
94
94
|
#
|
|
95
|
+
# Security token (session) authentication is used when <b>use_token_auth</b> is set explicitly or
|
|
96
|
+
# when the selected OCI profile contains a <b>security_token_file</b>. The latter allows sessions
|
|
97
|
+
# created by <tt>oci session authenticate</tt> (RPST) to be detected automatically.
|
|
98
|
+
#
|
|
95
99
|
# @return [OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner, OCI::Auth::Signers::SecurityTokenSigner] an instance of the specified token signer.
|
|
96
100
|
def signer
|
|
97
101
|
if config[:use_instance_principals]
|
|
98
102
|
OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner.new
|
|
99
|
-
elsif config[:use_token_auth]
|
|
103
|
+
elsif config[:use_token_auth] || security_token_file?
|
|
100
104
|
token_signer
|
|
101
105
|
end
|
|
102
106
|
end
|
|
103
107
|
|
|
108
|
+
# Whether the loaded OCI config contains a security_token_file pointing at an existing token.
|
|
109
|
+
#
|
|
110
|
+
# @return [Boolean]
|
|
111
|
+
def security_token_file?
|
|
112
|
+
oci_config.respond_to?(:security_token_file) &&
|
|
113
|
+
!oci_config.security_token_file.to_s.empty? &&
|
|
114
|
+
File.exist?(oci_config.security_token_file)
|
|
115
|
+
end
|
|
116
|
+
|
|
104
117
|
# Creates the token signer with a provided key.
|
|
105
118
|
#
|
|
106
119
|
# @return [OCI::Auth::Signers::SecurityTokenSigner]
|
|
@@ -40,8 +40,10 @@ module Kitchen
|
|
|
40
40
|
#
|
|
41
41
|
# @return [OCI::Config]
|
|
42
42
|
def oci_config
|
|
43
|
-
# OCI::Config is missing this
|
|
44
|
-
|
|
43
|
+
# OCI::Config is missing this attribute. It is always added so that a security_token_file
|
|
44
|
+
# present in the selected profile is loaded, which enables auto-detection of session
|
|
45
|
+
# (RPST) token authentication even when use_token_auth is not explicitly set.
|
|
46
|
+
OCI::Config.class_eval { attr_accessor :security_token_file } unless OCI::Config.instance_methods.include?(:security_token_file)
|
|
45
47
|
conf = config_loader(config_file_location: @driver_config[:oci_config_file], profile_name: @driver_config[:oci_profile_name])
|
|
46
48
|
@driver_config[:oci_config].each do |key, value|
|
|
47
49
|
conf.send("#{key}=", value) unless value.nil? || value.empty?
|
|
@@ -71,13 +71,16 @@ module Kitchen
|
|
|
71
71
|
end
|
|
72
72
|
|
|
73
73
|
# Adds the source_details property to the launch_details for an instance that is being created from an image.
|
|
74
|
+
# When <b>kms_key_id</b> is specified the boot volume is encrypted with the provided customer-managed key,
|
|
75
|
+
# which is required by compartments governed by a Security Zone that mandates customer-managed encryption.
|
|
74
76
|
def instance_source_via_image
|
|
75
77
|
return if config[:boot_volume_id]
|
|
76
78
|
|
|
77
79
|
launch_details.source_details = OCI::Core::Models::InstanceSourceViaImageDetails.new(
|
|
78
80
|
sourceType: "image",
|
|
79
81
|
imageId: image_id,
|
|
80
|
-
bootVolumeSizeInGBs: config[:boot_volume_size_in_gbs]
|
|
82
|
+
bootVolumeSizeInGBs: config[:boot_volume_size_in_gbs],
|
|
83
|
+
kmsKeyId: config[:kms_key_id]
|
|
81
84
|
)
|
|
82
85
|
end
|
|
83
86
|
|
data/lib/kitchen/driver/oci.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kitchen-oci
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stephen Pearson
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-
|
|
12
|
+
date: 2026-06-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: oci
|