Skip to content

Commit cda23a4

Browse files
fix(conjur): disable credentialStorage when set conjurapi config and fix readme for conjur provider (#977)
Signed-off-by: antoinemiquel <[email protected]>
1 parent 24984c0 commit cda23a4

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ The following env vars have to be configured:
976976
- `CONJUR_AUTHN_LOGIN`
977977
- `CONJUR_AUTHN_API_KEY`
978978
979-
- `ref+conjur://PATH/TO/VARIABLE[?address=CONJUR_APPLIANCE_URL&account=CONJUR_ACCOUNT&login=CONJUR_AUTHN_LOGIN&apikey=CONJUR_AUTHN_API_KEY]/CONJUR_SECRET_ID`
979+
- `ref+conjur://PATH/TO/VARIABLE/CONJUR_SECRET_ID[?address=CONJUR_APPLIANCE_URL&account=CONJUR_ACCOUNT&login=CONJUR_AUTHN_LOGIN&apikey=CONJUR_AUTHN_API_KEY]`
980980
981981
Example:
982982

pkg/providers/conjur/conjur.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,12 @@ func (p *provider) GetStringMap(path string) (map[string]interface{}, error) {
6565

6666
func (p *provider) ensureClient() (*conjurapi.Client, error) {
6767
if p.client == nil {
68-
config, err := conjurapi.LoadConfig()
69-
if err != nil {
70-
p.log.Debugf("conjur: cannot get conjur config")
71-
return nil, err
68+
config := conjurapi.Config{
69+
ApplianceURL: p.Address,
70+
Account: p.Account,
71+
CredentialStorage: conjurapi.CredentialStorageNone,
7272
}
7373

74-
config.ApplianceURL = p.Address
75-
config.Account = p.Account
76-
7774
cli, err := conjurapi.NewClientFromKey(config,
7875
authn.LoginPair{
7976
Login: p.Login,

0 commit comments

Comments
 (0)