This repository was archived by the owner on Jun 23, 2020. It is now read-only.
File tree 3 files changed +11
-2
lines changed
3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 87
87
-----BEGIN RSA PRIVATE KEY-----
88
88
<snip>
89
89
-----END RSA PRIVATE KEY-----
90
+ passphrase : my secret passphrase
90
91
fingerprint : d4:1d:8c:d9:8f:00:b2:04:e9:80:09:98:ec:f8:42:7e
91
92
vcn : ocid1.vcn.oc1.phx.aaaaaaaaqiqmei4yen2fuyqaiqfcejpguqs6tuaf2n2iaxiwf5cfji2s636a
92
93
` ` `
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import (
19
19
"fmt"
20
20
"io"
21
21
"io/ioutil"
22
+ "log"
22
23
"os"
23
24
"strings"
24
25
@@ -44,7 +45,8 @@ type AuthConfig struct {
44
45
CompartmentOCID string `yaml:"compartment"`
45
46
UserOCID string `yaml:"user"`
46
47
PrivateKey string `yaml:"key"`
47
- PrivateKeyPassphrase string `yaml:"key_passphase"`
48
+ Passphrase string `yaml:"passphrase"`
49
+ PrivateKeyPassphrase string `yaml:"key_passphase"` // DEPRECIATED
48
50
Fingerprint string `yaml:"fingerprint"`
49
51
VcnOCID string `yaml:"vcn"`
50
52
}
@@ -116,6 +118,12 @@ func (c *Config) setDefaults() error {
116
118
if err != nil {
117
119
return fmt .Errorf ("setting config region fields: %v" , err )
118
120
}
121
+
122
+ if c .Auth .Passphrase == "" && c .Auth .PrivateKeyPassphrase != "" {
123
+ log .Print ("config: auth.key_passphrase is DEPRECIATED and will be removed in a later release. Please set auth.passphrase instead." )
124
+ c .Auth .Passphrase = c .Auth .PrivateKeyPassphrase
125
+ }
126
+
119
127
return nil
120
128
}
121
129
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ func New(configPath string) (Interface, error) {
91
91
config .Auth .Region ,
92
92
config .Auth .Fingerprint ,
93
93
config .Auth .PrivateKey ,
94
- & config .Auth .PrivateKeyPassphrase ,
94
+ & config .Auth .Passphrase ,
95
95
)
96
96
computeClient , err := core .NewComputeClientWithConfigurationProvider (configProvider )
97
97
if err != nil {
You can’t perform that action at this time.
0 commit comments