Background technology
XML (extend markup language) document management (XDM) system is the utility engines of multiple business, can store and manage the data of various engines.The XDM system mainly comprises following functional entity:
1.XDM client (XDMC): the XDM client provides the entity that inserts different XDM servers.The XDM client may be terminal or server entity.The XDM client is to insert the entity of XCAP resource in the XDM server.The element and the attribute of the corresponding XML document of XCAP resource.The XCAP resource is discerned by a HTTP URI.The XDM client is operated by HTTP and is used XML document.The XDM client should be constructed RequestedURI based on the using method of using.Can carry out following operation: create or replace a document; Delete a document; Obtain a document; Create or replace an element; Delete an element; Obtain an element; Create or replace an attribute; Delete an attribute; Obtain an attribute.
2. share XDM server (XDMS): sharing the XDM server provides authentication, management and informing function.Share the XDM server and support the URI tabulation.The URI tabulation comprises group, acceptance tabulation, the refusal tabulation of being reused by the different business engine.
3. the specific functive of engine comprises:
1) the specific XDM server of engine, the specific XDM server of engine mainly provides following function:
Authentication to SIP or XCAP request;
The XML document that management engine is specific;
Change notice to a plurality of documents in the specific XDM server of engine is carried out polymerization;
The change of the specific XML document of this type of engine of storing in the network is notified to the subscriber.
2) engine particular server is the service server of each service enabler.
4. Aggregation Proxy: the XDM client realizes inserting the contact point of the XML document on the XDM server at subscriber equipment, is referred to as Aggregation Proxy.Aggregation Proxy is carried out following function:
1) execution is to the authentication of XDM client.
2) route XCAP asks correct XDM server.
3) support to charge.(optional)
4) support compression/decompression at wave point.
5.SIP/IP being server, core:SIP/IP core for example acts on behalf of internet with register machine etc., for the XDM document file management system provides multiple service, and route for example, authentication, compression etc.
In the prior art scheme, being provided with of configuration information must be XDM client itself, do not have the mechanism of entrusting.As shown in fig. 1, the system that is provided with of typical configuration information mainly contains with lower device and forms:
A) XDM client: be the entity that inserts different XDM servers, may be terminal or server.When the XDM client is terminal by Aggregation Proxy and XDM server interaction; Otherwise the XDM client is direct and the XDM server interaction.The XDM client is used the corresponding XML document on XCAP consultative management storage and certain XDM server.
B) Aggregation Proxy: when the XDM client was the subscriber equipment terminal, the XCAP of XDM client request was transmitted to appropriate XDM server by Aggregation Proxy, and the major function of Aggregation Proxy is a route, authentication, or charge compression.
C) XDM server: the XDM server is a plurality of XDM client stores and management XML document, and for the client of having subscribed to some document change provides notification message when respective document changes, the XDM server also provides authentication functions.
The existing shortcoming of this system is, the XDM client can only be operated by itself when it is stored in XML document on the XDM server in operation, and when the inconvenient own operation of XDM client, can not entrust other entities is its operation, makes troubles to the user.
Need a kind of agency mechanism under a lot of situations but have, carry out to other clients its operation agent such as storage administration, promptly allow other XDM clients be its storage or manage its XML document XML document to allow certain client.And, in the prior art not can to XML document conduct interviews control mechanism.
Embodiment
Fig. 2 is the schematic diagram of the XML document management system of one embodiment of the present of invention.
As shown in the figure, this XML document management system comprises XML document management (XDMC) agency, Aggregation Proxy and XML document management server (XDMS), also have to entrust at XDMS end and check and processing unit, between XDMC agency and the Aggregation Proxy and the subscribing message between Aggregation Proxy and trust inspection and processing unit and the XDMS by SIP/IP Core realization.
The XDMC agency sends XCAP and asks to Aggregation Proxy, Aggregation Proxy is transmitted to XDMS with request, whether trust inspection among the XDMS and processing unit verifying XML document operation requests are the authorization trust formula, and the XML document bookkeeping that execution XML document administrative client is asked is handled accordingly, send acknowledge message by XDMS to Aggregation Proxy, Aggregation Proxy returns to the XDMC agency with acknowledge message.
The XML document bookkeeping entrusts inspection and processing unit to comprise: entrust and check module, be used to check whether the XML document bookkeeping that the XML document administrative client is asked is way of bailment; And authorization handler module, be used to judge whether the way of bailment of entrusting the inspection module to determine is the way of bailment of mandate, and when way of bailment is the way of bailment of authorizing, the cura specialis of XML document specific part operated according to regular execution of delegable.
Above-mentioned document file management system can also comprise XML document owner client, and this XML document owner client is a kind of client of XML document management, and it is the actual owner of XML document, is connected with XDMS.XML document owner's client is formulated the delegable rule, and delegable rule document is sent to XDMS, and the delegable rule authorizes the XDMC agency to carry out the regulation bookkeeping of the specific part of XML document.
In addition, delegable rule document also can be formulated and be stored by XDMS, operation.
The delegable rule comprises: requestor's identification field is used for the sender of the pairing XML management operation request of mark rule; The operand field is used to identify XML document or the element-specific wherein or the attribute of described XML bookkeeping correspondence; The action type field is used to identify the type of described XML bookkeeping; Action field is used for the action that mark rule coupling back server is taked.
XDM delegable rule is kept in the XML document, comprises several rules in the document, and which operation each rule declaration who can commission order person carry out to which kind of or which element in the respective document.
The form of XDM delegable rule document can adopt and the similar framework of current mechanism framework (referring to list of references [COMMONPOL]).Document comprises a root element<ruleset 〉, root element<ruleset comprise a rule of some expressions<rule daughter element, each<rule element comprises three element<condition,<action 〉,<transformation.Wherein<and condition〉element determines the effective term of this rule,<action〉element determines the action taked when this rule comes into force, for example allow, refusal, wait acknowledge etc.,<transformation〉expression is to information processing, is used for specifying the content of the XML document of access control here.
<condition〉element mainly comprises:
A) Identity: user identity sign, for example sip:zhangsan@huawei.com
B) Domain: territory, Li Ru @example.com
C) Validity: the term of validity, for example 2005-8-18:00~2005-8-9 18:00
D) Sphere: position, home for example, work
Right<action〉expansion of element is as follows:
<action〉element a kind of including but not limited in following at least:
<get〉element, definition is to the action of GET operation;
<put〉element, definition is to the action of PUT operation;
<delete〉element, definition is to the action of DELETE operation;
<post〉element, definition is to the action of POST operation;
These actions can comprise: " allow ", and " deny ", " confirm ", expression allows respectively, refuses and need to confirm.
<transformation〉element comprises some<xpath〉daughter element,<xpath〉value of element is an XPATH expression formula, these<xpath〉be the relation of logic OR (OR) between element, specify the part of the XML document that the visitor can visit.
The authorization rule document can also be another kind of structure in addition:
Similar [COMMON_POLICY], document comprises<ruleset〉root element, wherein comprise some<rule〉element.
<rule〉element comprises<condition 〉,<action 〉,<transformation〉three daughter elements.
On this basis, present embodiment is at<condition〉increase daughter element<method in the element 〉,<method〉value of element includes but not limited to one of GET, PUT, DELETE at least; At<transformation〉increase daughter element<xpath in the element 〉, any part of the XML that expression this rule is controlled, its value is an XPATH expression formula,<transformation〉element can have several<xpath〉daughter element, these<xpath〉union of part of the described XML document of element expressed which part of regular control XML document.
Fig. 3 is the flow chart that the XML document mandatory administration of the XML document management method of an alternative embodiment of the invention is operated.
As shown in Figure 3, after XDM S receives the XDM operation requests, carrying out way of bailment and judge, check whether sender of the message's sign is marking matched with the owner of operated document, if coupling then is a general fashion, otherwise is way of bailment.If be general fashion, then according to the flow processing of prior art; If be way of bailment, then obtain XDM delegable rule, judge whether the XDM operation of on commission person's request satisfies the effective term of delegable rule.Be the authorization trust formula if this XDM operation requests satisfies rule, XDMS carries out the corresponding mandatory administration operation of authorizing according to this XDM operation requests.
Illustrate the situation of describing various rules in the XDM delegable document below:
The identify label of supposing principal A is: sip:userA@example.com, on commission person B is designated sip:userB@example.com.
Suppose to have principal A in XDMS, to store following XML document:
http://xcap.example.com/services/resource-lists/users/sip:userA@example.com/friends.xml
<?xml?version=″1.0″encoding=″UTF-8″?>
<resource-lists?xmlns=″urn:ietf:params:xml:ns:resource-lists″>
<list?name=″My-Close-friends″>
<entry?uri=″sip:Andy@example.com″>
<display-name>Andy</display-name></entry>
<entry?uri=″sip:Simon@example.com″>
<display-name>Simon</display-name></entry></list><list?name=″My_Middle_School_Classmates″>
<entry?uri=″sip:friendl@example.com″>
<display-name>Friend1</display-name></entry>
<entry?uri=″sip:friend2@example.com″>
<display-name>Friend1</display-name></entry>
<entry?uri=″sip:friend3@example.com″>
<display-name>Friend1</display-name></entry> </list></resource-lists>
Two tabulations of principal A have been described, one " My-Close-Friends " by name, one " My-Middle-School-Classmates " by name in the top XML document.Suppose that A allows on commission person B to read or revise content in the tabulation " My-Middle-School-Classmates ".Then:
1)<and condition〉daughter element<identity in the element〉be:
<identity>
<one?id=″userB@example.com″scheme=″sip″/>
</identity>
2)<and transformation〉comprise following daughter element in the element
<xpath>
/resource-lists/list[@name=″My_Middle_School_Classmates″]
</xpath>
3)<and action〉element is:
<operation>
<get>allow</get>
<put>deny</put>
<delete>deny</delete>
</operation>
Corresponding XDM delegable rule is as follows:
At<condition〉comprise the sign of user B in the element, illustrate that rule is suitable during for B the sender of the message;
At<action〉comprise four daughter elements in the element, first explanation allows to read (GET) operation, and second explanation forbids writing (PUT) operation, and deletion (DELETE) operation is forbidden in the 3rd explanation, and the POST operation is forbidden in the 4th explanation;
At<transformation〉comprise one<xpath in the element〉element, specifying this rule to be applicable to which part of the corresponding XML document of operation with the XPATH expression formula, here is the operation that is applicable to the tabulation of " My_Middle_School_Classmates " by name in the corresponding XML document.
http://xcaap.example.com/services/resource-lists/users/sip:userA@example.com/xdm_delegation_rules.xml
<?xml?version=″1.0″encoding=″UTF-8″?>
<ruleset?xmlns=″urn:ietf:params:xml:ns:common-policy″>
<rule?id=″f3g44r3″>
<condition>
<identity>
<one?id=″userB@example.com″scheme=″sip″/>
</identity>
</condition>
<action>
<get>allow</get>
<put>deny</put>
<delete>deny</delete>
<post>deny</post>
</action>
<transformation>
<xpath>/resource-lists/list[@name=″My_Middle_School_Classmates″]
</xpath>
</transtormation>
</rule>
</ruleset>
In way of bailment is judged, can also be by in message, increasing an attribute field, showing whether be way of bailment.Attribute field is placed in the message header, entrusts the inspection processing module to obtain this attribute field when receiving message, judges whether to be way of bailment in view of the above.
Fig. 4 is the flow chart that the way of bailment of the XML document management method of embodiment among Fig. 3 is checked.
As shown in Figure 4, its process comprises the User Identity that obtains the message publisher; Obtain operated document owner sign; If above-mentioned two kinds marking matched, then be general fashion, otherwise be way of bailment.
In addition, in on commission person's qualification is judged, can also adopt in such a way: the information that the XML document management server is relevant with the identity characteristic of XML document administrative client sends to XML document owner client-requested and confirms, XML document owner's client returns confirmation to the XML document management server after confirming, if confirm that the result is for authorizing, then the XML document administrative client is the trust XML document administrative client of mandate, otherwise is unauthorized trust XML document administrative client.
XDMS can also judge whether the XML document administrative client is this XML document owner, if this XML document administrative client is this XML document owner, then carries out XML document bookkeeping general in the prior art, is not described specifically here.If the XML document administrative client is neither the XML document owner, unauthorized again mandatory administration person then refuses the bookkeeping of this XML document administrative client to XML document.
In the such scheme, if not explanation, then be that to be arranged in subscriber equipment be example for XDMC with consigner or trustee.In addition, no matter consigner or trustee can directly not send request to corresponding XDMS by Aggregation Proxy when its XDMC is arranged in application server; If then can transmit request to corresponding XDMS when its XDMC is arranged in user terminal by Aggregation Proxy.
Fig. 5 is the message flow chart of the XML document management method of the third embodiment of the present invention.
User A entrusts the alumnus records server S to safeguard good friend's information for it.When classmate B of user A added in the alumnus records of A place class, server was safeguarded the buddy list that is stored among certain XDMS for user A, in user B adding buddy list.
(1) user A is provided with the XDM delegable rule of alumnus records server S by the XCAP agreement in the XDMS of its storage buddy list, allows the alumnus records server to increase the good friend in its buddy list " MyClassmates ".
(2) after user B added the alumnus records of A place class, for user B being added the buddy list of access customer A, the alumnus records server S sent the XDM operation requests to this XDMS.
(3) this XDMS carries out aforementioned way of bailment judgement flow process, and obtaining the message publisher from message is the sign of alumnus records server S and the sign of operand owner A, and compares, and is defined as way of bailment according to comparative result.
(4) this XDMS is according to the message publisher's sign that obtains from message, operand and action type, the XDM authorization rule that contrast A is stored among this XDMS determines that alumnus records server S authorized agency user A carries out this XDM operation, and increasing user B then in the buddy list of user A is the good friend.
In the step (1), the message when user A is provided with XDM delegable rule on corresponding XDMS below corresponding XDMS sends:
Wherein<and cr:rule id=ck81〉element illustrates a rule of definition, and three daughter elements wherein:
<cr:conditions〉condition of application of rules is described, promptly as message request person be<cr:id be suitable for this rule during the alumnus records server that indicates in the element.
<cr:action〉when element illustrates application of rules, XDM server corresponding action, wherein, first daughter element explanation allows to carry out the GET operation, second daughter element explanation allows to carry out the PUT operation, and the 3rd daughter element explanation do not allow to carry out the DELETE operation; What need explanation a bit is, does not specify here whether to allow the POST operation, and in the reality, the XDM server can have the action of acquiescence, and for refusal, promptly for undefined operation, the server refusal is carried out at this default-action commonly used.
<cr:transformation〉operand of the described operation of element explanation this rule, be being called in the corresponding XML document at this " My_Middle_School_Classmates " tabulation.
PUT
http://xcap.example.com/services/shared-xdms/users/sip:userA@example.com/xdm_delegation_rules.xml?HTTP/1.1
…
Content-Type:application/auth-policy+xml
Content-Length:(…)
<?xml?version=″1.0″encoding=″UTF-8″?>
<cr:ruleset
xmlns:op=″urm:oma:params:xml:ns:pres-riles″
xmlns:pr=″urn:ietf:params:xml:ns:pres-riles″
xmlns:cr=″urn:ietf:params:xml:ns:common-policy″
xmlns:xsi=″http://www.w3.org/2001/XMLSchema-instance″>
<cr:rule?id=″ck81″>
<cr:conditions>
<cr:identity>
<cr:id>sip:alumin@exampleservice.com</cr:id>
</cr:identity>
</cr:conditions>
<cr:actions>
<get>allow</get>
<put>allow></put>
<delete>deny</delete>
</cr:actions>
<cr:transformations><xpath>/resource-lists/list[@name=”My_Middle_School_Classmates”]</xpath>
</cr:transformations>
</cr:rule>
</cr:ruleset>
The sip address of supposing the alumnus records server S is: sip:alumni@exampleservice.com, the XDM delegable document HTTP URI of user A is http://xcap.example.com/services/shared-xdms/users/sip:userA@ex ample.com/xdm_delegation_auth.xml.
Wherein:
Sip:alumni@exampleservice.com is the sign of authorization object, represents the access control of this authorization rule definition to the alumnus records server;
<get〉allow</get 〉, expression allows the alumnus records server to read,<put〉allow</put〉represent that permission alumnus records server execution PUT operates<delete〉deny</delete〉represent not allow alumnus records server execution DELETE to operate;
<xpath 〉/resource-lists/list[@name=" My_Middle_School_Classmates "]</xpath〉expression permission alumnus records server operation My_Middel_School_Classmates tabulation.
After corresponding XDMS receives this message, create XDM delegable rule.
The message that sends to corresponding XDMS when wherein the alumnus records server increases user B in the step 5) in the buddy list of A is:
PUThttp://xcap.example.com/services/shared-lists/users/sip:userA@example.com/friends.xml/~~/resource-lists/list[@name=″My_friends″]/entry[@uri=″sip:friend2@example.com″]HTTP/1.1
…
Content-Type:application/xcap-el+xml
Content-Length:(…)
<?xml?version=″1.0″encoding=″UTF-8″?>
<entry?uri=″sip:friend2@example.com″>
<display-name>Friend2</display-name>
</entry>
From then on trust inspection among the XDMS and processing module obtain message publisher's sign " sip:alumni@exampleservice.com " in the message, and operand owner's sign " sip:userA@example.com ", relatively two identify difference as a result, and judging this XDM operation requests is way of bailment.With reference to the XDM delegable rule that is provided with in the step 1), determine that the alumnus records server S has the mandate of carrying out this operation then, carry out this XDM operation by XDMS then.
The fourth embodiment of the present invention is a kind of XML document access control method, comprising:
Steps A: whether the XML document access client of judging request visit XML document satisfies the XML document access consideration, if then carry out (2), otherwise withdraws from this processing procedure;
Step B: the accessing operation that the XML document access client that satisfies the XML document access consideration is according to the rules carried out to the XML document specific part, carry out the XML document accessing operation of XML document access client to the regulation of the specific part request execution of XML document.
In the steps A, can be according to the mode of the foregoing description, the identify label of XML document bookkeeping client is compared with the XML document access client identify label of being scheduled to of satisfying the XML document access consideration, the XML document access client satisfies the XML document access consideration if the two mates then, otherwise the XML document access client does not satisfy the XML document access consideration.The predetermined XML document access client identify label of satisfying the XML document access consideration can be the owner's self of this XML document identify label, also can be other the predetermined identify label that can visit the access client of this XML document.When the owner's self of XML document access client and this XML document identify label coupling, then represent the owner self of this XML document access client for this XML document, this moment, this XML document access client had bigger accessing operation authority, can carry out the accessing operation of XML document according to general XML document access process, also can be according to the accessing operation to this XML document of this method regulation.When the identify label of XML document access client and other predetermined can be visited the identify label coupling of access client of this XML document, represent that then this XML document access client can be to the conduct interviews client of operation of this XML document for what entrust.
In addition, in steps A, can also adopt the mode of instant affirmation, promptly, request is sent to XML document owner client and confirms the conduct interviews relevant information of XML document access client of operation of XML document, and receive the affirmation information that XML document owner client is returned, if confirm that the result satisfies the XML document access consideration for this XML document access client, then the XML document access client satisfies the XML document access consideration, otherwise does not satisfy the XML document access consideration.By prior art and with reference to the foregoing description, this process is easy to realize, repeats no more here.
XML document access consideration in the steps A comprises at least and one of being not limited in following: the identity information condition of XML document access client; The term of validity condition of regulation; Requestor's positional information condition.Such as, the Identity that lists among above-mentioned first embodiment, Domain, Validity, Sphere etc.
Regulation described in the step B comprises: can the conduct interviews specific part of XML document of operation of the XML document access client that satisfies the XML document access consideration.The specific part of XML document can XCAP URI sign.The accessing operation that can carry out can be read operation HTTP GET, write operation HTTP PUT, and deletion action HTTP DELETE, search operaqtion HTTP POST, etc.
Can also comprise at step B: execution result information " 200 OK " is sent the XML document access client.
The foregoing description just is used to illustrate concrete execution mode of the present invention, is not the restriction that is used for protection scope of the present invention.Those skilled in the art can be according to basic thought of the present invention or foregoing, and makes various modification or improvement, as long as it falls in the determined protection range of claims of the present invention or its be equal to, all should be contained by the present invention.