Hi @rajanadar thank you for your good work. A quick question and an update request.
Question: Why in KeyValueSecretsEngineV2Provider.cs line 23/57 is /data/ injected between path? --- "/data/" + path.Trim('/') --- What if it was set outside of the api to a different path?
Update Request: I think I have fallen into issue 61 and can see other interest also. Is that on the priority list?
Never-mind the question. I assume that is the V2 difference. V1 is ok. The update is request is still valid
Hi, im trying to login using AWS IAM, but stuck with an exception:
{"errors":["didn't supply required authentication values"]}
code (copied from GitHub's README page):
var amazonSecurityTokenServiceConfig = new AmazonSecurityTokenServiceConfig();
var creds = FallbackCredentialsFactory.GetCredentials();
var iamRequest = GetCallerIdentityRequestMarshaller.Instance.Marshall(new GetCallerIdentityRequest());
iamRequest.Endpoint = new Uri(amazonSecurityTokenServiceConfig.DetermineServiceURL());
iamRequest.ResourcePath = "/";
iamRequest.Headers.Add("User-Agent", "https://github.com/rajanadar/vaultsharp/0.11.1000");
iamRequest.Headers.Add("X-Amz-Security-Token", creds.GetCredentials().Token);
iamRequest.Headers.Add("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");
new AWS4Signer().Sign(iamRequest, amazonSecurityTokenServiceConfig, new RequestMetrics(), creds.GetCredentials().AccessKey,
creds.GetCredentials().SecretKey);
var iamStsRequestHeaders = iamRequest.Headers;
var base64EncodedIamRequestHeaders = Convert.ToBase64String(Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(iamStsRequestHeaders)));
var a1 = new IAMAWSAuthMethodInfo(AuthMethodType.AWS.Type, base64EncodedIamRequestHeaders, Guid.NewGuid().ToString(), "mt-fxrates-honduras");
var cs = new VaultClientSettings(settings.Vault.Host, a1);
var c = new VaultClient(cs);
var secret = c.V1.Secrets.KeyValue.V1.ReadSecretAsync(settings.Vault.Path).Result;
vault's role record
vault write auth/aws/role/mt-fxrates-honduras auth_type=iam policies=mt-fxrates-honduras max_ttl=1h bound_iam_principal_arn=arn:aws:iam::312226949769:role/lambda_basic_vpc_execution
Any help is appreciated. Thanks
Hi there
can you provide a code snippet and the exact exception?