2
0
Эх сурвалжийг харах

- added missing tables credentials, domain_attrs, global_attrs, sd_attrs,
and user_attrs

Jan Janak 20 жил өмнө
parent
commit
0d6d410d67

+ 113 - 0
db/schema/credentials.xml

@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE table PUBLIC "-//iptel.org//DTD DBSchema V1.0//EN"
+  "http://iptel.org/dbschema/dtd/1.0/dbschema.dtd" [
+
+<!ENTITY % entities SYSTEM "entities.xml">
+%entities;
+
+]>
+
+<table xmlns:my="http://iptel.org/dbschema/mysql">
+    <name>credentials</name>
+    <version>6</version>
+    <description>
+	This table contains credentials assigned to subscribers. Each
+	subscriber can have zero or more credentials assigned. The table maps
+	credentials identified by username and realm to subscribers identified
+	by UUID. The contents of the table is used by digest authentication
+	modules of SER and by SERWeb.
+    </description>
+
+    <column id="credentials.username">
+	<name>auth_username</name>
+	<type>string</type>
+	<size>&user_len;</size>
+	<description>
+	    Credentials username. In digest authentication this is the username
+	    configured in user agents, in SERWeb this is the login username.
+	</description>
+    </column>
+
+    <column id="credentials.realm">
+	<name>realm</name>
+	<type>string</type>
+	<size>&realm_len;</size>
+	<description>
+	    Credentials realm. In digest authentication this is the value of
+	    digest realm attribute, in SERWeb this is the part after @ in login
+	    username.
+	</description>
+    </column>
+
+    <column>
+	<name>password</name>
+	<type>string</type>
+	<default></default>
+	<size>28</size>
+	<description>
+	    Plain text password of the subscriber, can be used for both digest
+	    (SER) and SERWeb authentication.
+	</description>
+    </column>
+
+    <column id="credentials.flags">
+	<name>flags</name>
+	<type>int</type>
+	<default>0</default>
+	<description>
+	    Flags that identify where this particular line of credentials can
+	    be used. DIGEST means that the credentials can be used in the
+	    digest authentication done by SER. SERWEB means that the
+	    credentials can be used in SERWeb login authentication.
+	    (ser_use, serweb_use, disabled).
+	</description>
+    </column>
+
+    <column>
+	<name>ha1</name>
+	<type>string</type>
+	<size>32</size>
+	<description>
+	    For digest authentication only. This is the H(A1) value calculated
+	    as per RFC2617. The value contains an MD5 hash of string
+	    concatenated from username,realm, and password: MD5(username:realm:password).
+	</description>
+    </column>
+
+    <column>
+	<name>ha1b</name>
+	<type>string</type>
+	<default></default>
+	<size>32</size>
+	<description>
+	    Similar to ha1, but username@domain is used as username. This is
+	    necessary for user agents that put username@domain into digest
+	    username attribute. This is often useful in multi-domain setups
+	    because it allows users to explicitly specify the domain they wish
+	    to sign in.
+	</description>
+    </column>
+
+    <column id="credentials.uid">
+	<name>uid</name>
+	<type>string</type>
+	<size>&id_len;</size>
+	<description>
+	    This is the UID (User ID) identifier of the subscriber the
+	    credentials are assigned to. Each uid can have multiple
+	    credentials assigned. UIDs of subscribers with no credentials
+	    assigned do not appear in this table.
+	</description>
+    </column>
+
+    <index>
+	<unique/>
+	<colref linkend="credentials.username"/>
+	<colref linkend="credentials.realm"/>
+    </index>
+
+    <index>
+	<name>uid</name>
+	<colref linkend="credentials.uid"/>
+    </index>
+</table>

+ 79 - 0
db/schema/domain_attrs.xml

@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE table PUBLIC "-//iptel.org//DTD DBSchema V1.0//EN"
+  "http://iptel.org/dbschema/dtd/1.0/dbschema.dtd" [
+
+<!ENTITY % entities SYSTEM "entities.xml">
+%entities;
+
+]>
+
+<table xmlns:my="http://iptel.org/dbschema/mysql">
+    <name>domain_attrs</name>
+    <version>1</version>
+    <description>
+	Each domain can have several attribute-value pairs assigned. They are
+	used to store additional information about the domain, such as digest
+	realm to be used when challenging users, language settings for the
+	domain, time zone, and so on. The AVPs (attribute-value pairs) are
+	stored in this table.
+    </description>
+
+    <column id="domain_attrs.did">
+	<name>did</name>
+	<type>string</type>
+	<size>&id_len;</size>
+	<null/>
+	<description>
+	    Unique identifier of the domain.
+	</description>
+    </column>
+
+    <column id="domain_attrs.name">
+	<name>name</name>
+	<type>string</type>
+	<size>&avp_name_len;</size>
+	<description>
+	    Name of the attribute.
+	</description>
+    </column>
+
+    <column>
+	<name>type</name>
+	<type>int</type>
+	<default>0</default>
+    </column>
+
+    <column id="domain_attrs.value">
+	<name>value</name>
+	<type>string</type>
+	<null/>
+	<size>&avp_val_len;</size>
+	<description>
+	    Value of the attribute.
+	</description>
+    </column>
+
+    <column id="domain_attrs.flags">
+	<name>flags</name>
+	<type>unsigned  int</type>
+	<default>0</default>
+	<description>
+	    Various flags (SER_LOAD and such).
+	</description>
+    </column>
+
+    <index>
+	<name>domain_attr_idx</name>
+	<unique/>
+	<colref linkend="domain_attrs.did"/>
+	<colref linkend="domain_attrs.name"/>
+	<colref linkend="domain_attrs.value"/>
+    </index>
+
+    <index>
+	<name>domain_did</name>
+	<colref linkend="domain_attrs.did"/>
+	<colref linkend="domain_attrs.flags"/>
+    </index>
+
+</table>

+ 57 - 0
db/schema/global_attrs.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE table PUBLIC "-//iptel.org//DTD DBSchema V1.0//EN"
+  "http://iptel.org/dbschema/dtd/1.0/dbschema.dtd" [
+
+<!ENTITY % entities SYSTEM "entities.xml">
+%entities;
+
+]>
+
+<table xmlns:my="http://iptel.org/dbschema/mysql">
+    <name>global_attrs</name>
+    <version>1</version>
+    <description>
+	Global attribute value pairs.
+    </description>
+
+    <column id="global_attrs.name">
+	<name>name</name>
+	<type>string</type>
+	<size>&avp_name_len;</size>
+	<description>
+	    Name of the attribute.
+	</description>
+    </column>
+
+    <column>
+	<name>type</name>
+	<type>int</type>
+	<default>0</default>
+    </column>
+
+    <column id="global_attrs.value">
+	<name>value</name>
+	<type>string</type>
+	<null/>
+	<size>&avp_val_len;</size>
+	<description>
+	    Value of the attribute.
+	</description>
+    </column>
+
+    <column id="global_attrs.flags">
+	<name>flags</name>
+	<type>unsigned int</type>
+	<default>0</default>
+	<description>
+	    Various flags (SER_LOAD and such).
+	</description>
+    </column>
+
+    <index>
+	<name>global_attrs_idx</name>
+	<unique/>
+	<colref linkend="global_attrs.name"/>
+	<colref linkend="global_attrs.value"/>
+    </index>
+</table>

+ 53 - 0
db/schema/sd_attrs.xml

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE table PUBLIC "-//iptel.org//DTD DBSchema V1.0//EN"
+  "http://iptel.org/dbschema/dtd/1.0/dbschema.dtd" [
+
+<!ENTITY % entities SYSTEM "entities.xml">
+%entities;
+
+]>
+
+<table>
+    <name>sd_attrs</name>
+    <version>1</version>
+
+    <column id="sdattrs.id">
+	<name>id</name>
+	<type>string</type>
+	<size>&id_len;</size>
+    </column>
+
+    <column id="sdattrs.name">
+	<name>name</name>
+	<type>string</type>
+	<size>&avp_name_len;</size>
+    </column>
+
+    <column id="sdattrs.value">
+	<name>value</name>
+	<type>string</type>
+	<null/>
+	<size>&avp_val_len;</size>
+    </column>
+
+    <column>
+	<name>type</name>
+	<type>int</type>
+	<default>0</default>
+    </column>
+
+    <column id="sdattrs.flags">
+	<name>flags</name>
+	<type>unsigned int</type>
+	<default>0</default>
+    </column>
+
+    <index>
+	<unique/>
+	<name>userattrs_idx</name>
+	<colref linkend="sdattrs.id"/>
+	<colref linkend="sdattrs.name"/>
+	<colref linkend="sdattrs.value"/>
+    </index>
+
+</table>

+ 56 - 0
db/schema/user_attrs.xml

@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE table PUBLIC "-//iptel.org//DTD DBSchema V1.0//EN"
+  "http://iptel.org/dbschema/dtd/1.0/dbschema.dtd" [
+
+<!ENTITY % entities SYSTEM "entities.xml">
+%entities;
+
+]>
+
+<table>
+    <name>user_attrs</name>
+    <version>3</version>
+
+    <column id="userattrs.uid">
+	<name>uid</name>
+	<type>string</type>
+	<size>&id_len;</size>
+    </column>
+
+    <column id="userattrs.name">
+	<name>name</name>
+	<type>string</type>
+	<size>&avp_name_len;</size>
+    </column>
+
+    <column id="userattrs.value">
+	<name>value</name>
+	<type>string</type>
+	<null/>
+	<size>&avp_val_len;</size>
+    </column>
+
+    <column>
+	<name>type</name>
+	<type>int</type>
+	<default>0</default>
+    </column>
+
+    <column id="userattrs.flags">
+	<name>flags</name>
+	<type>unsigned int</type>
+	<default>0</default>
+	<description>
+	    Various flags (SER_LOAD and such).
+	</description>
+    </column>
+
+    <index>
+	<unique/>
+	<name>userattrs_idx</name>
+	<colref linkend="userattrs.uid"/>
+	<colref linkend="userattrs.name"/>
+	<colref linkend="userattrs.value"/>
+    </index>
+
+</table>