Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    simonthum
    @simonthum
    I am evalauting this library and wonder if the login / token storage you describe above would work well for me. I want to renew certificates every month or so, and I would prefer not to keep the auth token live for so long. Does it relogin when the token expired?
    copperorange
    @copperorange
    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?
    copperorange
    @copperorange

    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

    jegansivathanu
    @jegansivathanu
    hi
    hi,could you please anyone help to use GitHub using vault.i have a requirement that,write and read some secrets using GitHub have already create personal access token in GitHub and i not able to access GitHub repository from .net.thanks in advance
    archanakpsharma
    @archanakpsharma
    Hi there
    I want to establish a connection to Vault system and through the LDAP Auth Method but unable to get authencticated as VaultToken is not getting generated. Can you please help
    Dzmitry Martavoi
    @martavoi

    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

    David Hoerster
    @DavidHoerster
    Hi there! I'm trying to use the VaultSharp Azure Auth method to utilize an MSI that I've created for an App Service that I wan to have communicate with my Vault Server (which is running on a VM). When I go to request a secret from Vault, I get an error that is requiring me to put in the vmName when I create my vault client settings. But since this is an App Service, the resource mapping is off -- the VM name maps to /resources/virtualMachines, but my app service is located at a different resource path. Is support for App Service's using MSI going to be supported in VaultSharp?....and, also, is there a way to authenticate today for an App Service's MSI? Thank you!
    Torben Hørup
    @hoerup
    Does anybody know if Raja Nadar is still around - he's been quiet lately ?
    Roman Marusyk
    @Marusyk
    Hi all, what do you think about this https://github.com/VaultSharp
    Raja Nadar
    @rajanadar
    @simonthum the relogin is not automatic. you need to do it explicitly.

    Hi there

    can you provide a code snippet and the exact exception?

    ---- folks, there was a personal emergency that kept me out cold. i'm back now. let me know any open issues ---
    Raja Nadar
    @rajanadar
    Folks, we have some really active community members that have answered questions in the past in GH issues. For the benefit of wider community, the recommendation moving forward is to ask your questions on Stack Overflow, with the vault-sharp tag... Please go ahead and ask questions there. https://stackoverflow.com/questions/tagged/vault-sharp
    Raja Nadar
    @rajanadar

    hello folks, happy to announce the release of VaultSharp 1.4.0 today. It has all the Auth backends and Secret Engines supported by Vault 1.4.0. Cheers!
    Mohammad Azhar Ali
    @azhar144
    @rajanadar I am using VaultSharp NuGet package with .NET frameworks 4.8 and .Net Core 3.1 it's working perfect with .Net Core 3.1 but with .Net Framework 4.8 it's not able to resolve. I am getting this error "Could not load file or assembly VaultSharp, version =1.4.0.5, culture =neutral, PublicKeyToken = cb3d4aad92b0eded"
    Raja Nadar
    @rajanadar
    Thanks Mohammed. Can you please open a github issue? I'll have a look at it this weekend.
    Mohammad Azhar Ali
    @azhar144
    Thanks for the response, It worked fine when I copied two dlls in the bin folder newtonsoftjson.dll and vaultsharp.dll
    Raja Nadar
    @rajanadar
    Glad to hear. Cool
    MarkKyes
    @MarkKyes
    Hello all, appreciate the library, when making a call to get dynamic auth creds, the call works, can see it being created but the requestid, data is coming back null. any thoughts about how this might be happening?
    Raja Nadar
    @rajanadar
    Hi Mark, can you please create a github issue with VaultSharp version, vault api version and sample code snippet along with the exception or response you are seeing?
    Óskar
    @Skarinn
    Hi... Has anyone integrated VaultSharp in dotnet core using kubernetes ServiceAccount Tokens for Vault authentication?
    If so... Any do's and dont's ?
    copperorange
    @copperorange
    @Skarinn there is nothing special to do here. Just make sure you have an easy way to track errors in case any issues asrise to help debug configuration and secrets path.
    Raja Nadar
    @rajanadar
    thanks @copperorange
    chinswain
    @chinswain
    When I initialise a new vault via CLI it doesn't give me the base64 key as it does when initialising from the website, anyone know how to generate\retrieve it?
    vault operator init -key-shares=1 -key-threshold=1
    Only the Unseal Key(s) and Initial Root Token are returned.
    chinswain
    @chinswain
    Is it possible to init via VaultSharp instead of the CLI?
    Raja Nadar
    @rajanadar
    Yes. VaultSharp supports most system backend operations as well. You can initialize vault using VaultSharp as follows.
    var masterCredentials = await _unauthenticatedVaultClient.V1.System.InitAsync(initOptions);
    @chinswain let me know if any issues.
    chinswain
    @chinswain
    Is it possible to unseal vault via VaultSharp or is it expected that this has been done prior to accessing?
    chinswain
    @chinswain
    Also, is there a method to create a new secret engine? I can't see anything in the examples. I'm currently interfacing with the exe directly: .\vault.exe secrets enable -version=1 kv
    Raja Nadar
    @rajanadar
    @chinswain technically, you can unseal using VaultSharp. This admin operation is supported. However, from a design perspective, end applications normally don't unseal vault. The vault setup, unsealing, mounting backends, writing secrets, creating access control policies etc.
    Are all administrative operations expected to be done ahead of time by the security team or a privileged person.
    As an end application, you use VaultSharp to read secrets.
    However, VaultSharp is built to be used in both end application and admin flows, so it supports a lot of admin operations as well.
    What new secret engine do you want to mount? The kv ones are normally enabled by default. Let me know as a github issue if you need an api support that doesn't exist today

    Mike Lewis
    @gingermike
    Hi there - I'm trying to use the CustomAuthMethodInfo class in order to perform a custom auth hook required in our internal org
    However, when I return a CustomAuthMethodInfo from the delegate required in the constructor, I cannot set the ReturnLoginAuthInfo property as it's marked as internal set and not created for me the default constructor
    is this a bug or am I using the class wrong?
    Raja Nadar
    @rajanadar
    Hi Mike, let me check and get back to you in a day.
    Raja Nadar
    @rajanadar
    hey Mike, it is a bug. i created a gh issue to track and close within the week. rajanadar/VaultSharp#182
    Please use the TokenAuthInfo method to unblock for now.
    Mike Lewis
    @gingermike
    Great, thanks Raja :+1:
    Raja Nadar
    @rajanadar
    hi @gingermike , i have published a new NuGet of VaultSharp whereby you can set your own AuthInfo. Please let me know if any issues. https://www.nuget.org/packages/VaultSharp/1.6.2.1