WO2019196819A1 - 一种服务api调用方法和相关装置 - Google Patents

一种服务api调用方法和相关装置 Download PDF

Info

Publication number
WO2019196819A1
WO2019196819A1 PCT/CN2019/081861 CN2019081861W WO2019196819A1 WO 2019196819 A1 WO2019196819 A1 WO 2019196819A1 CN 2019081861 W CN2019081861 W CN 2019081861W WO 2019196819 A1 WO2019196819 A1 WO 2019196819A1
Authority
WO
WIPO (PCT)
Prior art keywords
api
security method
caller
function entity
open function
Prior art date
Application number
PCT/CN2019/081861
Other languages
English (en)
French (fr)
Inventor
王勇
潘凯
葛翠丽
陈璟
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to BR112020019925-7A priority Critical patent/BR112020019925A2/pt
Priority to KR1020207032274A priority patent/KR102488798B1/ko
Priority to AU2019251158A priority patent/AU2019251158B2/en
Priority to JP2020555187A priority patent/JP7100153B2/ja
Priority to EP19785473.0A priority patent/EP3779696A4/en
Publication of WO2019196819A1 publication Critical patent/WO2019196819A1/zh
Priority to US17/066,902 priority patent/US11989284B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/629Protecting access to data via a platform, e.g. using keys or access control rules to features or functions of an application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • G06F21/54Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow by adding security routines or objects to programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/133Protocols for remote procedure calls [RPC]

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a service API calling method and related apparatus.
  • the 3rd Generation Partnership Project (3GPP) defines a variety of northbound application programming interface (API) related specifications. To avoid duplication and inconsistency between different API specifications, 3GPP is considering developing a common API framework (CAPIF) that includes common features that apply to all Northbound APIs. Among them, CAPIF is generally deployed in the carrier network.
  • API application programming interface
  • Figure 1 is a schematic diagram of a CAPIF-based architecture.
  • the architecture shown in Figure 1 mainly includes the following network elements:
  • API invoker usually provided by a third-party application provider that has a service agreement with the carrier's network.
  • Service API the interface that provides services to the API invoker.
  • the CAPIF core function entity is the central storage for all policies of the service API and the center of API invoker and service API authentication and authorization.
  • the CAPIF API is an interface that provides the API invoker with a CAPIF core function entry.
  • the API exposing function (AEF) entity is an entry point for the service provider to open the service.
  • the API invoker can use the service provided by the service provider through the AEF entity.
  • the API publishing function entity may publish the service API information to the CAPIF core function entity, so that the API invoker finds the service API information in the CAPIF core function entity.
  • An API management function entity that performs management of the service API, such as monitoring the status of the service API, recording call information, and the like.
  • a public land mobile network trust domain (PLMN trust domain) represents an area trusted by a public land mobile network.
  • the API provider domain represents an area in which the API provider is located.
  • connection relationship between the foregoing network elements is as follows:
  • the interface between the API caller outside the PLMN trust domain and the CAPIF core function entity is the CAPIF-1e interface, and the interface between the AEF entity and the AEF entity is the CAPIF-2e interface.
  • the interface between the API caller in the PLMN trust domain and the CAPIF core function entity is a CAPIF-1 interface, and the interface between the AEF entity and the AEF entity is a CAPIF-2 interface.
  • the interface between the CAPIF core function entity and the AEF entity is a CAPIF-3 interface, and the interface between the API publishing function entity is a CAPIF-4 interface, and the interface between the API management function and the API management function is a CAPIF-5 interface.
  • the API invoker and the CAPIF core function entity negotiate a security method used between the API invoker and the AEF entity before calling the service API. After that, the API invoker will use the security method to call the service API to the AEF entity when calling the service API.
  • the existing method does not consider the update of the security method. If the security method is updated, the API invoker still uses the original security method to call the service API, and the service API cannot be successfully invoked.
  • the embodiment of the present application provides a service API calling method and related apparatus to avoid a service API call failure due to a security method mismatch.
  • an embodiment of the present application provides a method for calling a service API, and a security method applied to an API open function entity is updated from a new security method to a new security method, where the security method of the API open function entity is used.
  • Communicating between the API open function entity and the caller the method comprising: the caller acquiring a new security method of the API open function entity; the caller using the new security method to the API
  • the open function entity sends a first call request, the first call request including a name of a service API, the first call request being used to invoke the service API.
  • the security method of the API open function entity is used for communication between the API open function entity and the caller, and may include: the security method of the API open function entity is used between the API open function entity and the caller. Certification, authorization and protection.
  • the caller when the security method of the API open function entity is updated, the caller can obtain a new security method of the API open function entity in time, and use the new security method to open the function call to the API.
  • Service API to avoid service API calls failing due to security method mismatch.
  • the caller can obtain a new security method of the API open function entity by: first, the caller receives the new one from a generic API framework CAPIF core functional entity. Security method; method 2, the caller receives the new security method from the API open function entity.
  • the caller may also request the CAPIF core functional entity before the caller receives the new security method from the generic API framework CAPIF core functional entity. Describe new security methods. For example, the caller can send an acquisition request to the CAPIF core functional entity for requesting the new security method.
  • the caller may also send a security method negotiation request to the API open function entity before the caller acquires a new security method of the API open function entity.
  • the security method negotiation request includes a list of security methods supported by the caller, the security method list including the new security method; correspondingly, the caller may receive a security method from the API open function entity Negotiating the response, the security method negotiation response includes the new security method.
  • the caller may also use the old security method to open the function to the API before the caller obtains a new security method of the API open function entity.
  • the entity sends a second call request, where the second call request is used to invoke the service API; and receives a response message of the second call request from the API open function entity, where the response message of the second call request includes A cause value indicating that the service API call failed because the security method does not match.
  • the caller before the caller receives the new security method from the API open function entity, the caller can also use the old security method to the The API open function sends a third call request, where the third call request is used to invoke the service API; correspondingly, the caller can receive the response message of the third call request from the API open function entity, where The response message of the third call request includes the new security method and a cause value, the cause value being used to indicate that the service API call failed because the security method does not match.
  • the caller may further receive a response message of the first call request from the API open function entity, where the response message of the first call request is used to indicate that the service API call is successful.
  • the embodiment of the present application provides another calling method of a service application programming interface API, and the security method applied to the API open function entity is updated from the old security method to a new security method, wherein the API open function An entity security method is used for communication between the API open function entity and the caller, the method comprising: a generic API framework CAPIF core function entity receiving an update request of the API open function from an API publishing function entity, the update request A new security method including the API open function; the CAPIF core functional entity stores the new security method.
  • the security method of the API open function entity is used for communication between the API open function entity and the caller, and may include: the security method of the API open function entity is used between the API open function entity and the caller. Certification, authorization and protection.
  • the CAPIF core functional entity may also send the new method to the caller.
  • the above update request may further include indication information for instructing the CAPIF core functional entity to send the new security method to the caller.
  • the CAPIF core functional entity may further receive an acquisition request from the caller, the acquisition request being used to request the location Describe new security methods.
  • the CAPIF core functional entity may store a correspondence between the caller, the new security method, and the API open function entity.
  • the embodiment of the present application provides another method for calling a service application programming interface API, and the security method applied to the API open function entity is updated from the old security method to a new security method, wherein the API open function An entity security method is used for communication between the API open function entity and the caller, the method comprising: the API open function entity receiving a first call request sent by the caller using the new security method, the first The call request includes a name of the service API, the first call request is for invoking the service API; the API open function entity verifies the caller using the new security method.
  • the security method of the API open function entity is used for communication between the API open function entity and the caller, and may include: the security method of the API open function entity is used between the API open function entity and the caller. Certification, authorization and protection.
  • the API open function entity may also send the new security to the caller before the API open function entity receives the first call request sent by the caller using the new secure method. method.
  • the API open function entity may also receive a secure method negotiation request from the caller before the API open function entity sends the new security method to the caller, the security method negotiation request A list of security methods supported by the caller is included, the list of security methods including the new security method; and a security method negotiation response is sent to the caller, the security method negotiation response including the new method.
  • the API open function entity may further receive the first call sent by the caller using the old security method. Transmitting a request, the second call request is used to invoke the service API; and sending a response message of the second call request to the caller, the response message of the second call request is used to indicate the service The API call failed.
  • the response message of the second invocation request includes a cause value indicating that the service API call failed due to a security method not matching.
  • the API open function may further receive the third sent by the caller using the old security method.
  • the third call request is used to invoke the service API; correspondingly, the API open function entity may send a response message of the third call request to the caller, where the third call request is The response message includes a new security method and a cause value for the API open function entity, the cause value being used to indicate that the service API call failed due to a security method not matching.
  • the API open function entity may further send a response message of the first call request to the caller, where the response message of the first call request is used to indicate that the service API call is successful.
  • the embodiment of the present application provides a calling method of a service API, where a security method applied to a service application programming interface API is updated from a new security method to a new security method, and the method includes: the caller obtaining the location a new security method of the service API; the caller sends a first call request to the API open function entity using the new security method, the first call request including a name of a service API, the first call The request is used to invoke the service API.
  • the caller when the security method of the service API is updated, the caller can obtain a new security method of the service API in time, and use the new security method to call the service API to the API open function, thereby Avoid service API calls failing due to security method mismatch.
  • the caller can obtain a new security method of the service API by: first, the caller receives the new security method from a generic API framework CAPIF core functional entity. Method 2, the caller receives the new security method from the API open function entity.
  • the caller may also request the CAPIF core functional entity before the caller receives the new security method from the generic API framework CAPIF core functional entity. Describe new security methods. For example, the caller can send an acquisition request to the CAPIF core functional entity for requesting the new security method.
  • the caller may further send a security method negotiation request to the API open function entity before the caller acquires a new security method of the service API.
  • the security method negotiation request includes a list of security methods supported by the caller, the security method list including the new security method; correspondingly, the caller may receive a security method negotiation response from the API open function entity The security method negotiation response includes the new security method.
  • the caller may also send the old security method to the API open function entity before the caller obtains a new security method of the service API.
  • a second call request the second call request is used to invoke the service API; and receive a response message of the second call request from the API open function entity, where the response message of the second call request includes a cause value
  • the reason value is used to indicate that the service API call failed because the security method does not match.
  • the caller before the caller receives the new security method from the API open function entity, the caller can also use the old security method to the The API open function sends a third call request, where the third call request is used to invoke the service API; correspondingly, the caller can receive the response message of the third call request from the API open function entity, where The response message of the third call request includes the new security method and a cause value, the cause value being used to indicate that the service API call failed because the security method does not match.
  • the caller may further receive a response message of the first call request from the API open function entity, where the response message of the first call request is used to indicate that the service API call is successful.
  • the embodiment of the present application provides another method for calling a service application programming interface API, and the security method applied to the service application programming interface API is updated from a new security method to a new security method, and the method includes: API framework CAPIF core functional entity receives an update request for the API open function from an API publishing function entity, the update request including a new security method of the service API; the CAPIF core functional entity stores the new security method .
  • the CAPIF core functional entity may also send the new method to the caller.
  • the above update request may further include indication information for instructing the CAPIF core functional entity to send the new security method to the caller.
  • the CAPIF core functional entity may further receive an acquisition request from the caller, the acquisition request being used to request the location Describe new security methods.
  • the CAPIF core functional entity may store a correspondence between the identity of the caller, the new security method, and the name of the service API.
  • the CAPIF core functional entity may store the identity of the caller, the new security method, the name of the service API, and the correspondence between the API open functional entities.
  • the embodiment of the present application provides another calling method of a service application programming interface API, and the security method applied to the service application programming interface API is updated from a new security method to a new security method, and the method includes: an API.
  • the open function entity receives a first call request sent by the caller using the new security method, the first call request includes a name of the service API, and the first call request is used to invoke the service API;
  • the API open function entity verifies the caller using the new security method.
  • the API open function entity may also send the new security to the caller before the API open function entity receives the first call request sent by the caller using the new secure method. method.
  • the API open function entity may also receive a secure method negotiation request from the caller before the API open function entity sends the new security method to the caller, the security method negotiation request A list of security methods supported by the caller is included, the list of security methods including the new security method; and a security method negotiation response is sent to the caller, the security method negotiation response including the new method.
  • the API open function entity may further receive the first call sent by the caller using the old security method. Transmitting a request, the second call request is used to invoke the service API; and sending a response message of the second call request to the caller, the response message of the second call request is used to indicate the service The API call failed.
  • the response message of the second invocation request includes a cause value indicating that the service API call failed due to a security method not matching.
  • the API open function may further receive the third sent by the caller using the old security method.
  • the third call request is used to invoke the service API; correspondingly, the API open function entity may send a response message of the third call request to the caller, where the third call request is The response message includes a new security method and a cause value for the API open function entity, the cause value being used to indicate that the service API call failed due to a security method not matching.
  • the API open function entity may further send a response message of the first call request to the caller, where the response message of the first call request is used to indicate that the service API call is successful.
  • an embodiment of the present application provides a device, which has a function of implementing a caller behavior in a method design.
  • the functions may be implemented by hardware or by corresponding software implemented by hardware.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • the device can be a caller or can be a chip in the caller.
  • the device is a caller and the caller includes a processor configured to support the caller to perform the corresponding functions in the above methods.
  • the caller can also include a communication interface for supporting communication between the caller and the user plane entity of the centralized unit or other network elements.
  • the caller can also include a memory for coupling with the processor that holds the program instructions and data necessary by the caller.
  • an embodiment of the present application provides a device, which has a function of implementing a core function entity behavior of a CAPIF in the foregoing method design.
  • the functions may be implemented by hardware or by corresponding software implemented by hardware.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • the device can be a CAPIF core functional entity or can be a chip in a CAPIF core functional entity.
  • the device is a CAPIF core functional entity
  • the CAPIF core functional entity includes a processor configured to support the CAPIF core functional entity to perform the corresponding functions in the above methods.
  • the CAPIF core functional entity may further include a communication interface for supporting communication between the CAPIF core functional entity and the user plane entity of the centralized unit or other network elements.
  • the CAPIF core functional entity may also include a memory for coupling with the processor that holds the necessary program instructions and data for the CAPIF core functional entity.
  • the embodiment of the present application provides a device, which has a function of implementing an API open function entity behavior in the above method design.
  • the functions may be implemented by hardware or by corresponding software implemented by hardware.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • the device may be an API open functional entity or may be a chip in an API open functional entity.
  • the device is an API open function entity
  • the API open function entity includes a processor configured to support an API open function entity to perform a corresponding function in the above method.
  • the API open function entity may further include a communication interface for supporting communication between the API open function entity and the user plane entity of the centralized unit or other network elements.
  • the API open function entity may further include a memory for coupling with the processor, which stores program instructions and data necessary for the API open function entity.
  • the embodiment of the present application provides a communication system, where the system includes the caller and the API open function entity described in the foregoing aspect; or the system includes the caller, the API open function entity, and the CAPIF core described in the foregoing aspect.
  • Functional entity the system includes the caller and the API open function entity described in the foregoing aspect; or the system includes the caller, the API open function entity, and the CAPIF core described in the foregoing aspect.
  • the embodiment of the present application provides a computer storage medium for storing computer software instructions used by the caller, which is designed to perform the actions of the caller in the first aspect or the fourth aspect. program.
  • the embodiment of the present application provides a computer storage medium for storing computer software instructions used by the API open function entity, where the method includes the API open function entity in the third aspect or the sixth aspect.
  • the embodiment of the present application provides a computer storage medium for storing computer software instructions used by the CAPIF core functional entity, where the CAPIF core functional entity in the second aspect or the fourth aspect is implemented.
  • the embodiment of the present application provides a chip system, which is applied to a caller, where the chip system includes at least one processor, a memory and an interface circuit, the memory, the transceiver, and the at least one processing.
  • the devices are interconnected by wires, and the at least one memory stores instructions; the instructions are executed by the processor to perform the operations of the caller in the above method.
  • the embodiment of the present application provides a chip system, which is applied to an API open function entity, where the chip system includes at least one processor, a memory and an interface circuit, the memory, the transceiver, and the at least A processor is interconnected by a line, and the at least one memory stores instructions; the instructions are executed by the processor to perform operations of the API open function entity in the above method.
  • the embodiment of the present application provides a chip system, which is applied to a CAPIF core functional entity, where the chip system includes at least one processor, a memory and an interface circuit, the memory, the transceiver, and the at least A processor is interconnected by a line in which instructions are stored; said instructions being executed by said processor to perform operations of said CAPIF core functional entity in said method.
  • the caller can obtain a new security method of the API open function entity in time, and use the new security method. Calling the service API avoids the call failure due to a security method mismatch.
  • FIG. 1 is a schematic diagram of a CAPIF-based architecture provided by an embodiment of the present application
  • 2 is a schematic diagram of communication of calling an API
  • 3A is a schematic diagram of communication of a service API calling method according to an embodiment of the present application.
  • FIG. 3B is a schematic diagram of communication of another service API calling method according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of communication of another service API calling method according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of communication of another service API calling method according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of communication of another service API calling method according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic diagram of communication of another service API calling method according to an embodiment of the present application.
  • FIG. 8 is a schematic block diagram of an apparatus according to an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a device according to an embodiment of the present application.
  • the network architecture and the application scenarios described in the embodiments of the present application are for the purpose of more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation of the technical solutions provided by the embodiments of the present application.
  • the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems in the evolution of the architecture and the appearance of new application scenarios.
  • Step 201 The API publishing function sends a service API advertisement request to the CAPIF core function, where the request carries the API information.
  • the API information may include an API name, an API type, interface information, and a security method.
  • Step 202 The CAPIF core function stores the foregoing API information.
  • Step 203 The CAPIF core function sends a service API advertisement response to the API publishing function.
  • the API publishing function is successfully announced by the publication response. If the CAPIF does not successfully receive the above API information or does not store successfully, the API publishing function fails to be announced through the publication response notification API publishing function.
  • Step 204 The API invoker sends a service API discovery request to the CAPIF core function, where the request carries an API type and interface information.
  • the service API discovery request is used to query API information.
  • Step 205 The CAPIF core function sends a service API discovery response to the API invoker, where the response carries the foregoing API information.
  • the CAPIF core function will choose a secure method to send to the API invoker.
  • the security method is a secure method for a certain service API between the API invoker and the AEF.
  • the security method can be a secure method of AEF for use between the API invoker and the AEF.
  • Step 206 The API invoker sends a service API call request to the AEF.
  • the service API call request carries the above API information.
  • the API invoker generally invokes the service API by sending a request to the AEF.
  • Step 207 The AEF acquires a security method corresponding to the API name and interface information included in the foregoing API information.
  • the AEF acquires a security method corresponding to the API name and interface information included in the above API information from the CAPIF core function.
  • Step 208 The AEF sends a service API call response to the API invoker.
  • the API invoker and the AEF use the previously obtained security method for authentication, authorization, and protection. If the authentication and authorization are successful, the API invoker sends a call response to the service API.
  • the above process is the first time that the API invoker calls a service API.
  • the API needs to first find the service API information and obtain the security method in the CAPIF core function. After the API invoker calls the service API, it does not need to obtain the security method through the CAPIF core function. Instead, the service API can be called directly.
  • the above call process does not consider the case where the API open function entity or the service API updates the security method. If the API open function entity or the service API updates the security method, the API invoker still uses the pre-update security method to call the service API in step 206. , the service API will not be successfully called. How to solve this problem, the current industry has not given a corresponding plan.
  • the corresponding calling method is respectively provided in the embodiment of the present application.
  • the embodiment of the present application provides a service API calling method, and a caller based on the method, a CAPIF core functional entity, and an API open functional entity.
  • the above service API calling method will be described below with reference to FIG. 3A.
  • FIG. 3A is a schematic diagram of communication of a service API calling method according to an embodiment of the present application.
  • the implementation of the method shown in FIG. 3A is based on the fact that the security method of the API open functional entity is updated from the old security method to the new security method.
  • the security method of the API open function entity is used for communication between the API open function entity and the caller.
  • the security method of the API open function entity can be used for authentication, authorization and protection between the API open function entity and the caller.
  • the method shown in Figure 3A includes:
  • Step 301 The CAPIF core function entity receives an update request of the API open function from an API publishing function entity, where the update request includes a new security method of the API open function.
  • the update request further includes indication information for instructing the CAPIF core functional entity to send a new security method to the caller.
  • Step 302 The CAPIF core functional entity stores a new security method.
  • the CAPIF core functional entity stores the correspondence between the caller, the new security method, and the API open functional entity.
  • Step 303 The caller obtains a new security method of the API open function entity.
  • step 303 can be step 303a: the caller receives a new security method from the API open function entity.
  • the caller may further send a security method negotiation request to the API open function entity, where the security method negotiation request includes a list of security methods supported by the caller, the security method list includes This new security method.
  • step 303a may comprise: the caller receiving a security method negotiation response from the API open function entity, the security method negotiation response including the new security method.
  • step 303a may include: the caller receives a response message of the third call request from the API open function entity, where the response message of the third call request includes the new security method and a cause value, the cause value is used to indicate that the security method is Failure to match the service API call failed.
  • step 303 can be step 303b: the caller receives a new security method from the CAPIF core functional entity.
  • the CAPIF core function entity may send a new security method to the caller according to the indication information in the above update request.
  • the caller may also request the new security method from the CAPIF core function entity before performing step 303b.
  • the caller can send a get request to the CAPIF core functional entity to request the new security method.
  • the old security method can also be used before the caller obtains a new security method of the API open function entity.
  • Sending a second call request to the API open function entity the second call request is used to invoke the service API; the caller may also receive a response message of the second call request from the API open function entity, and the response message of the second call request includes a cause value
  • the reason value is used to indicate that the service API call failed because the security method does not match.
  • Step 304 The caller sends a first call request to the API open function entity using a new security method.
  • the first call request includes a name of a service API, and the first call request is used to invoke the service API.
  • the method shown in FIG. 3A may further include the following steps:
  • Step 305 The API open function entity sends a response message of the first call request to the caller.
  • the response message of the first call request is used to indicate that the service API call is successful.
  • the caller can acquire the new security method of the API open function entity in time, and use the new security method to open the function call to the API.
  • Service API to avoid service API calls failing due to security method mismatch.
  • the embodiment of the present application provides another service API calling method, and a caller based on the method, a CAPIF core functional entity, and an API open functional entity.
  • the service API calling method will be described below in conjunction with FIG. 3B.
  • FIG. 3B is a schematic diagram of communication of another service API calling method according to an embodiment of the present application.
  • the implementation of the method shown in FIG. 3B assumes that the security method of the service API is updated from the old security method to the new security method.
  • the method shown in Figure 3B includes:
  • Step 311 The CAPIF core function entity receives an update request of the API open function from an API publishing function entity, where the update request includes a new security method of the service API.
  • the update request further includes indication information for instructing the CAPIF core functional entity to send a new security method to the caller.
  • Step 312 The CAPIF core functional entity stores a new security method.
  • the CAPIF core functional entity stores the correspondence between the caller, the new security method, and the service API. In a specific example, the CAPIF core functional entity stores the correspondence between the caller, the new security method, the service API, and the API open function entity.
  • Step 313 The caller obtains a new security method of the service API.
  • step 313 may be step 313a: the caller receives a new security method from the API open function entity.
  • the caller may further send a security method negotiation request to the API open function entity, where the security method negotiation request includes a list of security methods supported by the caller, the security method list includes This new security method.
  • step 313a may include: the caller receiving a security method negotiation response from the API open function entity, the security method negotiation response including the new security method.
  • step 313a the caller may also send a third call request to the API open function entity using the old security method, and the third call request is used to invoke the service API.
  • step 313a may include: the caller receives a response message of the third call request from the API open function entity, where the response message of the third call request includes the new security method and a cause value, the cause value is used to indicate the security method Failure to match the service API call failed.
  • step 313 may be step 313b: the caller receives a new security method from the CAPIF core functional entity.
  • the CAPIF core function entity may send a new security method to the caller according to the indication information in the above update request.
  • the caller may also request the new security method from the CAPIF core functional entity before performing step 313b.
  • the caller can send a get request to the CAPIF core functional entity to request the new security method.
  • the old security method can be used to the API before the caller obtains the new security method of the service API.
  • the open function entity sends a second call request, and the second call request is used to invoke the service API; the caller may also receive a response message of the second call request from the API open function entity, and the response message of the second call request includes a cause value,
  • the reason value is used to indicate that the service API call failed because the security method did not match.
  • Step 314 The caller sends a first call request to the API open function entity using a new security method.
  • the first call request includes a name of a service API, and the first call request is used to invoke the service API.
  • the method shown in FIG. 3B may further include the following steps:
  • Step 315 The API open function entity sends a response message of the first call request to the caller.
  • the response message of the first call request is used to indicate that the service API call is successful.
  • the caller can acquire the new security method of the service API in time, and use the new security method to open the function calling service API to the API, thereby Avoid service API calls failing due to security method mismatch.
  • the foregoing methods shown in FIG. 3A and FIG. 3B may be performed separately or in combination.
  • the method shown in FIG. 3A can be performed.
  • the security method of the service API is updated
  • the method shown in FIG. 3B can be performed.
  • the security methods of the API open function entity and the service API are both updated
  • the methods shown in FIG. 3A and FIG. 3B may be combined.
  • step 301 may be performed in combination with step 311, and step 302 may be combined with step 312.
  • step 303 may be performed in combination with step 313, step 304 may be performed in combination with step 314, and step 305 may be performed in combination with step 315.
  • the methods shown in FIG. 3A and FIG. 3B are combined and executed, there may be other embodiments, and the embodiment of the present application is not limited.
  • the same or similar content as the method shown in FIG. 3 can refer to the detailed description in FIG. 3A or FIG. 3B , and details are not described herein.
  • the methods shown in FIG. 4 to FIG. 7 are described by taking the security method of the service API as an example. In actual operation, the methods shown in FIG. 4 to FIG. 7 can also be applied to the API open function entity.
  • the security method may be updated. In this case, the security method of the service API involved in the method shown in FIGS. 4 to 7 may be replaced by the security method of the API open function entity.
  • the "old security method” can also be described as "pre-update security method", which can be used interchangeably; the "new security method” can also be described as "updated security method", both of which can Interoperability.
  • FIG. 4 is a schematic diagram of communication of another service API calling method according to an embodiment of the present application.
  • the main idea of the method shown in Figure 4 is: after the service API updates the security method, when the API invoker fails to call the service API, the API invoker requests the security method of the service API update from the CAPIF core function, and then uses the updated security.
  • the method calls the service API to the AEF.
  • the method shown in FIG. 4 may include steps 401 to 406.
  • the correspondence between the identifier of the API invoker, the security method before the update, and the identifier of the service API is stored in the CAPIF core function.
  • Step 401 the service API updates the security method.
  • the service API 1 update security method is described as an example. Specifically, after the service API 1 updates the security method, the service API 1 notifies the CAPIF core function of its updated security method. Among them, service API 1 can send its updated security method to the CAPIF core function through the API publishing function. Correspondingly, after receiving the updated security method of service API 1, the CAPIF core function stores the updated security method.
  • the CAPIF core function may store the correspondence between the identifier of the API invoker, the updated security method of service API 1 and the name of service API 1 when storing the updated security method of service API 1. For example, the CAPIF core function may replace the security method before the service API 1 update in the correspondence between the previously saved API invoker identifier, the security method before the service API1 update, and the name of the service API 1 with the service API 1 update. Security method.
  • the API publishing function may send a service API publish request to the CAPIF core function, the request carrying the name of the service API 1 and the updated security method.
  • the CAPIF core function replaces the locally stored security method corresponding to the name of the service API 1 with the received updated security method.
  • the CAPIF core function may also send a service API advertisement response to the API publishing function.
  • Step 402 The API invoker sends a service API call request to the AEF.
  • the API invoker communicates with the AEF using the security method before the service API 1 update.
  • the API invoker can use authentication, authorization, and protection between the security method before the service API 1 update and the AEF.
  • the service API call requests a request message corresponding to the security method before the update, and the request message may carry the identifier of the API invoker. Further, the request message may also carry the name of the service API 1.
  • the security method before the update is TLS-PSK.
  • the call invoked by the API invoker to the service API is a client hello message, and the client hello message carries a pre-shared key.
  • the API invoker uses the pre-shared key and AEF to authenticate and establish a secure connection to invoke service API 1.
  • Step 403 The AEF sends a service API call failure response to the API invoker.
  • the service API call failure response carries a reason value, and the reason value is used to indicate that the service API 1 fails due to a security method error.
  • the service API call failure response may further carry an indication information, where the indication information is used to instruct the API invoker to obtain the updated security method of the service API 1 from the CAPIF core function.
  • Step 404 The API invoker sends a security method acquisition request to the CAPIF core function.
  • the security method obtains the identifier of the request that carries the API caller.
  • the security method acquisition request may also carry the name of the service API 1.
  • Step 405 The CAPIF core function sends a security method to the API invoker to obtain a response.
  • the security method obtains the response and carries the updated security method.
  • the CAPIF core function can find the security methods of all service APIs corresponding to the API invoker according to the API invoker and send them to the API invoker. Specifically, the CAPIF core function sends a corresponding group of one or more service API names and security methods to the API invoker, for example, the corresponding groups can be expressed as (service API 1, security method 1), (service API 2, security method 2) )Wait.
  • the API invoker after the API invoker receives the security method and obtains the response, the API invoker obtains the response according to the security method to learn that the security method after the service API 1 is updated is the security method 1.
  • the CAPIF core function can find a security method that uniquely corresponds to the API invoker and the name of the service API 1, and then carry the security method in the secure method get response to the API invoker. .
  • Step 406 The API invoker sends a service API call request to the AEF.
  • the API invoker communicates with the AEF using the updated security method of service API 1.
  • the API invoker uses authentication, authorization, and protection between the updated security method of service API 1 and the AEF.
  • the service API call request carries the authentication information corresponding to the security method updated by service API 1 and the identifier of the API invoker. Further, the call request may also carry the name of service API 1.
  • the security method after the service API 1 update is a transport layer security pre-shared key ciphersuites (TLS-PKI) security method
  • the authentication information corresponding to the security method after the service API 1 update is a client.
  • the API invoker sends a client hello message carrying the certificate to the AEF to invoke service API 1.
  • Step 407 The AEF sends a service API call success response to the API invoker.
  • the AEF may obtain the updated security method of the service API 1 from the CAPIF core function, and perform authentication and authorization verification on the call request sent by the API invoker based on the updated security method; if the verification succeeds, the AEF to the API The invoker sends a service API call to respond successfully.
  • the authentication information corresponding to the updated security method is a certificate that needs to be carried in the client hello message. If the AEF authenticates the API invoker successfully according to the TLS-PKI security method corresponding to the certificate and the authorization verification succeeds, the service API is successfully invoked. And AEF sends a service API call success response to the API invoker.
  • the service API 1 updated security method can be used for authentication, authorization, and protection between the AEF and the API invoker. If the authentication and authorization are successful, the AEF sends a call success response to the API invoker.
  • the security method acquisition request in the foregoing step 404 may be replaced by a security method discovery request
  • the security method acquisition response in the above step 405 may be replaced with a security method discovery response. It is to be understood that the above-mentioned security method acquisition request and security method acquisition response may also be replaced with a newly defined message.
  • the above steps 404 and 405 may be replaced by a security negotiation process between the API invoker and the CAPIF core function.
  • the API invoker sends all the security methods it supports to the CAPIF core function.
  • the CAPIF core function compares the received security method with the security method supported by the API open function, and selects a security method according to the policy.
  • API invoker for use between API invoker and API open functional entities.
  • FIG. 5 is a schematic diagram of communication of another service API calling method according to an embodiment of the present application.
  • the main idea of the method shown in Figure 5 is: After the service API updates the security method, the API publishing function instructs the CAPIF core function to actively send the security method after the service API update to the API invoker, and then the API invoker uses the updated security method to AEF calls the service API.
  • the method shown in FIG. 5 may include steps 501 to 507.
  • Step 501 The API publishing function sends a service API update request to the CAPIF core function.
  • the request carries the name of the service API, the updated security method, and the indication information.
  • the indication information is used to indicate the security method after the CAPIF core function sends the service API update to the API invoker.
  • Step 502 The CAPIF core function updates the information of the service API.
  • the CAPIF core function replaces the security method in the information of the service API that it holds with the updated security method.
  • the CAPIF core function originally stores the correspondence between the identifier of the API invoker, the security method before the service API update, and the name of the service API.
  • the CAPIF core function replaces the security method before the service API update in the corresponding relationship.
  • the security method for the service API update is the security method for the service API update.
  • Step 503 The CAPIF core function sends a service API update response to the API publishing function.
  • Step 504 The CAPIF core function sends the updated service API information to the API invoker.
  • the information of the updated service API includes the name of the service API and the security method after the service API is updated.
  • Step 505 The API invoker sends a security method update confirmation to the CAPIF core function.
  • the steps 506 and 507 are the same as or similar to the steps 406 and 407 in FIG. 4 respectively. For details, refer to the detailed description in FIG. 4, and details are not described herein again.
  • FIG. 6 is a schematic diagram of communication of another service API calling method according to an embodiment of the present application.
  • the main idea of the method shown in Figure 6 is: After the service API updates the security method, when the API invoker fails to call the service API, AEF sends the updated security method to the API invoker, and then the API invoker uses the updated security method. Call the service API to AEF.
  • the method shown in FIG. 6 may include steps 601 to 605.
  • the steps 601 and 602 are the same as the steps 401 and 402 in FIG. 4 respectively. For details, refer to the detailed description in FIG. 4, and details are not described herein again.
  • Step 603 The AEF sends a service API call failure response to the API invoker.
  • the response carries the cause value and the updated security method.
  • the reason value is used to indicate that the service API failed due to a security method error.
  • the steps 604 and 605 are the same as the steps 406 and 407 in FIG. 4 respectively.
  • the steps 604 and 605 are the same as the steps 406 and 407 in FIG. 4 respectively.
  • FIG. 7 is a schematic diagram of communication of another service API calling method according to an embodiment of the present application.
  • the main idea of the method shown in Figure 7 is: after the service API updates the security method, when the API invoker fails to invoke the service API, the API invoker and the AEF negotiate the security method, and then the API invoker uses the negotiated security method to call the service to the AEF. API.
  • the method shown in FIG. 7 may include steps 701 to 706.
  • the steps 701 to 703 are the same as or similar to the steps 401 to 403 in FIG. 4, and the detailed description in FIG. 4 is omitted, and details are not described herein again.
  • Step 704 The API invoker sends a security method negotiation request to the AEF.
  • the request carries a security method supported by the API invoker, and includes, for example, security method A, security method B, and security method C.
  • the security method that the service API may use only includes the security method A, the security method B, and the security method C.
  • Step 705 The AEF sends a security method negotiation response to the API invoker.
  • the response carries a security method C.
  • the AEF determines that the security method after the service API update is the security method C, and then sends the security method C to the API invoker in the security method negotiation response.
  • Step 706 The API invoker sends a service API call request to the AEF.
  • the API invoker uses the service API updated security method (ie, security method C) and AEF communication.
  • Step 707 The AEF sends a service API call success response to the API invoker.
  • steps 706 and 707 are similar to the steps 406 and 407 in FIG. 4, and may be referred to the detailed description in FIG. 4, and details are not described herein.
  • the solution provided by the embodiment of the present application is mainly introduced from the perspective of interaction between different network elements.
  • the caller, the API open function entity and the CAPIF core function entity in order to implement the above functions, include hardware structures and/or software modules corresponding to the execution of the respective functions.
  • the embodiments of the present application can be implemented in a combination of hardware or hardware and computer software in combination with the elements of the examples and algorithm steps described in the embodiments disclosed in the application. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the technical solutions of the embodiments of the present application.
  • the embodiment of the present application may perform functional unit division on the caller, the API open function entity, the CAPIF core function entity, and the like according to the foregoing method example.
  • each functional unit may be divided according to each function, or two or more functions may be divided.
  • the functions are integrated in one processing unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logical function division. In actual implementation, there may be another division manner.
  • FIG. 8 illustrates one possible exemplary block diagram of an apparatus involved in an embodiment of the present application, which may exist in software, hardware, or a combination of software and hardware.
  • FIG. 8 shows a possible schematic block diagram of the apparatus involved in the embodiment of the present application.
  • the apparatus 800 includes a processing unit 802 and a communication unit 803.
  • the processing unit 802 is configured to control and manage the actions of the device.
  • the communication unit 803 is used to support communication of the device with other devices.
  • the apparatus may also include a storage unit 801 for storing program codes and data of the apparatus.
  • the apparatus 800 shown in FIG. 8 may be a caller, an API open function entity, or a CAPIF core function entity involved in the embodiment of the present application.
  • the processing unit 802 can support the device 800 to perform the actions performed by the caller in the various method examples described above.
  • the communication unit 803 can support the communication between the device 800 and the CAPIF core function entity or the API open function entity or the like.
  • the communication unit 803 supports the device 800 to perform steps 303-305 in FIG. 3A, steps 313-315 in FIG. 3B, Steps 402-407 in FIG. 4, steps 504-507 in FIG. 5, steps 602-605 in FIG. 6, steps 702-707 in FIG. 7, and/or other related communication processes.
  • the processing unit 802 can support the device 800 to perform the actions performed by the API open function entity in the above method examples.
  • the processing unit 802 supports the device 800 to perform the process in FIG. Step 401, step 601 in Figure 6, step 701 in Figure 7, and/or other processes for the techniques described herein.
  • the communication unit 803 can support communication between the device 800 and the caller or CAPIF core functional entity or the like.
  • the communication unit 803 supports the device 800 to perform steps 303a, 304, and 305 in FIG. 3A, steps 313a, 314 in FIG. 3B, and 315, steps 402, 403, 406, and 407 in FIG. 4, steps 506 and 507 in FIG. 5, steps 602-605 in FIG. 6, steps 702-707 in FIG. 7, and/or other related communication processes. .
  • the processing unit 802 can support the apparatus 800 to perform the actions performed by the CAPIF core functional entity in the above various method examples.
  • the processing unit 802 supports the apparatus 800 to perform the operation in FIG. 3A.
  • Step 302 step 312 in FIG. 3B, step 401 in FIG. 4, step 502 in FIG. 5, step 601 in FIG. 6, step 701 in FIG. 7, and/or other techniques for the techniques described herein process.
  • the communication unit 803 can support communication between the device 800 and the caller, the API open function entity or the API publishing function entity, etc., for example, the communication unit 803 supports the device 800 to perform steps 301 and 303b in FIG. 3A, step 311 in FIG. 3B. And 313b, steps 404 and 405 in FIG. 4, step 501 and steps 503-505 in FIG. 5, and/or other related communication processes.
  • the processing unit 802 may be a processor or a controller, such as a central processing unit (CPU), a general purpose processor, a digital signal processor (DSP), and an application specific integrated circuit (Application). -Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, units and circuits described in connection with the present disclosure.
  • the processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the communication unit 803 can be a communication interface, which is a collective name. In a specific implementation, the communication interface can include one or more interfaces.
  • the storage unit 801 can be a memory.
  • the processing unit 802 is a processor
  • the communication unit 803 is a communication interface
  • the storage unit 801 is a memory
  • the device involved in the embodiment of the present application may be the device 900 shown in FIG.
  • the apparatus 900 includes a processor 902 and a communication interface 903. Further, the device 900 may further include a memory 901. Alternatively, device 900 may also include a bus 904. The communication interface 903, the processor 902, and the memory 901 may be connected to each other through a bus 904.
  • the bus 904 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (abbreviated). EISA) bus and so on.
  • the bus 904 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 9, but it does not mean that there is only one bus or one type of bus.
  • the processor 902 can perform various functions of the apparatus 900 by running or executing a program stored in the memory 901.
  • the apparatus 900 shown in FIG. 9 may be a caller, a CAPIF core function entity, or an API open function entity involved in the embodiment of the present application.
  • processor 902 can perform the actions performed by the caller in the various method examples described above by running or executing a program stored in memory 901.
  • processor 902 can perform the actions performed by the CAPIF core functional entity in the various method examples described above by running or executing a program stored in memory 901.
  • the processor 902 can execute the actions of the API open function entity in the above method examples by running or executing a program stored in the memory 901.
  • the steps of the method or algorithm described in connection with the disclosure of the embodiments of the present application may be implemented in a hardware manner, or may be implemented by a processor executing software instructions.
  • the software instructions may be composed of corresponding software modules, which may be stored in a random access memory (RAM), a flash memory, a read only memory (ROM), an erasable programmable read only memory ( Erasable Programmable ROM (EPROM), electrically erasable programmable read only memory (EEPROM), registers, hard disk, removable hard disk, compact disk read only (CD-ROM) or any other form of storage medium known in the art.
  • An exemplary storage medium is coupled to the processor to enable the processor to read information from, and write information to, the storage medium.
  • the storage medium can also be an integral part of the processor.
  • the processor and the storage medium can be located in an ASIC.
  • the ASIC can be located in the caller, the CAPIF core functional entity, or the API open functional entity.
  • the processor and the storage medium may also exist as discrete components in the caller, the CAPIF core functional entity, or the API open functional entity.
  • the functions described in the embodiments of the present application can be implemented in hardware, software, firmware, or any combination thereof.
  • the functions may be stored in a computer readable medium or transmitted as one or more instructions or code on a computer readable medium.
  • Computer readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another.
  • a storage medium may be any available media that can be accessed by a general purpose or special purpose computer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Human Computer Interaction (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Stored Programmes (AREA)
  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请实施例涉及通信技术领域,提供一种服务应用程序编程接口API的调用方法,应用于API开放功能实体的安全方法由旧的安全方法更新为新的安全方法,其中,所述API开放功能实体的安全方法用于所述API开放功能实体与调用者之间通信,所述方法包括:所述调用者获取所述API开放功能实体的新的安全方法;所述调用者使用所述新的安全方法向所述API开放功能实体发送第一调用请求,所述第一调用请求包括服务API的名称,所述第一调用请求用于调用所述服务API。通过本申请实施例的方案,可以避免由于安全方法不匹配导致服务API调用失败。

Description

一种服务API调用方法和相关装置
本申请要求于2018年4月9日提交中国国家知识产权局、申请号为201810312734.1、发明名称为“一种服务API调用方法和相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种服务API调用方法和相关装置。
背景技术
第三代合作伙伴计划(3rd Generation Partnership Project,3GPP)定义了多种北向应用程序编程接口(application programming interface,API)相关的规范。为了避免不同API规范之间的重复和不一致,3GPP考虑开发一个通用的API框架(common API framework,CAPIF),其包含适用于所有北向API的通用特性。其中,CAPIF一般部署在运营商网络内。
图1为基于CAPIF的架构示意图。图1所示的架构中主要包括以下网元:
API调用者(API invoker),通常由和运营商网络有服务协议的第三方应用提供商提供。
服务API(service API),为给API invoker提供服务的接口。
CAPIF核心功能(CAPIF core function)实体,为service API所有策略的中央存储器,也是API invoker和service API认证与授权的中心。
CAPIF API,为给API invoker提供CAPIF core function实体入口的接口。
API开放功能(API exposing function,AEF)实体,为服务提供方对外开放服务的一个入口,API invoker通过AEF实体可以使用服务提供方提供的服务。
API公布功能(API publishing function)实体,可以将service API的信息公布到CAPIF core function实体,以便API invoker在CAPIF core function实体找到service API的信息。
API管理功能(API management function)实体,执行对service API的管理,例如监控service API的状态,记录调用信息等。
图1中,公共陆地移动网信任域(public land mobile network trust domain,PLMN trust domain)表示一个公用陆地移动网所信任的区域。API提供者域(API provider domain)表示API提供者所在的一个区域。
其中,上述各网元之间的连接关系如下:
PLMN信任域外的API调用者与CAPIF core function实体之间的接口为CAPIF-1e接口,与AEF实体之间的接口为CAPIF-2e接口。PLMN信任域内的API调用者与CAPIF core function实体之间的接口为CAPIF-1接口,与AEF实体之间的接口为CAPIF-2接口。CAPIF core function实体与AEF实体之间的接口为CAPIF-3接口,与API公布功能实体之间的接口为CAPIF-4接口,与API管理功能之间的接口为CAPIF-5接口。
目前,API invoker在调用service API之前,API invoker与CAPIF core function实体会协商一个API invoker与AEF实体之间使用的安全方法。之后,API invoker在调用该service API时,会使用该安全方法向AEF实体调用该service API。然而,现有方法未考虑该安全方法更新的情况,若安全方法发生更新,API invoker还是使用原来的安全方法去调用该service API,将不能成功调用该service API。
发明内容
本申请实施例提供一种服务API调用方法和相关装置,用以避免由于安全方法不匹配导致服务API调用失败。
第一方面,本申请实施例提供一种服务API的调用方法,应用于API开放功能实体的安全方法由旧的安全方法更新为新的安全方法,其中,所述API开放功能实体的安全方法用于所述API开放功能实体与调用者之间通信,该方法包括:所述调用者获取所述API开放功能实体的新的安全方法;所述调用者使用所述新的安全方法向所述API开放功能实体发送第一调用请求,所述第一调用请求包括服务API的名称,所述第一调用请求用于调用所述服务API。
其中,上述API开放功能实体的安全方法用于所述API开放功能实体与调用者之间通信,可以包括:上述API开放功能实体的安全方法用于所述API开放功能实体与调用者之间进行认证、授权和保护。
通过本申请实施例的方案,当API开放功能实体的安全方法发生更新的情况下,调用者可以及时获取到API开放功能实体的新的安全方法,并使用该新的安全方法向API开放功能调用服务API,从而避免由于安全方法不匹配而导致服务API调用失败。
在一种可能的设计中,所述调用者可以通过以下方式获取所述API开放功能实体的新的安全方法:方式一,所述调用者从通用的API框架CAPIF核心功能实体接收所述新的安全方法;方式二,所述调用者从所述API开放功能实体接收所述新的安全方法。
在一个示例中,在采用方式一的情况下,所述调用者从通用的API框架CAPIF核心功能实体接收所述新的安全方法之前,所述调用者还可以向所述CAPIF核心功能实体请求所述新的安全方法。例如,所述调用者可以向所述CAPIF核心功能实体发送获取请求,所述获取请求用于请求所述新的安全方法。
在另一个示例中,在采用方式二的情况下,所述调用者获取所述API开放功能实体的新的安全方法之前,所述调用者还可以向所述API开放功能实体发送安全方法协商请求,所述安全方法协商请求包括所述调用者所支持的安全方法列表,所述安全方法列表包括所述新的安全方法;对应的,所述调用者可以从所述API开放功能实体接收安全方法协商响应,所述安全方法协商响应包括所述新的安全方法。
在本设计和本设计的上面两个示例中,所述调用者获取所述API开放功能实体的新的安全方法之前,所述调用者还可以使用所述旧的安全方法向所述API开放功能实体发送第二调用请求,所述第二调用请求用于调用所述服务API;并从所述API开放功能实体接收所述第二调用请求的响应消息,所述第二调用请求的响应消息包括原因值,所述原因值用于指示由于安全方法不匹配所述服务API调用失败。
在又一个示例中,在用方式二的情况下,所述调用者从所述API开放功能实体接收所述新的安全方法之前,所述调用者还可以使用所述旧的安全方法向所述API开放功能发送第三调用请求,所述第三调用请求用于调用所述服务API;对应的,所述调用者可以从所述API开放功能实体接收所述第三调用请求的响应消息,所述第三调用请求的响应消息包括所述新的安全方法和原因值,所述原因值用于指示由于安全方法不匹配所述服务API调用失败。
在一个可能的设计中,所述调用者还可以从所述API开放功能实体接收所述第一调用请求的响应消息,所述第一调用请求的响应消息用于指示所述服务API调用成功。
第二方面,本申请实施例提供另一种服务应用程序编程接口API的调用方法,应用于API 开放功能实体的安全方法由旧的安全方法更新为新的安全方法,其中,所述API开放功能实体的安全方法用于所述API开放功能实体与调用者之间通信,该方法包括:通用的API框架CAPIF核心功能实体从API公布功能实体接收所述API开放功能的更新请求,所述更新请求包括所述API开放功能的新的安全方法;所述CAPIF核心功能实体存储所述新的安全方法。
其中,上述API开放功能实体的安全方法用于所述API开放功能实体与调用者之间通信,可以包括:上述API开放功能实体的安全方法用于所述API开放功能实体与调用者之间进行认证、授权和保护。
在一个可能的设计中,所述CAPIF核心功能实体还可以向所述调用者发送所述新的方法。
在一个可能的设计中,上述更新请求还可以包括指示信息,所述指示信息用于指示所述CAPIF核心功能实体向所述调用者发送所述新的安全方法。
在另一个可能的设计中,所述CAPIF核心功能实体向调用者发送所述新的方法之前,所述CAPIF核心功能实体还可以从所述调用者接收获取请求,所述获取请求用于请求所述新的安全方法。
在一个可能的设计中,所述CAPIF核心功能实体可以存储所述调用者、所述新的安全方法和所述API开放功能实体之间的对应关系。
第三方面,本申请实施例提供又一种服务应用程序编程接口API的调用方法,应用于API开放功能实体的安全方法由旧的安全方法更新为新的安全方法,其中,所述API开放功能实体的安全方法用于所述API开放功能实体与调用者之间通信,该方法包括:API开放功能实体接收所述调用者使用所述新的安全方法发送的第一调用请求,所述第一调用请求包括所述服务API的名称,所述第一调用请求用于调用所述服务API;所述API开放功能实体使用所述新的安全方法对所述调用者进行验证。
其中,上述API开放功能实体的安全方法用于所述API开放功能实体与调用者之间通信,可以包括:上述API开放功能实体的安全方法用于所述API开放功能实体与调用者之间进行认证、授权和保护。
在一个可能的设计中,所述API开放功能实体接收调用者使用所述新的安全方法发送的第一调用请求之前,所述API开放功能实体还可以向所述调用者发送所述新的安全方法。
在一个示例中,所述API开放功能实体向所述调用者发送所述新的安全方法之前,所述API开放功能实体还可以从所述调用者接收安全方法协商请求,所述安全方法协商请求包括所述调用者所支持的安全方法列表,所述安全方法列表包括所述新的安全方法;并向所述调用者发送安全方法协商响应,所述安全方法协商响应包括所述新的方法。
在一个可能的设计中,所述API开放功能实体向所述调用者发送所述新的安全方法之前,所述API开放功能实体还可以接收所述调用者使用所述旧的安全方法发送的第二调用请求,所述第二调用请求用于调用所述服务API;并向所述调用者发送所述第二调用请求的响应消息,所述第二调用请求的响应消息用于指示所述服务API调用失败。
在一个示例中,所述第二调用请求的响应消息包括原因值,所述原因值用于指示由于安全方法不匹配所述服务API调用失败。
在一个可能的设计中,所述API开放功能实体向所述调用者发送所述新的安全方法之前,所述API开放功能还可以接收所述调用者使用所述旧的安全方法发送的第三调用请求,所述第三调用请求用于调用所述服务API;对应的,所述API开放功能实体可以向所述调用者发送所述第三调用请求的响应消息,所述第三调用请求的响应消息包括所述API开放功能实体 的新的安全方法和原因值,所述原因值用于指示由于安全方法不匹配所述服务API调用失败。
在一个可能的设计中,所述API开放功能实体还可以向所述调用者发送所述第一调用请求的响应消息,所述第一调用请求的响应消息用于指示所述服务API调用成功。
第四方面,本申请实施例提供一种服务API的调用方法,应用于服务应用程序编程接口API的安全方法由旧的安全方法更新为新的安全方法,该方法包括:所述调用者获取所述服务API的新的安全方法;所述调用者使用所述新的安全方法向所述API开放功能实体发送第一调用请求,所述第一调用请求包括服务API的名称,所述第一调用请求用于调用所述服务API。
通过本申请实施例的方案,当服务API的安全方法发生更新的情况下,调用者可以及时获取到服务API的新的安全方法,并使用该新的安全方法向API开放功能调用服务API,从而避免由于安全方法不匹配而导致服务API调用失败。
在一种可能的设计中,所述调用者可以通过以下方式获取所述服务API的新的安全方法:方式一,所述调用者从通用的API框架CAPIF核心功能实体接收所述新的安全方法;方式二,所述调用者从所述API开放功能实体接收所述新的安全方法。
在一个示例中,在采用方式一的情况下,所述调用者从通用的API框架CAPIF核心功能实体接收所述新的安全方法之前,所述调用者还可以向所述CAPIF核心功能实体请求所述新的安全方法。例如,所述调用者可以向所述CAPIF核心功能实体发送获取请求,所述获取请求用于请求所述新的安全方法。
在另一个示例中,在采用方式二的情况下,所述调用者获取所述服务API的新的安全方法之前,所述调用者还可以向所述API开放功能实体发送安全方法协商请求,所述安全方法协商请求包括所述调用者所支持的安全方法列表,所述安全方法列表包括所述新的安全方法;对应的,所述调用者可以从所述API开放功能实体接收安全方法协商响应,所述安全方法协商响应包括所述新的安全方法。
在本设计和本设计的上面两个示例中,所述调用者获取所述服务API的新的安全方法之前,所述调用者还可以使用所述旧的安全方法向所述API开放功能实体发送第二调用请求,所述第二调用请求用于调用所述服务API;并从所述API开放功能实体接收所述第二调用请求的响应消息,所述第二调用请求的响应消息包括原因值,所述原因值用于指示由于安全方法不匹配所述服务API调用失败。
在又一个示例中,在用方式二的情况下,所述调用者从所述API开放功能实体接收所述新的安全方法之前,所述调用者还可以使用所述旧的安全方法向所述API开放功能发送第三调用请求,所述第三调用请求用于调用所述服务API;对应的,所述调用者可以从所述API开放功能实体接收所述第三调用请求的响应消息,所述第三调用请求的响应消息包括所述新的安全方法和原因值,所述原因值用于指示由于安全方法不匹配所述服务API调用失败。
在一个可能的设计中,所述调用者还可以从所述API开放功能实体接收所述第一调用请求的响应消息,所述第一调用请求的响应消息用于指示所述服务API调用成功。
第五方面,本申请实施例提供另一种服务应用程序编程接口API的调用方法,应用于服务应用程序编程接口API的安全方法由旧的安全方法更新为新的安全方法,该方法包括:通用的API框架CAPIF核心功能实体从API公布功能实体接收所述API开放功能的更新请求,所述更新请求包括所述服务API的新的安全方法;所述CAPIF核心功能实体存储所述新的安全方法。
在一个可能的设计中,所述CAPIF核心功能实体还可以向所述调用者发送所述新的方法。
在一个可能的设计中,上述更新请求还可以包括指示信息,所述指示信息用于指示所述CAPIF核心功能实体向所述调用者发送所述新的安全方法。
在另一个可能的设计中,所述CAPIF核心功能实体向调用者发送所述新的方法之前,所述CAPIF核心功能实体还可以从所述调用者接收获取请求,所述获取请求用于请求所述新的安全方法。
在一个可能的设计中,所述CAPIF核心功能实体可以存储所述调用者的标识、所述新的安全方法和所述服务API的名称之间的对应关系。例如,CAPIF核心功能实体可以存储所述调用者的标识、所述新的安全方法、所述服务API的名称和所述API开放功能实体之间的对应关系。
第六方面,本申请实施例提供又一种服务应用程序编程接口API的调用方法,应用于服务应用程序编程接口API的安全方法由旧的安全方法更新为新的安全方法,该方法包括:API开放功能实体接收所述调用者使用所述新的安全方法发送的第一调用请求,所述第一调用请求包括所述服务API的名称,所述第一调用请求用于调用所述服务API;所述API开放功能实体使用所述新的安全方法对所述调用者进行验证。
在一个可能的设计中,所述API开放功能实体接收调用者使用所述新的安全方法发送的第一调用请求之前,所述API开放功能实体还可以向所述调用者发送所述新的安全方法。
在一个示例中,所述API开放功能实体向所述调用者发送所述新的安全方法之前,所述API开放功能实体还可以从所述调用者接收安全方法协商请求,所述安全方法协商请求包括所述调用者所支持的安全方法列表,所述安全方法列表包括所述新的安全方法;并向所述调用者发送安全方法协商响应,所述安全方法协商响应包括所述新的方法。
在一个可能的设计中,所述API开放功能实体向所述调用者发送所述新的安全方法之前,所述API开放功能实体还可以接收所述调用者使用所述旧的安全方法发送的第二调用请求,所述第二调用请求用于调用所述服务API;并向所述调用者发送所述第二调用请求的响应消息,所述第二调用请求的响应消息用于指示所述服务API调用失败。
在一个示例中,所述第二调用请求的响应消息包括原因值,所述原因值用于指示由于安全方法不匹配所述服务API调用失败。
在一个可能的设计中,所述API开放功能实体向所述调用者发送所述新的安全方法之前,所述API开放功能还可以接收所述调用者使用所述旧的安全方法发送的第三调用请求,所述第三调用请求用于调用所述服务API;对应的,所述API开放功能实体可以向所述调用者发送所述第三调用请求的响应消息,所述第三调用请求的响应消息包括所述API开放功能实体的新的安全方法和原因值,所述原因值用于指示由于安全方法不匹配所述服务API调用失败。
在一个可能的设计中,所述API开放功能实体还可以向所述调用者发送所述第一调用请求的响应消息,所述第一调用请求的响应消息用于指示所述服务API调用成功。
第七方面,本申请实施例提供一种装置,该装置具有实现上述方法设计中调用者行为的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。例如,该装置可以为调用者,或者可以为调用者中的芯片。
在一个可能的设计中,该装置为调用者,调用者包括处理器,所述处理器被配置为支持调用者执行上述方法中相应的功能。进一步的,调用者还可以包括通信接口,所述 通信接口用于支持调用者与集中式单元的用户面实体或其他网元之间的通信。进一步的,调用者还可以包括存储器,所述存储器用于与处理器耦合,其保存调用者必要的程序指令和数据。
第八方面,本申请实施例提供一种装置,该装置具有实现上述方法设计中CAPIF核心功能实体行为的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。例如,该装置可以为CAPIF核心功能实体,或者可以为CAPIF核心功能实体中的芯片。
在一个可能的设计中,该装置为CAPIF核心功能实体,CAPIF核心功能实体包括处理器,所述处理器被配置为支持CAPIF核心功能实体执行上述方法中相应的功能。进一步的,CAPIF核心功能实体还可以包括通信接口,所述通信接口用于支持CAPIF核心功能实体与集中式单元的用户面实体或其他网元之间的通信。进一步的,CAPIF核心功能实体还可以包括存储器,所述存储器用于与处理器耦合,其保存CAPIF核心功能实体必要的程序指令和数据。
第九方面,本申请实施例提供一种装置,该装置具有实现上述方法设计中API开放功能实体行为的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。例如,该装置可以为API开放功能实体,或者可以为API开放功能实体中的芯片。
在一个可能的设计中,该装置为API开放功能实体,API开放功能实体包括处理器,所述处理器被配置为支持API开放功能实体执行上述方法中相应的功能。进一步的,API开放功能实体还可以包括通信接口,所述通信接口用于支持API开放功能实体与集中式单元的用户面实体或其他网元之间的通信。进一步的,API开放功能实体还可以包括存储器,所述存储器用于与处理器耦合,其保存API开放功能实体必要的程序指令和数据。
第十方面,本申请实施例提供一种通信系统,该系统包括上述方面所述的调用者和API开放功能实体;或者,该系统包括上述方面所述的调用者、API开放功能实体和CAPIF核心功能实体。
第十一方面,本申请实施例提供一种计算机存储介质,用于储存为上述调用者所用的计算机软件指令,其包含用于执行上述第一方面或第四方面中调用者的动作所设计的程序。
第十二方面,本申请实施例提供一种计算机存储介质,用于储存为上述API开放功能实体所用的计算机软件指令,其包含用于执行上述第三方面或第六方面中API开放功能实体的动作所设计的程序。
第十三方面,本申请实施例提供一种计算机存储介质,用于储存为上述CAPIF核心功能实体所用的计算机软件指令,其包含用于执行上述第二方面或第四方面中CAPIF核心功能实体的动作所设计的程序。
第十四方面,本申请实施例提供一种芯片系统,应用于调用者中,所述芯片系统包括至少一个处理器,存储器和接口电路,所述存储器、所述收发器和所述至少一个处理器通过线路互联,所述至少一个存储器中存储有指令;所述指令被所述处理器执行,以执行上述方法中所述调用者的操作。
第十五方面,本申请实施例提供一种芯片系统,应用于API开放功能实体中,所述芯片系统包括至少一个处理器,存储器和接口电路,所述存储器、所述收发器和所述至少一个处理器通过线路互联,所述至少一个存储器中存储有指令;所述指令被所述处理器执行,以执行上述方法中所述API开放功能实体的操作。
第十六方面,本申请实施例提供一种芯片系统,应用于CAPIF核心功能实体中,所述芯片系统包括至少一个处理器,存储器和接口电路,所述存储器、所述收发器和所述至少一个处理器通过线路互联,所述至少一个存储器中存储有指令;所述指令被所述处理器执行,以执行上述方法中所述CAPIF核心功能实体的操作。
相较于现有技术,本申请实施例的方案中,在API开放功能实体的安全方法发生更新之后,调用者能够及时获取到API开放功能实体的新的安全方法,并使用该新的安全方法调用服务API,避免了由于安全方法不匹配导致调用失败。
附图说明
图1为本申请实施例提供的基于CAPIF的架构示意图;
图2为一种调用API的通信示意图;
图3A为本申请实施例提供的一种服务API调用方法的通信示意图;
图3B为本申请实施例提供的另一种服务API调用方法的通信示意图;
图4为本申请实施例提供的又一种服务API调用方法的通信示意图;
图5为本申请实施例提供的再一种服务API调用方法的通信示意图;
图6为本申请实施例提供的再一种服务API调用方法的通信示意图;
图7为本申请实施例提供的再一种服务API调用方法的通信示意图;
图8为本申请实施例提供的一种装置的示意性框图;
图9为本申请实施例提供的一种装置的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。
本申请实施例描述的网络架构以及应用场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新应用场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
本申请实施例的方案可以应用于图1所述的网络架构,有关该网络架构的介绍已在背景技术部分详细描述,此处不再赘述。目前,在图1所示的网络架构下,通常采用图2所示的流程调用API。如图2所示,调用流程如下:
步骤201、API publishing function向CAPIF core function发送service API公布请求,该请求中携带API信息。其中,API信息可以包括API名称、API类型、接口信息 和安全方法等。
步骤202、CAPIF core function存储上述API信息。
步骤203、CAPIF core function向API publishing function发送service API公布响应。
如果CAPIF core function收到上述API信息并存储成功,则通过该公布响应通知API publishing function该API信息公布成功。如果CAPIF未成功接收上述API信息或未存储成功,则通过该公布响应通知API publishing function该API信息公布失败。
步骤204、API invoker向CAPIF core function发送service API发现请求,该请求携带API类型和接口信息。
其中,该service API发现请求用于查询API信息。
步骤205、CAPIF core function向API invoker发送service API发现响应,该响应携带上述API信息。
同时,CAPIF core function会选择一个安全方法发送给API invoker。示例性地,该安全方法为针对某个service API的安全方法,用于API invoker和AEF之间。或者,该安全方法可以为AEF的安全方法,用于API invoker与AEF之间。
步骤206、API invoker向AEF发送service API调用请求。其中,该service API调用请求携带上述API信息。
可以理解的是,因为服务提供方在AEF上通过service API将服务开放给API invoker,所以API invoker一般通过向AEF发送请求来调用service API。
步骤207、AEF获取与上述API信息中包括的API名称和接口信息对应的安全方法。
具体地,AEF从CAPIF core function获取与上述API信息中包括的API名称和接口信息对应的安全方法。
步骤208、AEF向API invoker发送service API调用响应。
具体地,在调用service API时,API invoker和AEF之间使用之前获取的安全方法进行认证、授权和保护。如果认证和授权成功,则API invoker向service API发送调用响应。
以上流程是API invoker第一次调用某个service API的流程,API需要先到CAPIF core function出发现service API的信息并获得安全方法。之后API invoker调用service API就不需要再通过CAPIF core function获取安全方法了,而是可以直接调用service API。
然而,上述调用流程未考虑API开放功能实体或service API更新安全方法的情况,若API开放功能实体或service API更新了安全方法,API invoker在步骤206中仍使用更新前的安全方法去调用service API,将不能成功调用该service API。如何解决这个问题,目前业界没有给出相应的方案。
有鉴于此,对于API开放功能实体或service API更新安全方法的情况,本申请实施例下面将分别提供对应的调用方法。
在API开放功能实体的安全方法发生更新的情况下,本申请实施例提供一种服务API调用方法,和基于该方法的调用者、CAPIF核心功能实体和API开放功能实体。下面结合图3A对上述服务API调用方法进行介绍。
图3A为本申请实施例提供的一种服务API调用方法的通信示意图。图3A所示方法的实施前提为API开放功能实体的安全方法由旧的安全方法更新为新的安全方法。其中,API开放功能实体的安全方法用于API开放功能实体与调用者之间通信,例如,API开放功能实体的安全方法可以用于API开放功能实体与调用者之间的认证、授权和保护。图3A所示方法包括:
步骤301、CAPIF核心功能实体从API公布功能实体接收所述API开放功能的更新请求,所述更新请求包括所述API开放功能的新的安全方法。
在一个示例中,该更新请求还包括指示信息,该指示信息用于指示CAPIF核心功能实体向调用者发送新的安全方法。
步骤302、所述CAPIF核心功能实体存储新的安全方法。
在一个示例中,CAPIF核心功能实体存储调用者、新的安全方法和API开放功能实体之间的对应关系。
步骤303、调用者获取API开放功能实体的新的安全方法。
在第一个示例中,步骤303可以为步骤303a:调用者从API开放功能实体接收新的安全方法。
在一种可能的实现方式中,在执行步骤303a之前,调用者还可以向API开放功能实体发送安全方法协商请求,该安全方法协商请求包括调用者所支持的安全方法列表,该安全方法列表包括该新的安全方法。对应的,步骤303a可以包括:调用者从API开放功能实体接收安全方法协商响应,该安全方法协商响应包括该新的安全方法。
在另一种可能的实现方式中,在执行步骤303a之前,调用者还可以使用旧的安全方法向API开放功能实体发送第三调用请求,第三调用请求用于调用该服务API。对应的,步骤303a可以包括:调用者从API开放功能实体接收第三调用请求的响应消息,第三调用请求的响应消息包括该新的安全方法和原因值,该原因值用于指示由于安全方法不匹配该服务API调用失败。
在第二个示例中,步骤303可以为步骤303b:调用者从CAPIF核心功能实体接收新的安全方法。
在一种可能的实现方式中,CAPIF核心功能实体可以根据上述更新请求中的指示信息向调用者发送新的安全方法。
在另一种可能的实现方式中,在执行步骤303b之前,调用者还可以向CAPIF核心功能实体请求该新的安全方法。例如,调用者可以向CAPIF核心功能实体发送获取请求,获取请求用于请求该新的安全方法。
在本步骤中第一个示例的前一种可能的实现方式,以及第二个示例的两种实现方式中,调用者获取API开放功能实体的新的安全方法之前,还可以使用旧的安全方法向API开放功 能实体发送第二调用请求,第二调用请求用于调用该服务API;调用者还可以从API开放功能实体接收第二调用请求的响应消息,第二调用请求的响应消息包括原因值,该原因值用于指示由于安全方法不匹配该服务API调用失败。
步骤304、调用者使用新的安全方法向API开放功能实体发送第一调用请求。
其中,第一调用请求包括服务API的名称,第一调用请求用于调用该服务API。
可选的,图3A所示的方法还可以包括下列步骤:
步骤305、API开放功能实体向调用者发送第一调用请求的响应消息。
其中,第一调用请求的响应消息用于指示该服务API调用成功。
通过图3A所示的方法,当API开放功能实体的安全方法发生更新的情况下,调用者可以及时获取到API开放功能实体的新的安全方法,并使用该新的安全方法向API开放功能调用服务API,从而避免由于安全方法不匹配而导致服务API调用失败。
在服务API的安全方法发生更新的情况下,本申请实施例提供另一种服务API调用方法,和基于该方法的调用者、CAPIF核心功能实体和API开放功能实体。下面结合图3B对该服务API调用方法进行介绍。
图3B为本申请实施例提供的另一种服务API调用方法的通信示意图。图3B所示方法的实施前提为服务API的安全方法由旧的安全方法更新为新的安全方法。图3B所示方法包括:
步骤311、CAPIF核心功能实体从API公布功能实体接收所述API开放功能的更新请求,所述更新请求包括服务API的新的安全方法。
在一个示例中,该更新请求还包括指示信息,该指示信息用于指示CAPIF核心功能实体向调用者发送新的安全方法。
步骤312、所述CAPIF核心功能实体存储新的安全方法。
在一个示例中,CAPIF核心功能实体存储调用者、新的安全方法和服务API之间的对应关系。在一个具体的例子中,CAPIF核心功能实体存储调用者、新的安全方法、服务API和API开放功能实体之间的对应关系。
步骤313、调用者获取服务API的新的安全方法。
在第一个示例中,步骤313可以为步骤313a:调用者从API开放功能实体接收新的安全方法。
在一种可能的实现方式中,在执行步骤313a之前,调用者还可以向API开放功能实体发送安全方法协商请求,该安全方法协商请求包括调用者所支持的安全方法列表,该安全方法列表包括该新的安全方法。对应的,步骤313a可以包括:调用者从API开放功能实体接收安全方法协商响应,该安全方法协商响应包括该新的安全方法。
在另一种可能的实现方式中,在执行步骤313a之前,调用者还可以使用旧的安全方法向API开放功能实体发送第三调用请求,第三调用请求用于调用该服务API。对应的,步骤313a可以包括:调用者从API开放功能实体接收第三调用请求的响应消息,第三调用请求的响应消息包括该新的安全方法和原因值,该原因值用于指示由于安全方法不匹配该服务API调用失败。
在第二个示例中,步骤313可以为步骤313b:调用者从CAPIF核心功能实体接收新的安全方法。
在一种可能的实现方式中,CAPIF核心功能实体可以根据上述更新请求中的指示信息向调用者发送新的安全方法。
在另一种可能的实现方式中,在执行步骤313b之前,调用者还可以向CAPIF核心功能实体请求该新的安全方法。例如,调用者可以向CAPIF核心功能实体发送获取请求,获取请求用于请求该新的安全方法。
在本步骤中第一个示例的前一种可能的实现方式,以及第二个示例的两种实现方式中,调用者获取服务API的新的安全方法之前,还可以使用旧的安全方法向API开放功能实体发送第二调用请求,第二调用请求用于调用该服务API;调用者还可以从API开放功能实体接收第二调用请求的响应消息,第二调用请求的响应消息包括原因值,该原因值用于指示由于安全方法不匹配该服务API调用失败。
步骤314、调用者使用新的安全方法向API开放功能实体发送第一调用请求。
其中,第一调用请求包括服务API的名称,第一调用请求用于调用该服务API。
可选的,图3B所示的方法还可以包括下列步骤:
步骤315、API开放功能实体向调用者发送第一调用请求的响应消息。
其中,第一调用请求的响应消息用于指示该服务API调用成功。
通过图3B所示的方法,当服务API的安全方法发生更新的情况下,调用者可以及时获取到服务API的新的安全方法,并使用该新的安全方法向API开放功能调用服务API,从而避免由于安全方法不匹配而导致服务API调用失败。
需要说明的是,上述图3A和图3B所示的方法可以单独执行,也可以合并执行。例如,在API开放功能实体的安全方法发生更新的情况下,可以执行图3A所示的方法。在服务API的安全方法发生更新的情况下,可以执行图3B所示的方法。在API开放功能实体和服务API的安全方法均发生更新的情况下,可以合并执行图3A和图3B所示的方法,例如,步骤301可以与步骤311合并执行,步骤302可以与步骤312合并执行,步骤303可以与步骤313合并执行,步骤304可以与步骤314合并执行,步骤305可以与步骤315合并执行。当然,在图3A和图3B所示方法合并执行的情况下,还可以有其他实施方式,本申请实施例并不限定。
下面将结合图4~图7对本申请实施例的方案做进一步说明。图4~图7所示方法中,与图3所示方法相同或相似的内容,可以参考图3A或图3B中的详细描述,后续不做赘述。需要说明的是,图4~图7所示方法,以服务API的安全方法发生更新为例进行描述,在实际操作中,图4~图7所示的方法,也可以应用在API开放功能实体的安全方法发生更新的情况,这种情况下,将图4~图7所示方法中所涉及的service API的安全方法替换为API开放功能实体的安全方法即可。此外,上文中,“旧的安全方法”也可以描述为“更新前的安全方法”,二者可以互用;“新的安全方法”也可以描述为“更新后的安全方法”,二者可以互用。
图4为本申请实施例提供的又一种服务API调用方法的通信示意图。图4所示方法的主要思想是:在service API更新安全方法后,当API invoker调用service API失败时,API invoker向CAPIF core function请求service API更新后的安全方法,然后再使用该更新后的安全方法向AEF调用service API。图4所示的方法可以包括步骤401~步骤406。
需要说明的是,在执行图4所示的方法之前,CAPIF core function中保存有API invoker的标识、更新前的安全方法和service API的标识之间的对应关系。
步骤401、service API更新安全方法。
其中,以service API 1更新安全方法为例进行描述。具体地,service API 1更新了安全方法后,service API 1向CAPIF core function通知自己更新后的安全方法。其中,service API 1可以通过API publishing function向CAPIF core function发送自己更新后的安全方法。对应的,CAPIF core function接收service API 1更新后的安全方法后,存储该更新后的安全方法。
其中,CAPIF core function在存储service API 1更新后的安全方法时,可以保存API invoker的标识、service API 1更新后的安全方法和service API 1的名称之间的对应关系。例如,CAPIF core function可以将之前保存的API invoker的标识、service API1更新前的安全方法和service API 1的名称之间的对应关系中的service API 1更新前的安全方法替换为service API 1更新后的安全方法。
示例性地,API publishing function可以向CAPIF core function发送service API公布请求,该请求中携带service API 1的名称和更新后的安全方法。CAPIF core function接收该请求后,将本地存储的与该service API 1的名称对应的安全方法替换为接收到的更新后的安全方法。进一步的,CAPIF core function将更新后的安全方法存储成功后,还可以向API publishing function发送service API公布响应。
步骤402、API invoker向AEF发送service API调用请求。
这里,API invoker使用service API 1更新前的安全方法与AEF进行通信。例如,API invoker可以使用service API 1更新前的安全方法与AEF之间进行认证、授权和保护。
具体地,该service API调用请求采用更新前的安全方法对应的请求消息,该请求消息可以携带API invoker的标识。进一步的,该请求消息还可以携带service API 1的名称。
例如,更新前的安全方法为TLS-PSK,在采用这种方法时,API invoker向service API发送的调用请求为client hello消息,client hello消息中携带pre-shared key。API invoker使用该pre-shared key和AEF进行认证并建立安全连接以调用service API 1。
步骤403、AEF向API invoker发送service API调用失败响应。
其中,该service API调用失败响应中携带原因值,该原因值用于指示:由于安全方法错误调用service API 1失败。
进一步的,该service API调用失败响应中还可以携带一个指示信息,该指示信息用于指示API invoker向CAPIF core function获取该service API 1的更新后的安全方法。
步骤404、API invoker向CAPIF core function发送安全方法获取请求。
其中,该安全方法获取请求携带API调用者的标识。可选地,该安全方法获取请求还可以携带service API 1的名称。
步骤405、CAPIF core function向API invoker发送安全方法获取响应。
其中,该安全方法获取响应携带更新后的安全方法。
在一个示例中,CAPIF core function可以根据API invoker查找到与该API invoker对应的所有service API的安全方法,并发送给API invoker。具体地,CAPIF core function向API invoker发送一个或多个service API的名称与安全方法的对应组,例如这些对应组可以表示为(service API 1,安全方法1),(service API 2,安全方法2)等。
对应的,API invoker接收该安全方法获取响应后,API invoker根据该安全方法获取响应可以获知service API 1更新后的安全方法为安全方法1。
在另一个示例中,CAPIF core function可以根据API invoker的标识和service API 1的名称查找到与这两者唯一对应的一个安全方法,然后将该安全方法携带在安全方法获取响应中发送给API invoker。
步骤406、API invoker向AEF发送service API调用请求。
这里,API invoker使用service API 1更新后的安全方法与AEF进行通信。
具体地,API invoker使用service API 1更新后的安全方法与AEF之间进行认证、授权和保护。例如,该service API调用请求中携带service API 1更新后的安全方法对应的认证信息和API invoker的标识。进一步的,该调用请求还可以携带service API 1的名称。
例如,service API 1更新后的安全方法为传输层安全预共享密钥加密(transport layer security pre-shared key ciphersuites,TLS-PKI)安全方法,service API 1更新后的安全方法对应的认证信息为client hello消息中需携带的证书,API invoker向AEF发送携带该证书的client hello消息以调用service API 1。
步骤407、AEF向API invoker发送service API调用成功响应。
在一个示例中,AEF可以从CAPIF core function获取service API 1更新后的安全方法,并基于该更新后的安全方法对API invoker发送的调用请求进行认证和授权验证;若验证成功,则AEF向API invoker发送service API调用成功响应。
例如,更新后的安全方法对应的认证信息为client hello消息中需要携带的证书,若AEF基于该证书对应的TLS-PKI安全方法对API invoker进行认证成功并授权验证成功,则service API被成功调用,且AEF向API invoker发送service API调用成功响应。
在另一个示例中,AEF与API invoker之间可以使用service API 1更新后的安全方法进行认证、授权和保护。若认证和授权成功,则AEF向API invoker发送调用成功响应。
在本实施例的其他可能实现方式中,上述步骤404中的安全方法获取请求可以替换为安全方法发现请求,上述步骤405中的安全方法获取响应可以替换为安全方法发现响 应。可以理解的是,上述安全方法获取请求和安全方法获取响应也可能替换为新定义的消息,对于消息名称,本申请实施例不做限定。或者,上述步骤404和步骤405可以替换为API invoker和CAPIF core function之间的安全协商过程。
具体地,在安全协商过程中,API invoker将其所支持的所有安全方法发送给CAPIF corefunction,CAPIF core function比较收到的安全方法和API开放功能支持的安全方法,根据策略选择一个安全方法发送给API invoker,以供API invoker和API开放功能实体之间使用。
图5为本申请实施例提供的又一种服务API调用方法的通信示意图。图5所示方法的主要思想是:在service API更新安全方法后,API publishing function指示CAPIF core function主动将service API更新后的安全方法发送给API invoker,然后API invoker使用该更新后的安全方法向AEF调用service API。图5所示的方法可以包括步骤501~步骤507。
步骤501、API publishing function向CAPIF core function发送service API更新请求。
其中,该请求携带service API的名称、更新后的安全方法和指示信息。该指示信息用于指示CAPIF core function向API invoker发送service API更新后的安全方法。
步骤502、CAPIF core function更新service API的信息。
具体地,CAPIF core function将自己保存的service API的信息中的安全方法替换为更新后的安全方法。
例如,CAPIF core function原本保存有API invoker的标识、service API更新前的安全方法和service API的名称之间的对应关系,这里,CAPIF core function将该对应关系中的service API更新前的安全方法替换为service API更新后的安全方法。
步骤503、CAPIF core function向API publishing function发送service API更新响应。
步骤504、CAPIF core function向API invoker发送更新后的service API的信息。
其中,该更新后的service API的信息包含service API的名称和service API更新后的安全方法。
步骤505、API invoker向CAPIF core function发送安全方法更新确认。
步骤506和步骤507分别与图4中的步骤406和步骤407相同或相似,可以参考图4中的详细描述,此处不再赘述。
图6为本申请实施例提供的再一种服务API调用方法的通信示意图。图6所示方法的主要思想是:在service API更新安全方法后,当API invoker调用service API失败时,AEF将更新后的安全方法发送给API invoker,然后API invoker再使用该更新后的安全方法向AEF调用service API。图6所示的方法可以包括步骤601~步骤605。
步骤601和步骤602分别与图4中的步骤401和步骤402相同,可以参考图4中的详细描述,此处不再赘述。
步骤603、AEF向API invoker发送service API调用失败响应。
其中,该响应携带原因值和更新后的安全方法。该原因值用于指示:由于安全方法错误调用service API失败。
步骤604和步骤605分别与图4中的步骤406和步骤407相同,可以参考图4中的详细描述,此处不再赘述。
图7为本申请实施例提供的再一种服务API调用方法的通信示意图。图7所示方法的主要思想是:在service API更新安全方法后,当API invoker调用service API失败时,API invoker与AEF对安全方法进行协商,然后API invoker再使用协商的安全方法向AEF调用service API。图7所示的方法可以包括步骤701~步骤706。
步骤701~步骤703分别与图4中的步骤401~步骤403相同或相似,可以参考图4中的详细描述,此处不再赘述。
步骤704、API invoker向AEF发送安全方法协商请求。
其中,该请求携带API invoker支持的安全方法,例如包括安全方法A、安全方法B和安全方法C。
需要说明的是,本申请实施例中,假设该service API可能使用的安全方法仅包括安全方法A、安全方法B和安全方法C。
步骤705、AEF向API invoker发送安全方法协商响应。
其中,该响应携带安全方法C。具体地,AEF接收安全方法协商请求后,确定service API更新后的安全方法为安全方法C,然后将安全方法C携带在安全方法协商响应中发送给API invoker。
步骤706、API invoker向AEF发送service API调用请求。
这里,API invoker使用service API更新后的安全方法(即安全方法C)和AEF通信。
步骤707、AEF向API invoker发送service API调用成功响应。
其中,上述步骤706与步骤707的具体实施过程与图4中的步骤406和步骤407相似,可以参考图4中的详细描述,此处不做赘述。
上述主要从不同网元之间交互的角度对本申请实施例提供的方案进行了介绍。可以理解的是,调用者、API开放功能实体和CAPIF核心功能实体为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。结合本申请中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的 特定应用和设计约束条件。本领域技术人员可以对每个特定的应用来使用不同的方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的技术方案的范围。
本申请实施例可以根据上述方法示例对调用者、API开放功能实体和CAPIF核心功能实体等进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
在采用集成的单元的情况下,图8示出了本申请实施例中所涉及的一种装置的一种可能的示例性框图,该装置800可以以软件、硬件或软硬结合的形式存在。图8示出了本申请实施例中所涉及的装置的一种可能的示意性框图。装置800包括:处理单元802和通信单元803。处理单元802用于对装置的动作进行控制管理。通信单元803用于支持装置与其他设备的通信。装置还可以包括存储单元801,用于存储装置的程序代码和数据。
图8所示的装置800可以是本申请实施例所涉及的调用者、API开放功能实体或CAPIF核心功能实体。
当图8所示的装置800为调用者时,处理单元802能够支持装置800执行上述各方法示例中由调用者完成的动作。通信单元803能够支持装置800与CAPIF核心功能实体或API开放功能实体等之间的通信,例如,通信单元803支持装置800执行图3A中的步骤303~305,图3B中的步骤313~315,图4中的步骤402~407,图5中的步骤504~507,图6中的步骤602~605,图7中的步骤702~707,和/或其他相关的通信过程。
当图8所示的装置800为API开放功能实体时,处理单元802能够支持装置800执行上述各方法示例中由API开放功能实体完成的动作,例如,处理单元802支持装置800执行图4中的步骤401,图6中的步骤601,图7中的步骤701,和/或用于本文所描述的技术的其它过程。通信单元803能够支持装置800与调用者或CAPIF核心功能实体等之间的通信,例如,通信单元803支持装置800执行图3A中的步骤303a、304和305,图3B中的步骤313a、314和315,图4中的步骤402、403、406和407,图5中的步骤506和507,图6中的步骤602~605,图7中的步骤702~707,和/或其他相关的通信过程。
当图8所示的装置800为CAPIF核心功能实体时,处理单元802能够支持装置800执行上述各方法示例中由CAPIF核心功能实体完成的动作,例如,处理单元802支持装置800执行图3A中的步骤302,图3B中的步骤312,图4中的步骤401,图5中的步骤502,图6中的步骤601,图7中的步骤701,和/或用于本文所描述的技术的其它过程。通信单元803能够支持装置800与调用者、API开放功能实体或API公布功能实体等之间的通信,例如,通信单元803支持装置800执行图3A中的步骤301和303b,图3B中的步骤311和313b,图4中的步骤404和405,图5中的步骤501以及步骤503~505,和/或其他相关的通信过程。
示例性地,处理单元802可以是处理器或控制器,例如可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP), 专用集成电路(Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,单元和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信单元803可以是通信接口,该通信接口是统称,在具体实现中,该通信接口可以包括一个或多个接口。存储单元801可以是存储器。
当处理单元802为处理器,通信单元803为通信接口,存储单元801为存储器时,本申请实施例所涉及的装置可以为图9所示的装置900。
参阅图9所示,该装置900包括:处理器902和通信接口903。进一步地,该装置900还可以包括存储器901。可选的,装置900还可以包括总线904。其中,通信接口903、处理器902以及存储器901可以通过总线904相互连接;总线904可以是外设部件互连标准(Peripheral Component Interconnect,简称PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,简称EISA)总线等。所述总线904可以分为地址总线、数据总线、控制总线等。为便于表示,图9中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
其中,处理器902可以通过运行或执行存储在存储器901内的程序,执行所述装置900的各种功能。
示例性地,图9所示的装置900可以是本申请实施例所涉及的调用者、CAPIF核心功能实体或API开放功能实体。
当装置900为调用者时,处理器902可以通过运行或执行存储在存储器901内的程序,执行上述各方法示例中由调用者完成的动作。当装置900为CAPIF核心功能实体时,处理器902可以通过运行或执行存储在存储器901内的程序,执行上述各方法示例中由CAPIF核心功能实体完成的动作。
当装置900为API开放功能实体时,处理器902可以通过运行或执行存储在存储器901内的程序,执行上述各方法示例中由API开放功能实体的动作。
结合本申请实施例公开内容所描述的方法或者算法的步骤可以硬件的方式来实现,也可以是由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于随机存取存储器(Random Access Memory,RAM)、闪存、只读存储器(Read Only Memory,ROM)、可擦除可编程只读存储器(Erasable Programmable ROM,EPROM)、电可擦可编程只读存储器(Electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、只读光盘(CD-ROM)或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。另外,该ASIC可以位于调用者、CAPIF核心功能实体或API开放功能实体中。当然,处理器和存储介质也可以作为分立组件存在于调用者、CAPIF核心功能实体或API开放功能实体中。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述 的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上所述的具体实施方式,对本申请实施例的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本申请实施例的具体实施方式而已,并不用于限定本申请实施例的保护范围,凡在本申请实施例的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本申请实施例的保护范围之内。

Claims (49)

  1. 一种服务应用程序编程接口API的调用方法,其特征在于,所述方法包括:
    调用者获取API开放功能实体的新的安全方法;
    所述调用者使用所述新的安全方法向所述API开放功能实体发送第一调用请求,所述第一调用请求包括服务API的名称,所述第一调用请求用于调用所述服务API。
  2. 根据权利要求1的方法,其特征在于,所述调用者获取所述API开放功能实体的新的安全方法,包括:
    所述调用者从通用的API框架CAPIF核心功能实体接收所述新的安全方法。
  3. 根据权利要求2所述的方法,其特征在于,所述调用者从通用的API框架CAPIF核心功能实体接收所述新的安全方法之前,所述方法还包括:
    所述调用者向所述CAPIF核心功能实体请求所述新的安全方法。
  4. 根据权利要求1所述的方法,其特征在于,所述调用者获取所述API开放功能实体的新的安全方法,包括:
    所述调用者从所述API开放功能实体接收所述新的安全方法。
  5. 根据权利要求4所述的方法,其特征在于,所述调用者获取所述API开放功能实体的新的安全方法之前,所述方法还包括:
    所述调用者向所述API开放功能实体发送安全方法协商请求,所述安全方法协商请求包括所述调用者所支持的安全方法列表,所述安全方法列表包括所述新的安全方法;
    所述调用者从所述API开放功能实体接收所述新的安全方法,包括:
    所述调用者从所述API开放功能实体接收安全方法协商响应,所述安全方法协商响应包括所述新的安全方法。
  6. 根据权利要求2至5任一项所述的方法,其特征在于,所述调用者获取所述API开放功能实体的新的安全方法之前,所述方法还包括:
    所述调用者使用所述旧的安全方法向所述API开放功能实体发送第二调用请求,所述第二调用请求用于调用所述服务API;
    所述调用者从所述API开放功能实体接收所述第二调用请求的响应消息,所述第二调用请求的响应消息包括原因值,所述原因值用于指示由于安全方法不匹配所述服务API调用失败。
  7. 根据权利要求4所述的方法,其特征在于,所述调用者从所述API开放功能实体接收所述新的安全方法之前,所述方法还包括:
    所述调用者使用所述旧的安全方法向所述API开放功能发送第三调用请求,所述第三调用请求用于调用所述服务API;
    所述调用者从所述API开放功能实体接收所述新的安全方法,包括:
    所述调用者从所述API开放功能实体接收所述第三调用请求的响应消息,所述第三调用请求的响应消息包括所述新的安全方法和原因值,所述原因值用于指示由于安全方法不匹配所述服务API调用失败。
  8. 根据权利要求1至7任一项所述的方法,其特征在于,所述方法还包括:
    所述调用者从所述API开放功能实体接收所述第一调用请求的响应消息,所述第一调用请求的响应消息用于指示所述服务API调用成功。
  9. 一种服务应用程序编程接口API的调用方法,其特征在于,所述方法包括:
    通用的API框架CAPIF核心功能实体从API公布功能实体接收API开放功能的更新请求,所述更新请求包括所述API开放功能的新的安全方法;
    所述CAPIF核心功能实体存储所述新的安全方法。
  10. 根据权利要求9所述的方法,其特征在于,所述方法还包括:
    所述CAPIF核心功能实体向调用者发送所述新的安全方法。
  11. 根据权利要求9或10所述的方法,其特征在于,所述更新请求还包括指示信息,所述指示信息用于指示所述CAPIF核心功能实体向所述调用者发送所述新的安全方法。
  12. 根据权利要求10所述的方法,其特征在于,所述CAPIF核心功能实体向调用者发送所述新的方法之前,所述方法还包括:
    所述CAPIF核心功能实体从所述调用者接收获取请求,所述获取请求用于请求所述新的安全方法。
  13. 根据权利要求9至12任一项所述的方法,其特征在于,所述CAPIF核心功能实体存储所述新的安全方法,包括:
    所述CAPIF核心功能实体存储所述调用者、所述新的安全方法和所述API开放功能实体之间的对应关系。
  14. 一种服务应用程序编程接口API的调用方法,其特征在于,所述方法包括:
    API开放功能实体接收调用者使用新的安全方法发送的第一调用请求,所述第一调用请求包括所述服务API的名称,所述第一调用请求用于调用所述服务API;
    所述API开放功能实体使用所述新的安全方法对所述调用者进行验证。
  15. 根据权利要求14所述的方法,其特征在于,所述API开放功能实体接收调用者使用所述新的安全方法发送的第一调用请求之前,所述方法还包括:
    所述API开放功能实体向所述调用者发送所述新的安全方法。
  16. 根据权利要求15所述的方法,其特征在于,所述API开放功能实体向所述调用者发送所述新的安全方法之前,所述方法还包括:
    所述API开放功能实体从所述调用者接收安全方法协商请求,所述安全方法协商请求包括所述调用者所支持的安全方法列表,所述安全方法列表包括所述新的安全方法;
    所述API开放功能实体向所述调用者发送安全方法协商响应,所述安全方法协商响应包括所述新的方法。
  17. 根据权利要求14所述的方法,其特征在于,所述API开放功能实体向所述调用者发送所述新的安全方法之前,所述方法还包括:
    所述API开放功能实体接收所述调用者使用所述旧的安全方法发送的第二调用请求,所述第二调用请求用于调用所述服务API;
    所述API开放功能实体向所述调用者发送所述第二调用请求的响应消息,所述第二调 用请求的响应消息用于指示所述服务API调用失败。
  18. 根据权利要求17所述的方法,其特征在于,所述第二调用请求的响应消息包括原因值,所述原因值用于指示由于安全方法不匹配所述服务API调用失败。
  19. 根据权利要求15所述的方法,其特征在于,所述API开放功能实体向所述调用者发送所述新的安全方法之前,所述方法还包括:
    所述API开放功能接收所述调用者使用所述旧的安全方法发送的第三调用请求,所述第三调用请求用于调用所述服务API;
    所述API开放功能实体向所述调用者发送所述新的安全方法,包括:
    所述API开放功能实体向所述调用者发送所述第三调用请求的响应消息,所述第三调用请求的响应消息包括所述API开放功能实体的新的安全方法和原因值,所述原因值用于指示由于安全方法不匹配所述服务API调用失败。
  20. 根据权利要求14至19任一项所述的方法,其特征在于,所述方法还包括:
    所述API开放功能实体向所述调用者发送所述第一调用请求的响应消息,所述第一调用请求的响应消息用于指示所述服务API调用成功。
  21. 一种调用者,其特征在于,包括:处理单元和通信单元;
    所述处理单元,用于获取应用程序编程接口API开放功能实体的新的安全方法;
    所述通信单元,用于使用所述新的安全方法向所述API开放功能实体发送第一调用请求,所述第一调用请求包括服务API的名称,所述第一调用请求用于调用所述服务API。
  22. 根据权利要求21所述的调用者,其特征在于,所述处理单元,用于获取应用程序编程接口API开放功能实体的新的安全方法,具体为:
    所述处理单元,用于通过所述通信单元从通用的API框架CAPIF核心功能实体接收所述新的安全方法。
  23. 根据权利要求21所述的调用者,其特征在于,在所述处理单元从通用的API框架CAPIF核心功能实体接收所述新的安全方法之前,所述处理单元,还用于通过所述通信单元向所述CAPIF核心功能实体请求所述新的安全方法。
  24. 根据权利要求21所述的调用者,其特征在于,所述处理单元,用于获取应用程序编程接口API开放功能实体的新的安全方法,具体为:
    所述处理单元,用于通过所述通信单元从所述API开放功能实体接收所述新的安全方法。
  25. 根据权利要求24所述的调用者,其特征在于,所述通信单元,还用于向所述API开放功能实体发送安全方法协商请求,所述安全方法协商请求包括所述调用者所支持的安全方法列表,所述安全方法列表包括所述新的安全方法;
    其中,所述处理单元,用于通过所述通信单元从所述API开放功能实体接收所述新的安全方法,具体为:从所述API开放功能实体接收安全方法协商响应,所述安全方法协商响应包括所述新的安全方法。
  26. 根据权利要求22-25任一所述的调用者,其特征在于,在获取所述API开放功能实体的新的安全方法之前,所述通信单元,还用于使用旧的安全方法向所述API开放功能实体发送第二调用请求,所述第二调用请求用于调用所述服务API;从所述API开放功能实 体接收所述第二调用请求的响应消息,所述第二调用请求的响应消息包括原因值,所述原因值用于指示由于安全方法不匹配所述服务API调用失败。
  27. 根据权利要求24所述的调用者,其特征在于,所述处理单元,用于使用旧的安全方法通过所述通信单元向所述API开放功能发送第三调用请求,所述第三调用请求用于调用所述服务API;从所述API开放功能实体接收所述第三调用请求的响应消息,所述第三调用请求的响应消息包括所述新的安全方法和原因值,所述原因值用于指示由于安全方法不匹配所述服务API调用失败。
  28. 根据权利要求21至27任一项所述的调用者,其特征在于,所述通信单元,还用于从所述API开放功能实体接收所述第一调用请求的响应消息,所述第一调用请求的响应消息用于指示所述服务API调用成功。
  29. 一种通用的应用程序编程接口框架CAPIF核心功能实体,其特征在于,所述CAPIF核心功能实体包括通信单元和存储单元;
    所述通信单元,用于从应用程序编程接口API公布功能实体接收所述API开放功能的更新请求,所述更新请求包括所述API开放功能的新的安全方法;
    所述存储单元,用于存储所述新的安全方法。
  30. 根据权利要求29所述的CAPIF核心功能实体,其特征在于,所述通信单元,还用于向所述调用者发送所述新的方法。
  31. 根据权利要求29或者30所述的CAPIF核心功能实体,其特征在于,所述更新请求还包括指示信息,所述指示信息用于指示所述CAPIF核心功能实体向所述调用者发送所述新的安全方法。
  32. 根据权利要求31所述的CAPIF核心功能实体,其特征在于,所述通信单元,还用于从所述调用者接收获取请求,所述获取请求用于请求所述新的安全方法。
  33. 根据权利要求29-32任一所述的CAPIF核心功能实体,其特征在于,所述存储单元,用于存储所述新的安全方法,具体为:
    存储所述调用者、所述新的安全方法和所述API开放功能实体之间的对应关系。
  34. 一种应用程序编程接口API开放功能实体,其特征在于,包括:通信单元和处理单元;
    所述通信单元,用于接收调用者使用新的安全方法发送的第一调用请求,所述第一调用请求包括所述服务API的名称,所述第一调用请求用于调用所述服务API;
    所述处理单元,用于使用所述新的安全方法对所述调用者进行验证。
  35. 根据权利要求34所述的API开放功能实体,其特征在于,所述通信单元,还用于向所述调用者发送所述新的安全方法。
  36. 根据权利要求35所述的API开放功能实体,其特征在于,所述通信单元,还用于从所述调用者接收安全方法协商请求,所述安全方法协商请求包括所述调用者所支持的安全方法列表,所述安全方法列表包括所述新的安全方法;向所述调用者发送安全方法协商响应,所述安全方法协商响应包括所述新的安全方法。
  37. 根据权利要求34所述的API开放功能实体,其特征在于,所述通信单元,还用于接收所述调用者使用所述旧的安全方法发送的第二调用请求,所述第二调用请求用于调用 所述服务API;向所述调用者发送所述第二调用请求的响应消息,所述第二调用请求的响应消息用于指示所述服务API调用失败。
  38. 根据权利要求37所述的API开放功能实体,其特征在于,所述第二调用请求的响应消息包括原因值,所述原因值用于指示由于安全方法不匹配所述服务API调用失败。
  39. 根据权利要求35所述的API开放功能实体,其特征在于,所述通信单元,还用于接收所述调用者使用所述旧的安全方法发送的第三调用请求,所述第三调用请求用于调用所述服务API;
    所述通信单元,用于向所述调用者发送所述新的安全方法,具体为:向所述调用者发送所述第三调用请求的响应消息,所述第三调用请求的响应消息包括所述API开放功能实体的新的安全方法和原因值,所述原因值用于指示由于安全方法不匹配所述服务API调用失败。
  40. 根据权利要求34至39任一项所述的API开放功能实体,其特征在于,所述通信单元,还用于向所述调用者发送所述第一调用请求的响应消息,所述第一调用请求的响应消息用于指示所述服务API调用成功。
  41. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行如权利要求1至8中任一项所述的方法。
  42. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行如权利要求9至13中任一项所述的方法。
  43. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行如权利要求14至20中任一项所述的方法。
  44. 一种装置,其特征在于,所述装置包括处理器和存储器;
    所述存储器用于存储计算机执行指令,当所述装置运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述装置执行如权利要求1-8任一所述的方法。
  45. 一种装置,其特征在于,所述装置包括处理器和存储器;
    所述存储器用于存储计算机执行指令,当所述装置运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述装置执行如权利要求9-13任一所述的方法。
  46. 一种装置,其特征在于,所述装置包括处理器和存储器;
    所述存储器用于存储计算机执行指令,当所述装置运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述装置执行如权利要求14-20任一所述的方法。
  47. 一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述1到20任一项所述的方法。
  48. 一种服务应用程序编程接口API的调用系统,其特征在于,包括如权利要求44所述的装置和如权利要求46所述的装置。
  49. 根据权利要求48所述的系统,所述系统还包括如权利要求45所述的装置。
PCT/CN2019/081861 2018-04-09 2019-04-09 一种服务api调用方法和相关装置 WO2019196819A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
BR112020019925-7A BR112020019925A2 (pt) 2018-04-09 2019-04-09 Método de invocação de api de serviço e aparelho relacionado
KR1020207032274A KR102488798B1 (ko) 2018-04-09 2019-04-09 서비스 api 호출 방법 및 관련 장치
AU2019251158A AU2019251158B2 (en) 2018-04-09 2019-04-09 Service API invoking method and related device
JP2020555187A JP7100153B2 (ja) 2018-04-09 2019-04-09 サービスapi呼び出し方法および関連装置
EP19785473.0A EP3779696A4 (en) 2018-04-09 2019-04-09 SERVICE API CALL PROCESS AND RELATED DEVICE
US17/066,902 US11989284B2 (en) 2018-04-09 2020-10-09 Service API invoking method and related apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810312734.1 2018-04-09
CN201810312734.1A CN110362412A (zh) 2018-04-09 2018-04-09 一种服务api调用方法和相关装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/066,902 Continuation US11989284B2 (en) 2018-04-09 2020-10-09 Service API invoking method and related apparatus

Publications (1)

Publication Number Publication Date
WO2019196819A1 true WO2019196819A1 (zh) 2019-10-17

Family

ID=68162818

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/081861 WO2019196819A1 (zh) 2018-04-09 2019-04-09 一种服务api调用方法和相关装置

Country Status (8)

Country Link
US (1) US11989284B2 (zh)
EP (1) EP3779696A4 (zh)
JP (1) JP7100153B2 (zh)
KR (1) KR102488798B1 (zh)
CN (1) CN110362412A (zh)
AU (1) AU2019251158B2 (zh)
BR (1) BR112020019925A2 (zh)
WO (1) WO2019196819A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230046570A1 (en) * 2020-02-14 2023-02-16 Telefonaktiebolaget Lm Ericsson (Publ) Method and network entity for service api publishing
WO2022067736A1 (zh) * 2020-09-30 2022-04-07 华为技术有限公司 一种通信方法及装置
CN117795915A (zh) * 2022-07-29 2024-03-29 北京小米移动软件有限公司 应用程序接口api认证方法、装置、通信设备及存储介质
CN117795905A (zh) * 2022-07-29 2024-03-29 北京小米移动软件有限公司 Api调用者认证方法以及装置、通信设备及存储介质
CN118138258A (zh) * 2022-12-02 2024-06-04 Oppo广东移动通信有限公司 权限管理方法及相关产品

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005064429A1 (en) * 2003-12-23 2005-07-14 Telefonaktiebolaget Lm Ericsson (Publ) Method and device for taking an access control policy decision
CN105634743A (zh) * 2015-12-30 2016-06-01 中国银联股份有限公司 用于开放接口调用的认证方法
CN106067886A (zh) * 2016-08-03 2016-11-02 广州唯品会信息科技有限公司 安全策略更新方法及系统
CN107026853A (zh) * 2017-03-24 2017-08-08 中国联合网络通信集团有限公司 安全认证方法、系统和服务器

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050091576A1 (en) * 2003-10-24 2005-04-28 Microsoft Corporation Programming interface for a computer platform
NO318842B1 (no) 2002-03-18 2005-05-09 Telenor Asa Autentisering og tilgangskontroll
US8195940B2 (en) * 2002-04-05 2012-06-05 Qualcomm Incorporated Key updates in a mobile wireless system
US7493592B2 (en) * 2003-10-24 2009-02-17 Microsoft Corporation Programming interface for a computer platform
US8621598B2 (en) 2008-03-12 2013-12-31 Intuit Inc. Method and apparatus for securely invoking a rest API
CN103188344A (zh) 2013-02-22 2013-07-03 浪潮电子信息产业股份有限公司 一种安全调用rest api的方法
US9825956B2 (en) * 2015-10-06 2017-11-21 Netflix, Inc. Systems and methods for access permission revocation and reinstatement
RU2618946C1 (ru) 2015-12-18 2017-05-11 Акционерное общество "Лаборатория Касперского" Способ блокировки доступа к данным на мобильных устройствах с использованием API для пользователей с ограниченными возможностями
US10942794B2 (en) 2017-05-02 2021-03-09 Samsung Electronics Co.. Ltd. Method and apparatus for providing network-based northbound application programming interface in a wireless communication system
CN117082511A (zh) * 2018-04-06 2023-11-17 日本电气株式会社 Api调用者装置及其方法和ccf节点及其方法
EP3791615A4 (en) * 2018-11-15 2022-02-23 Telefonaktiebolaget LM Ericsson (publ) API CALLING ENTITY AUTHORIZATION REVOCATION METHOD AND APPARATUS
EP4120108A1 (en) * 2019-02-16 2023-01-18 Samsung Electronics Co., Ltd. Method and apparatus for registering api provider domain function entities on capif core function entity

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005064429A1 (en) * 2003-12-23 2005-07-14 Telefonaktiebolaget Lm Ericsson (Publ) Method and device for taking an access control policy decision
CN105634743A (zh) * 2015-12-30 2016-06-01 中国银联股份有限公司 用于开放接口调用的认证方法
CN106067886A (zh) * 2016-08-03 2016-11-02 广州唯品会信息科技有限公司 安全策略更新方法及系统
CN107026853A (zh) * 2017-03-24 2017-08-08 中国联合网络通信集团有限公司 安全认证方法、系统和服务器

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3779696A4

Also Published As

Publication number Publication date
BR112020019925A2 (pt) 2021-01-05
AU2019251158A1 (en) 2020-11-26
EP3779696A1 (en) 2021-02-17
US20210081527A1 (en) 2021-03-18
US11989284B2 (en) 2024-05-21
AU2019251158B2 (en) 2022-02-03
JP7100153B2 (ja) 2022-07-12
JP2021518016A (ja) 2021-07-29
KR20200141483A (ko) 2020-12-18
KR102488798B1 (ko) 2023-01-13
CN110362412A (zh) 2019-10-22
EP3779696A4 (en) 2021-05-12

Similar Documents

Publication Publication Date Title
WO2019196819A1 (zh) 一种服务api调用方法和相关装置
US11477625B2 (en) System, apparatus and method for scalable internet of things (IoT) device on-boarding with quarantine capabilities
US11956361B2 (en) Network function service invocation method, apparatus, and system
EP3804282B1 (en) Native blockchain platform for improving workload mobility in telecommunication networks
US20210297410A1 (en) Mec platform deployment method and apparatus
CN111865598B (zh) 网络功能服务的身份校验方法及相关装置
EP3668042B1 (en) Registration method and apparatus based on service-oriented architecture
WO2019028837A1 (zh) Pdu类型的设置方法、ue策略的设置方法及相关实体
US20200119909A1 (en) Discovery Method and Apparatus Based on Service-Based Architecture
US20240196214A1 (en) Facilitating Residential Wireless Roaming Via VPN Connectivity Over Public Service Provider Networks
US20230275803A1 (en) Compromised network node detection system
US11665532B2 (en) Securing private wireless gateways
WO2022170994A1 (zh) Pc5根密钥处理方法、装置、ausf及远程终端
WO2019056971A1 (zh) 一种鉴权方法及设备
WO2015113387A1 (zh) 一种相邻节点注册方法和装置、跨节点注册方法和系统
WO2021196913A1 (zh) 一种终端参数更新的保护方法和通信装置
RU2792657C2 (ru) Способ вызова сервисного api и соответствующее устройство
US11570009B1 (en) Systems and methods for onboarding IoT devices with session certificates
US20240205224A1 (en) Methods for constructing trusted grid, trusted grids, and application interaction methods thereon
WO2024055880A1 (zh) 一种注册方法、装置及可读存储介质
US20240022910A1 (en) Signaling protection method, apparatus, and system
CN117528512A (zh) 一种通信认证方法及相关设备
CN116961931A (zh) 一种边缘计算组网方法、装置及电子设备
WO2018176492A1 (zh) 一种配置文件的管理方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19785473

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020555187

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112020019925

Country of ref document: BR

ENP Entry into the national phase

Ref document number: 20207032274

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2019785473

Country of ref document: EP

Effective date: 20201105

ENP Entry into the national phase

Ref document number: 2019251158

Country of ref document: AU

Date of ref document: 20190409

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 112020019925

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20200929