Skip to content
This repository was archived by the owner on Jun 23, 2020. It is now read-only.

Commit bdb6565

Browse files
authored
Merge pull request #55 from oracle/kj-add-passphrase-support
Added support for the OCI private key passphrase
2 parents 1c73578 + f2fd69c commit bdb6565

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

pkg/oci/client/config.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,15 @@ var ociRegions = map[string]string{
3737
// AuthConfig holds the configuration required for communicating with the OCI
3838
// API.
3939
type AuthConfig struct {
40-
Region string `yaml:"region"`
41-
RegionKey string `yaml:"regionKey"`
42-
TenancyOCID string `yaml:"tenancy"`
43-
CompartmentOCID string `yaml:"compartment"`
44-
UserOCID string `yaml:"user"`
45-
PrivateKey string `yaml:"key"`
46-
Fingerprint string `yaml:"fingerprint"`
47-
VcnOCID string `yaml:"vcn"`
40+
Region string `yaml:"region"`
41+
RegionKey string `yaml:"regionKey"`
42+
TenancyOCID string `yaml:"tenancy"`
43+
CompartmentOCID string `yaml:"compartment"`
44+
UserOCID string `yaml:"user"`
45+
PrivateKey string `yaml:"key"`
46+
PrivateKeyPassphrase string `yaml:"passphase"`
47+
Fingerprint string `yaml:"fingerprint"`
48+
VcnOCID string `yaml:"vcn"`
4849
}
4950

5051
// Config holds the configuration for the OCI flexvolume driver.

pkg/oci/client/oci.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func New(configPath string) (Interface, error) {
8585
config.Auth.Region,
8686
config.Auth.Fingerprint,
8787
config.Auth.PrivateKey,
88-
nil,
88+
&config.Auth.PrivateKeyPassphrase,
8989
)
9090
computeClient, err := core.NewComputeClientWithConfigurationProvider(configProvider)
9191
if err != nil {

0 commit comments

Comments
 (0)