@@ -16,8 +16,8 @@ public static void Register()
16
16
public static readonly string Prefix = "hcvault://" ;
17
17
public static readonly string TokenId = "token.id" ;
18
18
public static readonly string Namespace = "namespace" ;
19
- public static readonly string AppRoleId = "app .role.id" ;
20
- public static readonly string AppRoleSecretId = "app.role .secret.id" ;
19
+ public static readonly string ApproleRoleId = "approle .role.id" ;
20
+ public static readonly string ApproleSecretId = "approle .secret.id" ;
21
21
22
22
public string GetKeyUrlPrefix ( )
23
23
{
@@ -36,29 +36,29 @@ public IKmsClient NewKmsClient(IDictionary<string, string> config, string keyUrl
36
36
{
37
37
ns = Environment . GetEnvironmentVariable ( "VAULT_NAMESPACE" ) ;
38
38
}
39
- config . TryGetValue ( AppRoleId , out string appRoleId ) ;
40
- if ( appRoleId == null )
39
+ config . TryGetValue ( ApproleRoleId , out string roleId ) ;
40
+ if ( roleId == null )
41
41
{
42
- appRoleId = Environment . GetEnvironmentVariable ( "VAULT_APP_ROLE_ID " ) ;
42
+ roleId = Environment . GetEnvironmentVariable ( "VAULT_APPROLE_ROLE_ID " ) ;
43
43
}
44
- config . TryGetValue ( AppRoleSecretId , out string appRoleSecretId ) ;
45
- if ( appRoleSecretId == null )
44
+ config . TryGetValue ( ApproleSecretId , out string secretId ) ;
45
+ if ( secretId == null )
46
46
{
47
- appRoleSecretId = Environment . GetEnvironmentVariable ( "VAULT_APP_ROLE_SECRET_ID " ) ;
47
+ secretId = Environment . GetEnvironmentVariable ( "VAULT_APPROLE_SECRET_ID " ) ;
48
48
}
49
49
50
50
IAuthMethodInfo authMethod ;
51
- if ( appRoleId != null && appRoleSecretId != null )
51
+ if ( roleId != null && secretId != null )
52
52
{
53
- authMethod = new AppRoleAuthMethodInfo ( appRoleId , appRoleSecretId ) ;
53
+ authMethod = new AppRoleAuthMethodInfo ( roleId , secretId ) ;
54
54
}
55
55
else if ( tokenId != null )
56
56
{
57
57
authMethod = new TokenAuthMethodInfo ( tokenId ) ;
58
58
}
59
59
else
60
60
{
61
- throw new ArgumentException ( $ "Either { TokenId } or both { AppRoleId } and { AppRoleSecretId } " +
61
+ throw new ArgumentException ( $ "Either { TokenId } or both { ApproleRoleId } and { ApproleSecretId } " +
62
62
$ "must be provided in config or environment variables.") ;
63
63
}
64
64
0 commit comments