Welcome to the jGuard's wiki » jGuard Documentation » Jdbc Authentication Manager´s Data Model

Jdbc Authentication Manager´s Data Model

Last modified by RaffaelloPelagalli on 2006/09/18 06:43



At a first look, jGuard´s data model would look a little hard to understand. To make it a little bit easier to understand, here it goes a definition of the data structure used by jGuard´s Authentication (JDBC) module.

Tables and Fields


jg_credentialStores all Credential (information related to a specific user), like login, password, security id, born date, mother´s maiden name, etc.
jg_principalStores all the Principals (User´s Roles and User´s Responsibilities - it´s called Principal to keep compatibility with JAAS nomeclature).
jg_user_principalStores the relations regarding Users and Principals. An association means that the User has the Principal. As each Application has it owns Principals, if a User has a Principal named "Admin" in appA and also in appB, it must be associated with both Principals (even the name being the same the Principals are related to the Application´s display-name (web.xml tag).

Table: jg_user

Field NameDescription
idthe User´s id. It will be used to make the link between the user and his credentials, also with his principals.

Table: jg_credential

Field NameDescription
idthe Credential´s id.
user_idThe User´s id wich owns this Credential.
public_visibilityIs this Credential visible to everyone or just to a Subject with proper access?
cred_nameThe Credential´s name. This field will identify the Credential.
cred_valueThe Credential´s value. This is the value of the Credential.

Table: jg_principal

Field NameDescription
idthe Principal´s id.
namethe Principal´s name.
application_namethe web.xml´s display-name tag value of the application where this Principal exists.
class_nameuntil now, is net.sf.jguard.principals.JGuardPrincipal, wich is the full qualified name of the class that will be instantiated by jGuard to store this Principal.

Table: jg_user_principal

Field NameDescription
user_idthe User´s id.
principal_idthe Principal´s id.

ER Diagram


Created by Inácio Ferrarini on 2006/09/02 23:16

jGuard team copyright 2004-2009