// ============================================================================================================================================== /// <summary> /// Constructor. Initializes the connection to Vault and stores the token. /// <param name="token">Token value that has permissions to Vault.</param> /// <param name="vaultAgentAPI">The Vault API Connector</param> /// <param name="name">The name you wish to give the Vault System backend. At the present time this is purely cosmetic and does nothing.</param> /// </summary> public VaultSystemBackend(string token, VaultAgentAPI vaultAgentAPI, string name = "System") : base(name, "sys", vaultAgentAPI) { sysToken = new Token() { ID = token }; }
/// <summary> /// Constructor for the Backend. /// </summary> /// <param name="name">The name used to identify this backend, this is not the mount point!</param> /// <param name="mountPoint">The name of the mount point in vault to connect to.</param> /// <param name="vaultAgentAPI">This is the Vault Agent API object that contains Connection info to the Vault. /// It should also contain a Token that has the necessary permissions to do the Backend Tasks</param> /// <param name="mountPointPrefix">If the path is prefixed in vault with some value, specify it here. It defaults to /v1/ which is typical Vault default value.</param> public VaultBackend(string name, string mountPoint, VaultAgentAPI vaultAgentAPI, string mountPointPrefix = "/v1/") { Name = name; MountPoint = mountPoint; MountPointPrefix = mountPointPrefix; ParentVault = vaultAgentAPI; Type = EnumBackendTypes.NotDefined; }
// TODO - fix params for httpcon /// <summary> /// Constructor /// </summary> /// <param name="backendName">A Name for the backend. This is noy used or stored internally in Vault anywhere. </param> /// <param name="backendMountPoint">The mount point where the backend is mounted at.</param> /// <param name="vault">The Vault object to use to establish a connection to Vault.</param> internal VaultAuthenticationBackend(string backendName, string backendMountPoint, VaultAgentAPI vault) : base(backendName, backendMountPoint, vault) { IsAuthenticationBackend = true; }