2
0

uid_credentials.xml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE table PUBLIC "-//kamailio.org//DTD DBSchema V1.1//EN"
  3. "http://kamailio.org/pub/kamailio/dbschema/dtd/1.1/dbschema.dtd" [
  4. <!ENTITY % entities SYSTEM "entities.xml">
  5. %entities;
  6. ]>
  7. <table id="uid_credentials" xmlns:db="http://docbook.org/ns/docbook">
  8. <name>uid_credentials</name>
  9. <version>7</version>
  10. <type db="mysql">&MYSQL_TABLE_TYPE;</type>
  11. <description>
  12. Credentials table maps credentials, identified by username and realm to
  13. users identified by uid. Credentials can be used in digest authentication
  14. in SIP and/or authentication in SERWeb. In most situations credentials for
  15. digest authentication and SERWeb authentication are same. There are cases,
  16. however, where seperate credentials for SERWeb and separate credentials
  17. for digest authentication may be needed. One such example are setups where
  18. subscribers get HW user agents with locked configuration and thay do not
  19. know the password and are not allowed to change it. If they should be able
  20. to authenticate in SERWeb then they need different credentials with
  21. different password.
  22. </description>
  23. <column id="id">
  24. <name>id</name>
  25. <type>unsigned int</type>
  26. <size>&table_id_len;</size>
  27. <autoincrement/>
  28. <primary/>
  29. <type db="dbtext">int,auto</type>
  30. <description>Unique ID</description>
  31. </column>
  32. <column id="uid_credentials.auth_username">
  33. <name>auth_username</name>
  34. <type>string</type>
  35. <size>&user_len;</size>
  36. <description>
  37. Credentials username. In digest authentication this is the username
  38. configured in user agents, in SERWeb this is the login username.
  39. </description>
  40. </column>
  41. <column id="uid_credentials.did">
  42. <name>did</name>
  43. <type>string</type>
  44. <size>&id_len;</size>
  45. <default>_default</default>
  46. <description>
  47. DID of the virtual domain the username belongs to.
  48. </description>
  49. </column>
  50. <column id="uid_credentials.realm">
  51. <name>realm</name>
  52. <type>string</type>
  53. <size>&realm_len;</size>
  54. <description>
  55. Credentials realm. In digest authentication this is the value of digest
  56. realm attribute, in SERWeb this is the part after @ in login username.
  57. </description>
  58. </column>
  59. <column>
  60. <name>password</name>
  61. <type>string</type>
  62. <default></default>
  63. <size>28</size>
  64. <description>
  65. Plain text password of the subscriber, can be used for both digest (SER)
  66. and SERWeb authentication.
  67. </description>
  68. </column>
  69. <column id="uid_credentials.flags">
  70. <name>flags</name>
  71. <type>int</type>
  72. <default>0</default>
  73. <description>
  74. Flags that identify where this particular instance of credentials can be
  75. used. If FOR_SER flag is set then the credentials can be used in digest
  76. authentication in SIP. If FOR_SERWEB is set then the credentials can be
  77. used for authentication in SERWeb. Meaning of flags is summarized in the
  78. table below.
  79. <db:note>
  80. <db:simpara>
  81. Note that several flags below have no meaning in this table and are
  82. only presented for completeness, because the flags column has
  83. identical meaning of flags across most tables in the database.
  84. </db:simpara>
  85. </db:note>
  86. <db:table><db:title>possible credentials flags</db:title>
  87. <db:tgroup cols="4">
  88. <db:thead>
  89. <db:row>
  90. <db:entry>Bit</db:entry>
  91. <db:entry>Hex value</db:entry>
  92. <db:entry>Flag</db:entry>
  93. <db:entry>Description</db:entry>
  94. </db:row>
  95. </db:thead>
  96. <db:tbody>
  97. <db:row>
  98. <db:entry>0</db:entry>
  99. <db:entry>0x00000001</db:entry>
  100. <db:entry>FOR_SER</db:entry>
  101. <db:entry>
  102. If set then SER will load the row (not applicable in this
  103. table).
  104. </db:entry>
  105. </db:row>
  106. <db:row>
  107. <db:entry>1</db:entry>
  108. <db:entry>0x00000002</db:entry>
  109. <db:entry>DISABLED</db:entry>
  110. <db:entry>
  111. The data represented by the row is temporarily disabled, which
  112. means it stays in the database but no applications use it.
  113. </db:entry>
  114. </db:row>
  115. <db:row>
  116. <db:entry>2</db:entry>
  117. <db:entry>0x00000004</db:entry>
  118. <db:entry>CANONICAL</db:entry>
  119. <db:entry>
  120. The URI or domain name is canonical. When displaying the URI
  121. of the user or name of a domain then this entry should be
  122. used. Not applicable in this table.
  123. </db:entry>
  124. </db:row>
  125. <db:row>
  126. <db:entry>3</db:entry>
  127. <db:entry>0x00000008</db:entry>
  128. <db:entry>ALLOWED_TO</db:entry>
  129. <db:entry>
  130. The URI represented by this row can be used in The Request-URI
  131. or To header field. In other words the user will be reachable
  132. under this URI and can use it as an alias. Not applicable in
  133. this table.
  134. </db:entry>
  135. </db:row>
  136. <db:row>
  137. <db:entry>4</db:entry>
  138. <db:entry>0x00000010</db:entry>
  139. <db:entry>ALLOWED_FROM</db:entry>
  140. <db:entry>
  141. The user identified by uid can use this URI in From header
  142. field. Not applicable in this table.
  143. </db:entry>
  144. </db:row>
  145. <db:row>
  146. <db:entry>5</db:entry>
  147. <db:entry>0x00000020</db:entry>
  148. <db:entry>FOR_SERWEB</db:entry>
  149. <db:entry>
  150. The data represented by the row is for SERWeb. This is
  151. currently used in credentials table only where the flags
  152. allows to keep different credentials for digest authentication
  153. in SIP and for SERWeb authentication. Not applicable in this
  154. table.
  155. </db:entry>
  156. </db:row>
  157. <db:row>
  158. <db:entry>6</db:entry>
  159. <db:entry>0x00000040</db:entry>
  160. <db:entry>PENDING</db:entry>
  161. <db:entry>
  162. The account owning the piece of data has not been activated
  163. yet. Not applicable in this table, this is mainly used in
  164. credentials table.
  165. </db:entry>
  166. </db:row>
  167. <db:row>
  168. <db:entry>7</db:entry>
  169. <db:entry>0x00000100</db:entry>
  170. <db:entry>DELETED</db:entry>
  171. <db:entry>
  172. The row has been scheduled for deletion.
  173. </db:entry>
  174. </db:row>
  175. <db:row>
  176. <db:entry>8</db:entry>
  177. <db:entry>0x00000200</db:entry>
  178. <db:entry>CALLER_DELETED</db:entry>
  179. <db:entry>
  180. The accounting record has been scheduled for deletion by the
  181. caller. The row can be deleted once both the caller and callee
  182. schedule the record for deletion. A single record can be
  183. shared by two users and thus both of them must schedule it for
  184. deletion before it can be physically deleted.
  185. </db:entry>
  186. </db:row>
  187. <db:row>
  188. <db:entry>9</db:entry>
  189. <db:entry>0x00000400</db:entry>
  190. <db:entry>CALLEE_DELETED</db:entry>
  191. <db:entry>
  192. The accounting record has been scheduled for deletion by the
  193. callee. The row can be deleted once both the caller and callee
  194. schedule the record for deletion. A single record can be
  195. shared by two users and thus both of them must schedule it for
  196. deletion before it can be physically deleted.
  197. </db:entry>
  198. </db:row>
  199. </db:tbody>
  200. </db:tgroup>
  201. </db:table>
  202. </description>
  203. </column>
  204. <column>
  205. <name>ha1</name>
  206. <type>string</type>
  207. <size>32</size>
  208. <description>
  209. For digest authentication only. This is the H(A1) value calculated as
  210. per RFC2617. The value contains an MD5 hash of string concatenated from
  211. username,realm, and password: MD5(username:realm:password).
  212. </description>
  213. </column>
  214. <column>
  215. <name>ha1b</name>
  216. <type>string</type>
  217. <default></default>
  218. <size>32</size>
  219. <description>
  220. Similar to ha1, but username@domain is used as username. This is
  221. necessary for user agents that put username@domain into digest username
  222. attribute. This is often useful in multi-domain setups because it allows
  223. users to explicitly specify the domain they wish to sign in.
  224. </description>
  225. </column>
  226. <column id="uid_credentials.uid">
  227. <name>uid</name>
  228. <name db="oracle">uuid</name>
  229. <type>string</type>
  230. <size>&id_len;</size>
  231. <description>
  232. This is the UID (User ID) identifier of the user the credentials are
  233. assigned to. Each uid can have multiple credentials assigned. UIDs of
  234. subscribers with no credentials assigned do not appear in this table.
  235. </description>
  236. </column>
  237. <index>
  238. <name>cred_idx</name>
  239. <colref linkend="uid_credentials.auth_username"/>
  240. <colref linkend="uid_credentials.did"/>
  241. </index>
  242. <index>
  243. <name>uid</name>
  244. <name db="oracle">uuid</name>
  245. <colref linkend="uid_credentials.uid"/>
  246. </index>
  247. <index>
  248. <name>did_idx</name>
  249. <colref linkend="uid_credentials.did"/>
  250. </index>
  251. <index>
  252. <name>realm_idx</name>
  253. <colref linkend="uid_credentials.realm"/>
  254. </index>
  255. </table>