How-To Guides
...
Using AAPM Agent SDKs
Using C++ SDK
2 min
this guide explains how to integrate the kron pam c++ sdk into your application, configure the client, and retrieve secrets programmatically the example below demonstrates a minimal working pattern for requesting a password from the kron pam password vault example implementation below is a complete example demonstrating password retrieval \#include "pch h" \#include \<string> \#include \<iostream> \#include "password manager h" using namespace winrt; using namespace windows foundation; class accessserviceclient { public accessserviceclient() manager(passwordmanager instance("10 20 30 40", 6396)) { manager setscaddress("https //test krontech com"); } response sendrequest() { accessrequestbuilder builder("statictestaccount", "6d8beac9 843c 41d1 8131 0cfc09fc4899", "/testlinuxservers"); builder setcomment("try to see the comment") setshowusername("true") setapiversion("v2") setresponsetype("json"); return manager getpassword(\&builder); } private passwordmanager manager; }; void run() { std cout << "getting password " << std endl; std cout flush(); accessserviceclient client; response response = client sendrequest(); if (response >haserror()) { std cout << "rpc error response \[" << response >geterrvalue() << "]" << std endl; std cout flush(); } else { std cout << "rpc ss response \[" << response >getvalue() << "]" << std endl; std cout flush(); } } int main(int argc, char argv\[]) { run(); std cout flush(); return 0; } configuration parameters parameter definition setscaddress kron pam vault endpoint url instance aapm agent address token kron pam aapm token assigned for account setaccountname account name registered in kron pam vault setaccountpath account path within the vault (e g , /databases/sharedaccouts, /windows) setcomment optional descriptive comment for the fetching password setshowusername include username in response (true/false) passwordexpirationtime duration before password expiration (in minutes) passwordchangerequired whether to force a new password rotation upon retrieval prettify enables formatted response output setresponsetype format of the response (text, json) agentaddress kron pam secrets management agent ip address (hostname) agentport kron pam secrets management agent port number setapiversion ensures that the aapm agent returns a response in the same format as kron pam for static credential types (default value v2) disableagentsecurechannel ignores connection errors when using a self signed certificate for the aapm agent disableinterceptorsecurerequest ignores connection errors when using a self signed certificate defined on kron pam ignoreagentcertificate parameter required for using the aapm agent without a certificate (not recommended) ignoreinterceptorcertificate parameter required for using kron pam without a certificate (not recommended)