JdbcAuthenticationManagerDataModel
Description
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
Tables
| Name | Description |
|---|
| jg_user | |
| jg_credential | Stores all Credential (information related to a specific user), like login, password, security id, born date, mother´s maiden name, etc. |
| jg_principal | Stores all the Principals (User´s Roles and User´s Responsibilities - it´s called Principal to keep compatibility with JAAS nomeclature). |
| jg_user_principal | Stores 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 Name | Description |
|---|
| id | the 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 Name | Description |
|---|
| id | the Credential´s id. |
| user_id | The User´s id wich owns this Credential. |
| public_visibility | Is this Credential visible to everyone or just to a Subject with proper access? |
| cred_name | The Credential´s name. This field will identify the Credential. |
| cred_value | The Credential´s value. This is the value of the Credential. |
Table: jg_principal
| Field Name | Description |
|---|
| id | the Principal´s id. |
| name | the Principal´s name. |
| application_name | the web.xml´s display-name tag value of the application where this Principal exists. |
| class_name | until 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 Name | Description |
|---|
| user_id | the User´s id. |
| principal_id | the Principal´s id. |
ER Diagram