DRiley II Posted November 19 Posted November 19 Hi Team, we're looking to update the existing version of the Hornbill Data Export with the latest version 2.0.0. However, we seem to be encountering some difficulty. When running the exe (as an administrator): 1) the documentation (Hornbill Data Export - Hornbill) suggests on the first run that it will prompt for an API Key and our instance name, however it only prompts for our instance name. Is this expected? 2) After typing our instance id, the next line states "Export Configuration not found". We can't understand why as the cmd line argument has been included, the filename specified is correct, and the conf file is in the latest format. 3) The next and final output is "Could not encrypt authentication details!". What's this referring to, the export.cfg thats apparently created or is it suggesting a problem with the keysafe entry, or just can't find the keysafe entry because it can't find the conf file with the keysafe entry ID? The log doesn't output anything more, even in debug mode. Can someone point us in the right direction? Thanks, Dan
Jordan Gooding-McGovern Posted November 19 Posted November 19 Hi Dan, When run with -creds=true that will check to see whether or not the API Key has been entered correctly. For the first run, you'll want to run it without the extra flag. When you first run the exporter without that flag. It should then prompt you to enter the API key and instance ID. You should also notice an "export.cfg" file being created. Afterwards if you run it with -creds=true it will only output the stored APIKey. The error "Could not decrypt authentication details" leads me to assume the export.cfg file hasn't been created yet. I'll look into updating our documentation to make things clearer as I can see it's missing that flag Jordan
SamS Posted November 19 Posted November 19 Hi @DRiley II, At a glance, the configuration file IS being picked up - see the third line in the output. I would set skip the whole "-creds=true" parameter, as that forces the Instance ID capture - it is to check the API key given - and it exits if the export.cfg file doesn't have an Instance ID(*). My advice would be to remove the export.cfg file and use the following command line (assuming you want debug on): data_export.exe -file=confv3.json -debug You will then be asked for the Instance ID and API key before the export starts. You won't be asked on subsequent runs of the utility BUT the utility will fail if someone OTHER than the original user (who created the export.cfg file; you in this case) is running the utility. IF the utility is to be run on a schedule, a service account is advised - and the first run (to create a new export.cfg) using "runas" or other is suggested. (*) It could also be the case that the export.cfg file could not be decrypted, because the Windows account with which you are running the utility is NOT the SAME as the one which originally created the export.cfg file.
Steve Giller Posted November 19 Posted November 19 Just a thought - have you checked there's no firewall or similar blocking access to hornbill or one of its subdomains? I have no idea what the code's doing, but as it fails immediately you enter the Instance ID it could be that it tries and fails to connect before asking for the API Key.
DRiley II Posted November 21 Author Posted November 21 Thanks everyone for the responses. The issue was not understanding how to us the -creds = true argument. Now I know for the initial setup it should be omitted. We've done that bit now. However, I'm still a bit unsure about when it should be used. Can someone clarify the situation when -creds=true is required? When I use -creds=true it seems to always prompt for the instanceID, even after the initial setup run so I'm assuming I shouldn't use it when scheduling the tool? Is it an argument just used to check the validity of the API key, nothing more? Thanks, Dan
Steve Giller Posted November 27 Posted November 27 On 21/11/2024 at 15:01, DRiley II said: Is it an argument just used to check the validity of the API key, nothing more? The Docs state: creds - Defaults to false, if set to true the tool will returned the stored APIKey and end. That's literally what it does. Specifically the "and end" part - with this set to true it will do nothing except return the API Key. Unless you want to return the API Key then there is no need to use this parameter. To be honest, in the interests of security, if you don't know the API key it's better to delete the credentials file (export.cfg) and go through the "First Run" process with a new Key.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now