Passing windows credential into wsadmin scripting

Niranjan Chandrasekhar
Niranjan Chandrasekhar used Ask the Experts™
on
Hi,
I have taken a jython script which checks for the Application server, Node status and mails it to the admin if anything is stopped.
The only issue I am having is that for running the jython script, I have to pass the username and password either through command line or through prompt, when running the script through wsadmin.
I would like to get this automated such that, the script automatically picks the windows credentials.

Any help would be highly appreciated.

Thank you.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
HonorGodSoftware Engineer

Commented:
There might be ways to programmatically obtain / use the windows credentials, but I am not aware of them.
One problem that comes to mind in doing so would be that ... if a script could extract the username and password of the active user, then this would be an enormous security exposure...  Imagine of that code were inserted into a malicious application that obtained this information and communicated it to some remote server...  very nasty indeed.

I would consider having the information in some kind of external storage, or even have the script prompt for the user and save it in memory until it was needed.  

Hopefully that makes sense, and is of use to you.

Good luck.
Instead of extracting the windows username/password, what I meant was, probably running a batch process which automatically executes this jython script (taking the credentials from the service) and goes on to run this.
The reason we need this is we plan to automate this script and run it on a scheduled way. We don't want the password to be present in plain text anywhere in the system.
Software Engineer
Commented:
Is the application is going to run as a Windows service, then have the service log in using the appropriate credentials (i.e., username & password) on the service panel.

That's how I would do it.
Suhas .Senior QA Manager

Commented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: HonorGod (https:#a42364334)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

suhasbharadwaj
Experts-Exchange Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial