Allow override signing key pass in oracle-bmcs
Adds pass_phrase property to the oracle-bmcs builder to allow users to specify/override a pass phrase for the private key used to sign requests to the BMCS API.
This commit is contained in:
parent
25e4843a6f
commit
3c4ec2dc3e
|
@ -37,6 +37,7 @@ type Config struct {
|
||||||
Region string `mapstructure:"region"`
|
Region string `mapstructure:"region"`
|
||||||
Fingerprint string `mapstructure:"fingerprint"`
|
Fingerprint string `mapstructure:"fingerprint"`
|
||||||
KeyFile string `mapstructure:"key_file"`
|
KeyFile string `mapstructure:"key_file"`
|
||||||
|
PassPhrase string `mapstructure:"pass_phrase"`
|
||||||
|
|
||||||
AvailabilityDomain string `mapstructure:"availability_domain"`
|
AvailabilityDomain string `mapstructure:"availability_domain"`
|
||||||
CompartmentID string `mapstructure:"compartment_ocid"`
|
CompartmentID string `mapstructure:"compartment_ocid"`
|
||||||
|
@ -114,6 +115,10 @@ func NewConfig(raws ...interface{}) (*Config, error) {
|
||||||
accessCfg.Fingerprint = c.Fingerprint
|
accessCfg.Fingerprint = c.Fingerprint
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if c.PassPhrase != "" {
|
||||||
|
accessCfg.PassPhrase = c.PassPhrase
|
||||||
|
}
|
||||||
|
|
||||||
if c.KeyFile != "" {
|
if c.KeyFile != "" {
|
||||||
accessCfg.KeyFile = c.KeyFile
|
accessCfg.KeyFile = c.KeyFile
|
||||||
accessCfg.Key, err = client.LoadPrivateKey(accessCfg)
|
accessCfg.Key, err = client.LoadPrivateKey(accessCfg)
|
||||||
|
|
|
@ -85,6 +85,11 @@ builder.
|
||||||
[BMCS config file](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdkconfig.htm)
|
[BMCS config file](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdkconfig.htm)
|
||||||
if present.
|
if present.
|
||||||
|
|
||||||
|
- `pass_phrase` (string) - Pass phrase used to decrypt the private key used
|
||||||
|
to sign requests to the BMCS API. Overrides value provided by the
|
||||||
|
[BMCS config file](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdkconfig.htm)
|
||||||
|
if present.
|
||||||
|
|
||||||
- `region` (string) - An Oracle Bare Metal Cloud Services region. Overrides
|
- `region` (string) - An Oracle Bare Metal Cloud Services region. Overrides
|
||||||
value provided by the
|
value provided by the
|
||||||
[BMCS config file](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdkconfig.htm)
|
[BMCS config file](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdkconfig.htm)
|
||||||
|
|
Loading…
Reference in New Issue