COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Ammus1234 on 21 Aug 2014 01:15:15 AM

Title: [Answered] TRIGGER.BAT without password
Post by: Ammus1234 on 21 Aug 2014 01:15:15 AM
Hi All,

Is there a way to use the trigger.bat without a password.
The normal syntax is trigger.bat http://localhost:9300/p2pd/servlet/dispatch username password namespaceID triggername
I can't store the credentials inside the script due to company security policy.
I searched but couldn't find any answer yet.
Title: Re: TRIGGER.BAT without password
Post by: BigChris on 21 Aug 2014 08:04:07 AM
Hi - I've checked all of our .bat files and they've all got the user name and password in them. I've searched the web briefly and i can't find any reference (other than comments that I'm guessing are from you asking the same question) to not having that option.

Are there any options for having the .bat files in a secured folder? Not sure what else to suggest to get you round the problem...
Title: Re: TRIGGER.BAT without password
Post by: MFGF on 21 Aug 2014 08:09:12 AM
Quote from: BigChris on 21 Aug 2014 08:04:07 AM
Hi - I've checked all of our .bat files and they've all got the user name and password in them. I've searched the web briefly and i can't find any reference (other than comments that I'm guessing are from you asking the same question) to not having that option.

Are there any options for having the .bat files in a secured folder? Not sure what else to suggest to get you round the problem...

I don't see any way around this. Since you need to be authenticated to do things in Cognos 10, you have to specify your authentication credentials somewhere, or else you're not going to get access. Since it's a batch file (therefore not executed live in a session) there is no way to prompt interactively for credentials, so adding them to the connect string is the only way to go as far as I'm aware.

Cheers!

MF.
Title: Re: TRIGGER.BAT without password
Post by: dougp on 21 Aug 2014 11:20:11 AM
What if you make that file (we'll call it triggerstuff.bat) executable but not readable.  It can be called by another .bat file like this:

triggerstuff.bat namespaceID triggername


Your original .bat file (triggerstuff.bat) would look like this:
trigger.bat http://localhost:9300/p2pd/servlet/dispatch username password %1 %2


The namespace and trigger are passed as parameters and the server location, user name, and password can only be exposed to the admin (who already knows the credentials).

Would that meet your security requirements?
Title: Re: TRIGGER.BAT without password
Post by: Ammus1234 on 21 Aug 2014 11:08:29 PM
All, thanks for the replies.

dougp, thank you this will do the trick.  :)
I can call the exe directly from my etl. I think I can do it without second bat file.
Title: Re: [Answered] TRIGGER.BAT without password
Post by: Francis aka khayman on 22 Aug 2014 03:21:55 AM
If you store the password in your exe file, it can still be retrieved relatively easily. Not as easily as if you have batch file though.
Title: Re: [Answered] TRIGGER.BAT without password
Post by: Ammus1234 on 25 Aug 2014 12:46:24 AM
Do you have any other suggestion khayman?
I found dougp's answer acceptable as I couldn't find any better option.