aspose file tools*
The moose likes JDBC and the fly likes JDBC Login Pratection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC Login Pratection" Watch "JDBC Login Pratection" New topic
Author

JDBC Login Pratection

deca leni
Ranch Hand

Joined: Jun 18, 2011
Posts: 49

JDBC Login Pratection

please members can anybody tell me how to or methods that we can use to protect our MS Database with userName and passward.that database must not be connected without userName and passward .how to define ruls in java code to prevent anonimus access too. thank you...


Do or die...?? No, Do before you die... || (SCJP .6)
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30531
    
150

Usually, you create a separate "system" id for accessing the database that is used by the Java application. Then you are controlling access via the application rather than the database.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
deca leni
Ranch Hand

Joined: Jun 18, 2011
Posts: 49

Jeanne Boyarsky wrote:Usually, you create a separate "system" id for accessing the database that is used by the Java application. Then you are controlling access via the application rather than the database.


but what do mean by separate "system" id ?
cloud you please explain me little bit more and clearly. actually I'm new to JDBC

thank you...
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30531
    
150

I'll use this site as an example to make it more concrete. You log into this site with a user id you created. This is not an id that the database knows about. Once you log in, our forum software executes database queries on your behalf. This database id is a "system id." The database is protected against users by the application. End users do not know the database password nor can they run queries against it directly. They can only run queries the application has created and are therefore protected/safe.
 
jQuery in Action, 2nd edition
 
subject: JDBC Login Pratection