• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

example using service account

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Jeff Downey
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
You don't know me, but I've been looking all over the world for. Thanks to the help from this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic