The Vault client program requires one to input the username and password when running in AD mode.
Windows nvalt windows#
Therefore, there is no true way for the client to pass along windows authentication information in a built-in way. Updateĭid some looking around on the Vault forums and it seems that the AD integration is merely a way to have Vault Client prompt the user and pass along to server. We've either exec'd out to the command line version or have written our own Task(s) by extending the NAnt framework. We've had to do this for a few things we integrate with in our build process. If this is an option, integrated authentication will automatically kick in as long as the user running the NAnt process is the same as the one needing to connect to Vault. If there happens to be no workarounds for the potential lacking in Vault's NAnt tasks it might be possible to use the task to call a command line version of their client side tool (not even sure if they have one). That being said, this could be a sign that Vault's NAnt tasks don't support integrated authentication? Meaning, if the vaultsetloginoptions task requires the user and password arguments, then there is no good way to pass along credentials (as you pointed out). In the end, authentication gets passed along to whichever user happens to be running the parent NAnt process. I've worked with NAnt a lot and anything that gets executed (tasks, execs, etc) have the inherent potential to be running in integrated authenticated mode. I'm unfamiliar with Vault so please forgive the potential vagueness of this answer.
(c) Read the stored profile information from the Vault client and connect using that (except I'm not sure where it is stored). except we've then got a problem of getting the password from the user still
Windows nvalt code#
(b) Use a C# script from the NAnt code to set the properties of username and password dynamically. It also causes problems when the solution has files checked out (part of the script ensures all files are checked back into source control prior to generating a label in Vault). This isn't so great, as we then loose an audit trail of who is responsible for the check-in / check-out operations the NAnt script performs. (a) Hardcode the 'Admin' account into the NAnt properties and log vault in using that. Other alternatives (all with catches) include: Both username and password are required options in the vaultsetloginoptions command. The NAnt block I am using to initialise the vault connect is: Īs I am working on the project with other developers, hard coding user names and passwords into the NAnt build file is not a good idea. Is there any way we can get Vault to use Windows Authentication from NAnt to create the connection? I am wanting to perform a number of tasks in SourceGear Vault (V4.1.4) with NAnt (V.0).