aspose file tools*
The moose likes General Computing and the fly likes example using service account Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "example using service account" Watch "example using service account" New topic
Author

example using service account

Jeff Downey
Greenhorn

Joined: Apr 22, 2013
Posts: 2
Can anyone help me find an example of how to configure an Active Directory service account to work with a SQLServer database?
I have several JSP pages that are currently using a database level login to display read-only data. I need to switch this over to use the service account, rather than the direct database level login.

I have a jsp that is using a jdbc/odbc connection. The JSP passes connection information which currently is the sqlserver id/pw.
The only examples I am finding, pass the user’s identity on through to the database. In my case, I need the queries to just run with a standard windows id set up as a service account.

Thanks in advance for your assistance!
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5842
    
    7

Would using integrated authentication work for you? I think that this assumes that you are running your app server under an AD account and not the system account.


JBoss In Action
Jeff Downey
Greenhorn

Joined: Apr 22, 2013
Posts: 2
Doesn't that pass along the user's identity? In my case, the SqlServer database knows about the service account. I want the JSP to run as the service account Id, regardless of the authenticated user that calls it.

Am I missing how it works?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5842
    
    7

I assume you are running the application server as a service. Are you running it using the service account (you should be), or as SYSTEM? Then the JSP will be runnign as the service account and will use that account when it accesses SQL Server.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: example using service account