WO2023011630A1 - Authorization verification method and apparatus - Google Patents

Authorization verification method and apparatus Download PDF

Info

Publication number
WO2023011630A1
WO2023011630A1 PCT/CN2022/110535 CN2022110535W WO2023011630A1 WO 2023011630 A1 WO2023011630 A1 WO 2023011630A1 CN 2022110535 W CN2022110535 W CN 2022110535W WO 2023011630 A1 WO2023011630 A1 WO 2023011630A1
Authority
WO
WIPO (PCT)
Prior art keywords
network element
identifier
service
request message
access token
Prior art date
Application number
PCT/CN2022/110535
Other languages
French (fr)
Chinese (zh)
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 华为技术有限公司
Publication of WO2023011630A1 publication Critical patent/WO2023011630A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/08Access security
    • H04W12/084Access security using delegated authorisation, e.g. open authorisation [OAuth] protocol
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/12Detection or prevention of fraud
    • H04W12/121Wireless intrusion detection systems [WIDS]; Wireless intrusion prevention systems [WIPS]
    • H04W12/122Counter-measures against attacks; Protection against rogue devices

Definitions

  • the NF service provider verifies whether the NF set ID in the claims matches its own NF Set ID;
  • the SCP If the SCP stores an available access token, or the access token is included in S301, the SCP skips S303 to S305, and directly executes the service request process to the NF service provider.
  • the SCP stores an available access token, or the access token is included in S301.
  • the SCP sends an NF service response message to the NF service consumer.
  • the first network element receives a service request message.
  • the first network element requests the third network element to verify whether the second network element belongs to the first NF set.
  • the first network element sends a first verification request message to the third network element, the first verification request message includes the identifier of the second network element and the identifier of the first NF set, and the first verification request message is used for Request to verify whether the second network element belongs to the first NF set (or the NF set indicated by the identifier of the first NF set), or in other words, the first verification request message is used to request to verify whether the identifier of the second network element is consistent with the first NF set
  • the identity of an NF set corresponds, or in other words, the first verification request message is used to request to verify whether the identity of the NF set to which the second network element belongs matches the identity of the first NF set.
  • the third network element sends indication information to the first network element, the indication information is used to indicate whether the second network element belongs to the first NF set, or the indication information is used to indicate whether the identifier of the second network element is consistent with the first NF set The identity of an NF set corresponds, or the indication information is used to indicate whether the identity of the second NF set matches the identity of the first NF set.
  • the first network element receives the indication information from the third network element, and determines whether the second network element belongs to the first NF set according to the indication information.
  • the first network element obtains the identifier of the NF set corresponding to the second network element through the third network element, and verifies whether the second network element belongs to the First NF set.
  • the first network element sends a second verification request message to the third network element, the second verification request message includes the identifier of the second network element, and the second verification request message is used to request to obtain the identifier of the second network element
  • the identifier of the corresponding NF set (denoted as the identifier of the second NF set).
  • the SCP sends the access token acquisition response message to the NFc1.
  • the NFp verifies the integrity of the access token.
  • NFp After NFp determines that NFc2 has the right to use the access token, further, NFp verifies the parameters in claims, for example:
  • NFp verifies whether it matches the requested service operation
  • Fig. 13 shows an exemplary flow chart of a method 800 provided by an embodiment of the present application.
  • the service consumer does not directly communicate with the NRF network element, and the SCP network element communicates with the NRF network element on behalf of the service consumer.
  • Method 800 may be implemented in conjunction with method 600 , for example, method 800 may be implemented after method 600 .
  • the method 800 may also be implemented independently, which is not limited in this application.
  • Method 800 includes:
  • NFp determines that NFc2 has the right to request the service, then NFp processes the NF service request of NFc2, and sends an NF service response message to the NF service consumer through the SCP. If any one of the above verification processes fails, the NFp sends an NF service response to the NFc2 through the SCP, and the NF service response is used to reject the NF service request.
  • the processing unit 12 is configured to determine whether to authorize the second network element to use the first service according to the identifier of the first NF set.
  • the transceiving unit 11 is specifically configured to: send a first verification request message to a third network element, where the first verification request message is used to request verification of whether the second network element belongs to the identifier of the first NF set Indicating the first NF set, the first verification request message includes the identifier of the second network element and the identifier of the first NF set; receiving indication information from the third network element;
  • the disclosed devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the above units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or can be Integrate into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • each functional unit in each embodiment of the present application may be integrated into one unit, each unit may exist separately physically, or two or more units may be integrated into one unit.

Abstract

Provided in the present application is an authorization verification method. The method may comprise: a first network element receiving a service request message associated with a second network element, wherein the service request message is used for requesting a first service, which is provided by the first network element for the second network element, the service request message comprises an access token, the access token comprises an identifier of a first network function (NF) set, and the identifier of the first NF set is used for indicating a service request network element to which the access token is applicable; and the first network element determining, according to the identifier of the first NF set, whether to authorize the second network element to use the first service. In the present application, whether a network element that requests for a service belongs to an NF set corresponding to an access token carried in a request message is verified, so as to determine whether to authorize the network element, such that a malicious NF service consumer can be blocked from using the access token in an unauthorized manner to acquire a service.

Description

授权验证的方法及装置Method and device for authorization verification
本申请要求于2021年08月06日提交中国专利局、申请号为202110904483.8、申请名称为“授权验证的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110904483.8 and the application title "Method and Device for Authorization Verification" submitted to the China Patent Office on August 06, 2021, the entire contents of which are incorporated in this application by reference.
技术领域technical field
本申请涉及通信技术领域,尤其涉及一种授权验证的方法及装置。The present application relates to the technical field of communications, and in particular to a method and device for authorization verification.
背景技术Background technique
第五代(5th generation,5G)服务化系统架构中,基于服务化接口通信的双方分别称为服务消费者(service consumer)和服务提供者(service producer)。其中,请求服务的一方称为服务消费者(也可以称为服务请求网元),提供服务的一方称为服务提供者(也可以称为服务提供网元)。NF服务消费者向NF服务提供者请求服务时,网络功能(network function,NF)服务提供者需要对NF服务消费者请求的服务进行授权检查,即检查NF服务消费者是否被授权使用请求的服务,通过授权流程保证服务消费者获取的是授权的服务,防止恶意的NF服务消费者越权或者非法使用服务。例如,NF服务请求者首先获取访问令牌(access token),并在发送给NF服务提供者的服务请求消息中携带该access token,NF服务提供者根据该access token对服务请求执行授权检查。In the fifth generation (5th generation, 5G) service-oriented system architecture, the two parties communicating based on the service-oriented interface are called service consumer and service provider respectively. Wherein, a party requesting a service is called a service consumer (also called a service requesting network element), and a party providing a service is called a service provider (also called a service providing network element). When an NF service consumer requests a service from an NF service provider, the network function (network function, NF) service provider needs to perform an authorization check on the service requested by the NF service consumer, that is, check whether the NF service consumer is authorized to use the requested service , through the authorization process to ensure that service consumers obtain authorized services, and prevent malicious NF service consumers from overreaching or illegally using services. For example, the NF service requester first obtains an access token, and carries the access token in the service request message sent to the NF service provider, and the NF service provider performs an authorization check on the service request based on the access token.
另一方面,为了保证网络更加可靠,引入了NF集(set)的概念。例如NF set可以是一组具有相同类型、支持相同网络切片、且可互换的NF实例,再例如同一NF集中的NF实例可以部署在不同的地理位置上,但可以访问相同的上下文数据,在故障、或者负载均衡等场景下,NF set中的任一NF都可以被NF Set中的其他NF替换,从而实现了NF之间的负载均衡或容灾备份的目的,保证了网络的可靠性。On the other hand, in order to ensure that the network is more reliable, the concept of NF set (set) is introduced. For example, NF set can be a group of interchangeable NF instances that have the same type, support the same network slice, and for example, NF instances in the same NF set can be deployed in different geographical locations, but can access the same context data. In scenarios such as faults or load balancing, any NF in the NF set can be replaced by other NFs in the NF Set, thereby achieving the purpose of load balancing or disaster recovery between NFs and ensuring the reliability of the network.
在NF set场景下,如何减少频繁申请访问令牌,且避免越权或非法使用访问令牌获取服务是当前亟需解决的问题。In the NF set scenario, how to reduce frequent application for access tokens and avoid unauthorized or illegal use of access tokens to obtain services is an urgent problem to be solved.
发明内容Contents of the invention
本申请提供了一种授权验证的方法,以防止恶意的NF服务消费者越权使用访问令牌获取服务。This application provides an authorization verification method to prevent malicious NF service consumers from using access tokens to obtain services beyond their authority.
第一方面,提供了一种授权验证的方法,该方法包括:第一网元接收与第二网元关联的服务请求消息,该服务请求消息用于请求该第一网元向该第二网元提供的第一服务,该服务请求消息包括访问令牌,该访问令牌包括第一网络功能NF集的标识,该第一NF集的标识用于指示该访问令牌适用的服务请求网元;该第一网元根据该第一NF集的标识,确定是否授权该第二网元使用该第一服务。In a first aspect, a method for authorization verification is provided, the method includes: a first network element receives a service request message associated with a second network element, and the service request message is used to request the first network element to send the second network element The first service provided by the element, the service request message includes an access token, and the access token includes the identifier of the first network function NF set, and the identifier of the first NF set is used to indicate the service requesting network element to which the access token applies ; The first network element determines whether to authorize the second network element to use the first service according to the identifier of the first NF set.
其中,访问令牌适用的服务请求网元具体可以是指只有适用的服务请求网元才可能使 用该访问令牌以获取服务,或者说任意不属于所述适用的服务请求网元范围内的网元都不可以使用该访问令牌以获取服务。例如,所述第一NF集的标识指示了NF1、NF2…以及NFn,则任意不属于NF1、NF2…以及NFn中的一个NF都不可以使用该访问令牌,当然某个属于NF1、NF2…以及NFn中的一个NF是否可以使用该访问令牌以获得服务,可能还需要根据其他条件进行判断。本申请对此不做限制。Wherein, the service requesting network element applicable to the access token may specifically mean that only the applicable service requesting network element may use the access token to obtain the service, or any network element that does not belong to the scope of the applicable service requesting network element Neither element can use the access token to obtain services. For example, if the identifier of the first NF set indicates NF1, NF2... and NFn, any NF that does not belong to NF1, NF2... and NFn cannot use the access token. And whether an NF in the NFn can use the access token to obtain the service may also need to be judged according to other conditions. This application does not limit this.
基于上述技术方案,在第二网元向第一网元请求第一服务的过程中,第一网元根据该请求消息中携带的访问令牌中的第一NF集的标识,来确定是否授权第二网元使用第一服务,从而可以防止恶意的NF服务消费者越权使用访问令牌获取服务。Based on the above technical solution, when the second network element requests the first service from the first network element, the first network element determines whether to authorize or not according to the identifier of the first NF set in the access token carried in the request message The second network element uses the first service, so that malicious NF service consumers can be prevented from using the access token to obtain services beyond their authority.
该服务请求消息与第二网元关联,可以理解为,第一网元是直接从第二网元接收的该服务请求消息,或者第一网元通过服务通信代理网元接收的用于请求向第二网元提供服务的服务请求消息。例如,在直接通信场景下,第一网元从第二网元接收该服务请求消息;在间接通信场景下,第一网元从服务通信代理网元接收该服务请求消息。The service request message is associated with the second network element. It can be understood that the service request message received by the first network element directly from the second network element, or the service request message received by the first network element through the service communication agent network element The second network element provides a service request message for the service. For example, in the direct communication scenario, the first network element receives the service request message from the second network element; in the indirect communication scenario, the first network element receives the service request message from the service communication proxy network element.
该第一网元可以是一种服务提供网元,该第二网元可以是一种服务请求网元。该第一网元根据该第一NF集的标识,确定是否授权该第二网元使用该第一服务,还可以理解为,第一网元根据该第一NF集的标识,确定第二网元是否被授权使用第一服务;或者还可以理解为,第一网元根据该第一NF集的标识,确定向第二网元提供第一服务或者拒绝向第二网元提供第一服务;或者还可以理解为,第一网元根据该第一NF集的标识,提供请求的第一服务(或者说执行第一服务)并发送响应消息,或者发送指示服务请求失败的响应消息;或者还可以理解为,第一网元根据该第一NF集的标识,提供请求的第一服务(或者说执行第一服务)并发送响应消息,或者发送指示拒绝服务请求的响应消息。The first network element may be a service providing network element, and the second network element may be a service requesting network element. The first network element determines whether to authorize the second network element to use the first service according to the identifier of the first NF set. It can also be understood that the first network element determines whether the second network element Whether the element is authorized to use the first service; or it can also be understood that the first network element determines to provide the first service to the second network element or refuses to provide the first service to the second network element according to the identifier of the first NF set; Or it can also be understood that, according to the identifier of the first NF set, the first network element provides the requested first service (or executes the first service) and sends a response message, or sends a response message indicating that the service request fails; or It can be understood that, according to the identifier of the first NF set, the first network element provides the requested first service (or executes the first service) and sends a response message, or sends a response message indicating that the service request is rejected.
该第一网元确定是否授权该第二网元使用所述第一服务的具体表现形式可以是:在授权所述第二网元使用所述第一服务的情况下,所述第一网元向所述第二网元提供所述第一服务;或者,在未授权所述第二网元使用所述第一服务的情况下,所述第一网元拒绝所述服务请求消息,以拒绝所述第二网元请求所述第一服务。The specific manifestation of the first network element determining whether to authorize the second network element to use the first service may be: when the second network element is authorized to use the first service, the first network element providing the first service to the second network element; or, if the second network element is not authorized to use the first service, the first network element rejects the service request message to reject The second network element requests the first service.
应理解,该访问令牌受到了安全保护,例如完整性保护,从而可以避免恶意的NF服务消费者对该访问令牌内的参数进行篡改。It should be understood that the access token is protected by security, such as integrity protection, so that malicious NF service consumers can avoid tampering with parameters in the access token.
结合第一方面,在第一方面的某些实现方式中,该第一网元根据该第一NF集的标识,确定是否授权该第二网元使用该第一NF服务,包括:该第一网元确定该第二网元是否属于该第一NF集的标识所指示的第一NF集合;该第二网元不属于该第一NF集合的情况下,该第一网元拒绝向该第二网元提供该第一服务。在该第二网元不属于该第一NF集合的情况下,第一网元直接拒绝向第二网元提供第一服务;或者,在该第二网元不属于该第一NF集合的情况下,第一网元发送指示服务请求失败的响应消息;或者,在该第二网元不属于该第一NF集合的情况下,第一网元发送指示拒绝服务请求的响应消息;或者,在该第二网元不属于该第一NF集合的情况下,第一网元确定该第二网元未被授权使用该访问令牌(或者未被授权使用第一服务),从而第一网元拒绝向该第二网元提供该第一服务。With reference to the first aspect, in some implementation manners of the first aspect, the first network element determines whether to authorize the second network element to use the first NF service according to the identifier of the first NF set, including: the first The network element determines whether the second network element belongs to the first NF set indicated by the identifier of the first NF set; if the second network element does not belong to the first NF set, the first network element refuses to send The second network element provides the first service. If the second network element does not belong to the first NF set, the first network element directly refuses to provide the first service to the second network element; or, when the second network element does not belong to the first NF set In this case, the first network element sends a response message indicating that the service request fails; or, when the second network element does not belong to the first NF set, the first network element sends a response message indicating that the service request is rejected; or, in When the second network element does not belong to the first NF set, the first network element determines that the second network element is not authorized to use the access token (or is not authorized to use the first service), so that the first network element Refusing to provide the first service to the second network element.
结合第一方面,在第一方面的某些实现方式中,该第一网元根据该第一NF集的标识,确定是否授权该第二网元使用该第一NF服务,包括:该第一网元根据该访问令牌获取第一NF集的标识;该第一网元根据该第一NF集的标识确定该第二网元是否属于该第一NF集的标识所指示的第一NF集合;在该第二网元不属于该第一NF集合的情况下,该第一 网元拒绝向该第二网元提供该第一服务。With reference to the first aspect, in some implementation manners of the first aspect, the first network element determines whether to authorize the second network element to use the first NF service according to the identifier of the first NF set, including: the first The network element obtains the identifier of the first NF set according to the access token; the first network element determines whether the second network element belongs to the first NF set indicated by the identifier of the first NF set according to the identifier of the first NF set ; If the second network element does not belong to the first NF set, the first network element refuses to provide the first service to the second network element.
即,第一网元根据第一NF集的标识判断第二网元是否属于第一NF集的标识所指示的第一NF集合,从而判断是否授权第二网元使用该第一服务,或者是否向第二网元提供第一服务;That is, the first network element judges according to the identifier of the first NF set whether the second network element belongs to the first NF set indicated by the identifier of the first NF set, thereby judging whether to authorize the second network element to use the first service, or whether providing the first service to the second network element;
基于上述技术方案,通过验证第二网元是否属于第一NF集合来确定是否授权第二网元使用第一NF服务,可以避免恶意的NF服务消费者越权使用访问令牌获取服务。Based on the above technical solution, by verifying whether the second network element belongs to the first NF set to determine whether to authorize the second network element to use the first NF service, it is possible to prevent malicious NF service consumers from using the access token to obtain services beyond their authority.
结合第一方面,在第一方面的某些实现方式中,该第一网元根据该第一NF集的标识,确定是否授权该第二网元使用该第一服务,包括:该第一网元向第三网元发送第一验证请求消息,该第一验证请求消息用于请求验证该第二网元是否属于该第一NF集的标识所指示的第一NF集合,该第一验证请求消息包括该第二网元的标识和该第一NF集的标识;该第一网元接收来自该第三网元的指示信息;该第一网元根据该指示信息确定该第二网元是否属于该第一NF集合;在该第二网元不属于该第一NF集的情况下,该第一网元拒绝向该第二网元提供该第一服务。With reference to the first aspect, in some implementation manners of the first aspect, the first network element determines whether to authorize the second network element to use the first service according to the identifier of the first NF set, including: the first network element The element sends a first verification request message to the third network element, where the first verification request message is used to request to verify whether the second network element belongs to the first NF set indicated by the identifier of the first NF set, and the first verification request The message includes the identifier of the second network element and the identifier of the first NF set; the first network element receives indication information from the third network element; the first network element determines whether the second network element is based on the indication information belong to the first NF set; if the second network element does not belong to the first NF set, the first network element refuses to provide the first service to the second network element.
该第一网元拒绝向该第二网元提供该第一服务的具体表现形式可以是:该第一网元向该第二网元发送服务响应消息,该服务响应消息用于指示拒绝提供该第一服务,或者该响应消息用于指示服务请求失败。可选的,该服务响应消息中还包括拒绝的原因,例如,拒绝的原因可以是访问令牌验证不通过。The specific manifestation of the first network element's refusal to provide the first service to the second network element may be: the first network element sends a service response message to the second network element, and the service response message is used to indicate the refusal to provide the first service The first service, or the response message is used to indicate that the service request fails. Optionally, the service response message further includes a reason for the rejection, for example, the reason for the rejection may be that the verification of the access token fails.
基于上述技术方案,通过第三网元来确定是否授权第二网元使用第一服务,可以避免恶意的NF服务消费者越权使用访问令牌获取服务。Based on the above technical solution, the third network element determines whether to authorize the second network element to use the first service, which can prevent malicious NF service consumers from using the access token to obtain services beyond their authority.
结合第一方面,在第一方面的某些实现方式中,该第一网元根据该第一NF集的标识,确定是否授权该第二网元使用该第一服务,包括:该第一网元向第三网元发送第二验证请求消息,该第二验证请求消息用于请求获取该第二网元所属的NF集的标识,该第二验证请求消息包括该第二网元的标识;该第一网元接收来自该第三网元的第二NF集的标识;在该第二NF集的标识和该第一NF集的标识不相同的情况下,该第一网元拒绝向该第二网元提供该第一服务。With reference to the first aspect, in some implementation manners of the first aspect, the first network element determines whether to authorize the second network element to use the first service according to the identifier of the first NF set, including: the first network element The element sends a second verification request message to the third network element, where the second verification request message is used to request to obtain the identifier of the NF set to which the second network element belongs, and the second verification request message includes the identifier of the second network element; The first network element receives the identity of the second NF set from the third network element; if the identity of the second NF set is different from the identity of the first NF set, the first network element refuses to send the The second network element provides the first service.
基于上述技术方案,通过第三网元获取第二网元所属的NF集的标识,来判断第二网元是否属于第一NF集合,从而可以确定第二网元是否有权限请求第一服务,从而可以避免恶意的NF服务消费者越权使用访问令牌。Based on the above technical solution, the third network element obtains the identifier of the NF set to which the second network element belongs to determine whether the second network element belongs to the first NF set, so as to determine whether the second network element has the authority to request the first service, In this way, malicious NF service consumers can be prevented from using the access token beyond authorization.
结合第一方面,在第一方面的某些实现方式中,该第一网元根据该第一NF集的标识,确定是否授权该第二网元使用该第一服务,包括:该第一网元向第三网元发送第三验证请求消息,该第三验证请求消息用于请求获取该第一NF集的标识所指示的第一NF集合包括的NF的标识,该第三验证请求消息包括该第一NF集的标识;该第一网元接收来自该第三网元的该第一NF集合包括的NF的标识;在该第一NF集合包括的NF的标识不包括该第二网元的标识的情况下,该第一网元拒绝向该第二网元提供该第一服务。With reference to the first aspect, in some implementation manners of the first aspect, the first network element determines whether to authorize the second network element to use the first service according to the identifier of the first NF set, including: the first network element The element sends a third verification request message to the third network element, where the third verification request message is used to request to obtain the identifier of the NF included in the first NF set indicated by the identifier of the first NF set, and the third verification request message includes The identity of the first NF set; the first network element receives the identity of the NF included in the first NF set from the third network element; the identity of the NF included in the first NF set does not include the second network element In the case of the identifier, the first network element refuses to provide the first service to the second network element.
基于上述技术方案,通过第三网元获取第一NF集合包括的NF的标识,来判断第二网元是否属于第一NF集合,从而可以确定第二网元是否有权限请求第一服务,可以避免恶意的NF服务消费者越权使用访问令牌获取服务。Based on the above technical solution, the third network element obtains the identifier of the NF included in the first NF set to determine whether the second network element belongs to the first NF set, so as to determine whether the second network element has the right to request the first service. Prevent malicious NF service consumers from using access tokens to obtain services beyond their authority.
需要说明的是,在第二网元属于第一NF集的情况下,还需要对访问令牌中的其他参数进行进一步验证(例如对访问令牌内的期望的服务名称、NF type等参数进行验证), 在验证通过的情况下,第一网元才确定第二网元被授权使用第一服务。It should be noted that, in the case that the second network element belongs to the first NF set, other parameters in the access token need to be further verified (for example, parameters such as the expected service name and NF type in the access token need to be verified. verification), the first network element determines that the second network element is authorized to use the first service only when the verification is passed.
结合第一方面,在第一方面的某些实现方式中,该第一网元确定该第二网元是否属于该第一NF集的标识所指示的第一NF集合,包括:该第一网元根据配置信息和该第二网元的标识,确定该第二网元是否属于该第一NF集合,该配置信息包括该第一NF集合中的NF的标识和/或该第二网元所属的NF集的标识。With reference to the first aspect, in some implementation manners of the first aspect, the first network element determining whether the second network element belongs to the first NF set indicated by the identifier of the first NF set includes: the first network element The element determines whether the second network element belongs to the first NF set according to the configuration information and the identifier of the second network element, where the configuration information includes the identifier of the NF in the first NF set and/or the second network element belongs to The identity of the NF set.
结合第一方面,在第一方面的某些实现方式中,在该第一网元根据配置信息和该第二网元的标识,确定该第二网元是否属于该第一NF集合之前,该方法还包括:该第一网元保存该配置信息。With reference to the first aspect, in some implementation manners of the first aspect, before the first network element determines whether the second network element belongs to the first NF set according to the configuration information and the identifier of the second network element, the The method also includes: saving the configuration information by the first network element.
结合第一方面,在第一方面的某些实现方式中,该访问令牌还包括其他验证条件,该方法还包括:该第一网元根据该其他验证条件,确定是否授权该第二网元使用该第一服务,其中,该其他验证条件包括以下一个或者多个:服务提供者的NF实例标识、服务提供者的NF类型、服务提供者的单网络切片选择辅助信息、服务提供者的网络切片实例标识、服务提供者所属的NF集的标识、期望的服务名称、该访问令牌的有效时间。With reference to the first aspect, in some implementations of the first aspect, the access token further includes other verification conditions, and the method further includes: the first network element determines whether to authorize the second network element according to the other verification conditions The first service is used, wherein the other verification conditions include one or more of the following: the service provider’s NF instance identifier, the service provider’s NF type, the service provider’s single network slice selection auxiliary information, the service provider’s network The slice instance ID, the ID of the NF set to which the service provider belongs, the desired service name, and the valid time of the access token.
结合第一方面,在第一方面的某些实现方式中,该第一网元根据该第一NF集的标识,确定是否授权该第二网元使用该第一服务,包括:当该第二网元属于该第一NF集的标识所指示的第一NF集合,且该其他验证条件验证通过时,该第一网元确定授权该第二网元使用该第一服务。With reference to the first aspect, in some implementation manners of the first aspect, the first network element determines whether to authorize the second network element to use the first service according to the identifier of the first NF set, including: when the second When the network element belongs to the first NF set indicated by the identifier of the first NF set, and the other verification condition is verified, the first network element determines to authorize the second network element to use the first service.
结合第一方面,在第一方面的某些实现方式中,该第一网元根据该第一NF集的标识,确定是否授权该第二网元使用该第一服务,包括:当该第二网元不属于该第一NF集的标识所指示的第一NF集,和/或该其他验证条件中的任意一项验证不通过时,该第一网元拒绝向该第二网元提供服务。With reference to the first aspect, in some implementation manners of the first aspect, the first network element determines whether to authorize the second network element to use the first service according to the identifier of the first NF set, including: when the second When the network element does not belong to the first NF set indicated by the identifier of the first NF set, and/or any one of the other verification conditions fails to pass the verification, the first network element refuses to provide services to the second network element .
需要说明的是,本申请实施例对所述第一网元验证所述第二网元是否属于该第一NF集的标识所指示的第一NF集以及验证其他验证条件的顺序不做限定。It should be noted that, this embodiment of the present application does not limit the order in which the first network element verifies whether the second network element belongs to the first NF set indicated by the identifier of the first NF set and verifies other verification conditions.
基于上述技术方案,通过本地配置信息来确定第二网元是否属于第一NF集合,从而可以确定第二网元是否有权限请求第一服务,可以避免恶意的NF服务消费者越权使用访问令牌获取服务。Based on the above technical solution, determine whether the second network element belongs to the first NF set through local configuration information, so as to determine whether the second network element has the authority to request the first service, and prevent malicious NF service consumers from using access tokens beyond their authority Get service.
结合第一方面,在第一方面的某些实现方式中,该方法还包括:该第一网元从该第二网元的证书中获取该第二网元的标识;或者,该第一网元从服务通信代理网元接收该第二网元的客户端凭证声明(client credentials assertion,CCA),其中,该CCA中包括该第二网元的标识;或者,该第一网元从该服务请求消息中获取该第二网元的标识。With reference to the first aspect, in some implementation manners of the first aspect, the method further includes: the first network element obtains the identity of the second network element from the certificate of the second network element; or, the first network element The element receives the client credentials assertion (client credentials assertion, CCA) of the second network element from the service communication agent network element, wherein, the identifier of the second network element is included in the CCA; or, the first network element receives from the service The identifier of the second network element is obtained from the request message.
基于上述技术方案,通过第二网元的证书或者第二网元的CCA获取第二网元的标识,并利用该标识来判断第二网元是否有权限使用第一服务,可以避免恶意的NF服务消费者越权使用访问令牌获取服务。Based on the above technical solution, the identification of the second network element is obtained through the certificate of the second network element or the CCA of the second network element, and the identification is used to determine whether the second network element has the right to use the first service, which can avoid malicious NF The service consumer uses the access token beyond authorization to obtain the service.
结合第一方面,在第一方面的某些实现方式中,该访问令牌还包括第四网元的标识,该第四网元的标识用于指示该访问令牌由该第四网元请求获得的,且该第四网元属于该第一NF集的标识所指示的第一NF集合;该方法还包括:该第一网元确定该第二网元的标识与该第四网元的标识不同。With reference to the first aspect, in some implementations of the first aspect, the access token further includes an identifier of a fourth network element, and the identifier of the fourth network element is used to indicate that the access token is requested by the fourth network element obtained, and the fourth network element belongs to the first NF set indicated by the identity of the first NF set; the method further includes: the first network element determining the identity of the second network element and the fourth network element The logos are different.
基于上述技术方案,可以判断第二网元是否是请求获取该访问令牌的网元,如果是的话,则可以不用去验证第二网元是否属于第一NF集标识指示的第一NF集合;如果不是 的话,则需要验证第二网元是否属于第一NF集标识指示的第一NF集合,从而可以避免恶意的NF服务消费者越权使用访问令牌获取服务,并且可以减少用于验证的信令消耗。Based on the above technical solution, it may be determined whether the second network element is the network element requesting to obtain the access token, and if so, it is not necessary to verify whether the second network element belongs to the first NF set indicated by the first NF set identifier; If not, it needs to be verified whether the second network element belongs to the first NF set indicated by the first NF set identifier, so that malicious NF service consumers can be prevented from using access tokens to obtain services beyond their authority, and the information used for verification can be reduced. To consume.
结合第一方面,在第一方面的某些实现方式中,该方法还包括:在该第一网元确定该第二网元属于该第一NF集的标识该指示的第一NF集合的情形下,该第一网元保存该第二网元的标识和该第一NF集的标识的关联关系。With reference to the first aspect, in some implementations of the first aspect, the method further includes: when the first network element determines that the second network element belongs to the first NF set and identifies the indicated first NF set Next, the first network element stores the association relationship between the identifier of the second network element and the identifier of the first NF set.
基于上述技术方案,在确定第二网元属于第一NF集合的情况下,即确定第二网元有权限请求第一服务的情况下,保存第二网元和第一NF集的标识的关联关系,从而可以使得后续第二网元再请求第一服务时,避免繁杂的验证过程,可以节约资源。Based on the above technical solution, when it is determined that the second network element belongs to the first NF set, that is, when it is determined that the second network element has the right to request the first service, the association between the identity of the second network element and the first NF set is saved relationship, so that when the subsequent second network element requests the first service again, the complicated verification process can be avoided, and resources can be saved.
结合第一方面,在第一方面的某些实现方式中,该第三网元为网络存储功能网元。With reference to the first aspect, in some implementation manners of the first aspect, the third network element is a network storage function network element.
第二方面,提供了一种授权验证的方法,该方法包括:第三网元接收来自第一网元的第一验证请求消息,该第一验证请求消息用于请求验证该第二网元是否属于该第一NF集的标识所指示的第一NF集合,该第一验证请求消息包括该第二网元的标识和该第一NF集的标识;该第三网元根据该第二网元的标识和该第一NF集的标识确定该第二网元是否属于该第一NF集合;该第三网元向该第一网元发送指示信息,该指示信息用于指示该第二网元是否属于该第一NF集合。In a second aspect, a method for authorization verification is provided, the method includes: a third network element receives a first verification request message from a first network element, and the first verification request message is used to request verification whether the second network element Belonging to the first NF set indicated by the identity of the first NF set, the first verification request message includes the identity of the second network element and the identity of the first NF set; the third network element according to the second network element The identification of the first NF set and the identification of the first NF set determine whether the second network element belongs to the first NF set; the third network element sends indication information to the first network element, and the indication information is used to indicate the second network element Whether it belongs to the first NF set.
结合第二方面,在第二方面的某些实现方式中,该第三网元根据该第二网元的标识和该第一NF集的标识确定该第二网元是否属于该第一NF集合,包括:该第三网元根据该第二网元的标识和该第二网元的配置信息确定该第二网元所属的NF集的标识,在该第二网元所属的NF集的标识与第一NF集的标识匹配的情况下,该第三网元该第三网元确定该第二网元属于该第一NF集合,否则该第三网元确定该第二网元不属于该第一NF集合。With reference to the second aspect, in some implementation manners of the second aspect, the third network element determines whether the second network element belongs to the first NF set according to the identifier of the second network element and the identifier of the first NF set , including: the third network element determines the identity of the NF set to which the second network element belongs according to the identity of the second network element and the configuration information of the second network element, and the identity of the NF set to which the second network element belongs If it matches the identifier of the first NF set, the third network element determines that the second network element belongs to the first NF set; otherwise, the third network element determines that the second network element does not belong to the First NF set.
结合第二方面,在第二方面的某些实现方式中,该第三网元根据该第二网元的标识和该第一NF集的标识确定该第二网元是否属于该第一NF集合,包括:该第三网元根据该第一NF集的标识和该第一NF集的配置信息确定该第一NF集中的NF的标识,当该第一NF集中的NF的标识包括该第二网元的标识的情况下,该第三网元确定该第二网元属于该第一NF集合,否则该第三网元确定该第二网元不属于该第一NF集合。With reference to the second aspect, in some implementation manners of the second aspect, the third network element determines whether the second network element belongs to the first NF set according to the identifier of the second network element and the identifier of the first NF set , including: the third network element determines the identity of the NF in the first NF set according to the identity of the first NF set and the configuration information of the first NF set, when the identity of the NF in the first NF set includes the second In the case of the identity of the network element, the third network element determines that the second network element belongs to the first NF set; otherwise, the third network element determines that the second network element does not belong to the first NF set.
结合第二方面,在第二方面的某些实现方式中,该方法还包括:该第三网元接收来自第四网元的第四请求消息,该第四请求消息包括第一NF集的标识,该第四请求消息用于请求获取访问令牌,该访问令牌用于该第一NF集的NF请求NF服务,该第四网元属于该第一NF集;该第三网元根据配置信息确定该第四网元是否属于该第一NF集。在该第四网元属于该第一NF集的情况下,该第三网元向该第四网元发送该访问令牌。With reference to the second aspect, in some implementations of the second aspect, the method further includes: the third network element receiving a fourth request message from the fourth network element, where the fourth request message includes an identifier of the first NF set , the fourth request message is used to request to obtain an access token, the access token is used for the NF request NF service of the first NF set, the fourth network element belongs to the first NF set; the third network element according to the configuration The information determines whether the fourth network element belongs to the first NF set. If the fourth network element belongs to the first NF set, the third network element sends the access token to the fourth network element.
第三方面,提供了一种授权验证的方法,该方法包括:第三网元接收来自第一网元的第二验证请求消息,该第二验证请求消息用于请求获取第二网元所属的NF集的标识,该第二验证请求消息包括第二网元的标识;该第三网元根据该第二网元的标识确定该第二网元所属的NF集的标识;该第三网元向该第二网元发送第二NF集的标识,该第二NF集为该第二网元所属的NF集。In a third aspect, a method for authorization verification is provided, the method includes: a third network element receives a second verification request message from the first network element, and the second verification request message is used to request to obtain the An identification of the NF set, the second verification request message includes the identification of the second network element; the third network element determines the identification of the NF set to which the second network element belongs according to the identification of the second network element; the third network element Send the identifier of the second NF set to the second network element, where the second NF set is the NF set to which the second network element belongs.
结合第三方面,在第三方面的某些实现方式中,该方法还包括:该第三网元接收来自第四网元的第四请求消息,该第四请求消息包括第一NF集的标识,该第四请求消息用于请求获取访问令牌,该访问令牌用于该第一NF集的NF请求NF服务,该第四网元属于该第一NF集;该第三网元根据配置信息确定该第四网元是否属于该第一NF集。在该第 四网元属于该第一NF集的情况下,该第三网元向该第四网元发送该访问令牌。With reference to the third aspect, in some implementation manners of the third aspect, the method further includes: the third network element receiving a fourth request message from the fourth network element, where the fourth request message includes an identifier of the first NF set , the fourth request message is used to request to obtain an access token, the access token is used for the NF request NF service of the first NF set, the fourth network element belongs to the first NF set; the third network element according to the configuration The information determines whether the fourth network element belongs to the first NF set. In the case that the fourth network element belongs to the first NF set, the third network element sends the access token to the fourth network element.
第四方面,提供了一种授权验证的方法,该方法包括:第三网元向第一网元发送第三验证请求消息,该第三验证请求消息用于请求获取第一NF集的标识所指示的第一NF集合所包括的NF的标识,该第三验证请求消息包括该第一NF集的标识;该第三网元根据该第一NF集的标识确定该第一NF集合所包括的NF的标识;该第三网元向该第一网元发送该第一NF集合所包括的NF的标识。In a fourth aspect, a method for authorization verification is provided, the method includes: a third network element sends a third verification request message to the first network element, and the third verification request message is used to request to obtain the identifier of the first NF set The identifier of the NF included in the indicated first NF set, the third verification request message includes the identifier of the first NF set; the third network element determines the NF included in the first NF set according to the identifier of the first NF set The identifier of the NF: the third network element sends the identifiers of the NFs included in the first NF set to the first network element.
结合第四方面,在第四方面的某些实现方式中,该方法还包括:该第三网元接收来自第四网元的第四请求消息,该第四请求消息包括第一NF集的标识,该第四请求消息用于请求获取访问令牌,该访问令牌用于该第一NF集的NF请求NF服务,该第四网元属于该第一NF集;该第三网元根据配置信息确定该第四网元是否属于该第一NF集。在该第四网元属于该第一NF集的情况下,该第三网元向该第四网元发送该访问令牌。With reference to the fourth aspect, in some implementation manners of the fourth aspect, the method further includes: the third network element receiving a fourth request message from the fourth network element, where the fourth request message includes an identifier of the first NF set , the fourth request message is used to request to obtain an access token, the access token is used for the NF request NF service of the first NF set, the fourth network element belongs to the first NF set; the third network element according to the configuration The information determines whether the fourth network element belongs to the first NF set. If the fourth network element belongs to the first NF set, the third network element sends the access token to the fourth network element.
第五方面,提供了一种授权验证的装置,该装置包括:收发单元,用于接收与第二网元关联的服务请求消息,该服务请求消息用于请求该第一网元向该第二网元提供的第一服务,该服务请求消息包括访问令牌,该访问令牌包括第一网络功能NF集的标识,该第一NF集的标识用于指示该访问令牌适用的服务请求网元;处理单元,用于根据该第一NF集的标识,确定是否授权该第二网元使用该第一服务。In a fifth aspect, a device for authorization verification is provided, the device includes: a transceiver unit, configured to receive a service request message associated with a second network element, and the service request message is used to request the first network element to send a request to the second network element The first service provided by the network element, the service request message includes an access token, and the access token includes the identifier of the first network function NF set, and the identifier of the first NF set is used to indicate the service requesting network to which the access token is applicable. element: a processing unit, configured to determine whether to authorize the second network element to use the first service according to the identifier of the first NF set.
结合第五方面,在第五方面的某些实现方式中,该处理单元具体用于:确定该第二网元是否属于该第一NF集的标识所指示的第一NF集合;在该第二网元不属于该第一NF集合的情况下,拒绝向该第二网元提供该第一服务。With reference to the fifth aspect, in some implementation manners of the fifth aspect, the processing unit is specifically configured to: determine whether the second network element belongs to the first NF set indicated by the identifier of the first NF set; If the network element does not belong to the first NF set, refuse to provide the first service to the second network element.
结合第五方面,在第五方面的某些实现方式中,该处理单元具体用于:根据该访问令牌获取第一NF集的标识;根据该第一NF集的标识确定该第二网元是否属于该第一NF集的标识所指示的第一NF集合;在该第二网元不属于该第一NF集合的情况下,拒绝向该第二网元提供该第一服务。With reference to the fifth aspect, in some implementation manners of the fifth aspect, the processing unit is specifically configured to: obtain the identifier of the first NF set according to the access token; determine the second network element according to the identifier of the first NF set Whether it belongs to the first NF set indicated by the identifier of the first NF set; if the second network element does not belong to the first NF set, refuse to provide the first service to the second network element.
结合第五方面,在第五方面的某些实现方式中,其特征在于,该收发单元具体用于:向第三网元发送第一验证请求消息,该第一验证请求消息用于请求验证该第二网元是否属于该第一NF集的标识所指示的第一NF集合,该第一验证请求消息包括该第二网元的标识和该第一NF集的标识;该第一网元从该第三网元接收指示信息;该处理单元具体用于:根据该指示信息确定该第二网元是否属于该第一NF集合;在该第二网元不属于该第一NF集的情况下,拒绝向该第二网元提供该第一服务。With reference to the fifth aspect, in some implementations of the fifth aspect, it is characterized in that the transceiver unit is specifically configured to: send a first verification request message to a third network element, where the first verification request message is used to request verification of the Whether the second network element belongs to the first NF set indicated by the identifier of the first NF set, the first verification request message includes the identifier of the second network element and the identifier of the first NF set; The third network element receives the indication information; the processing unit is specifically configured to: determine whether the second network element belongs to the first NF set according to the indication information; if the second network element does not belong to the first NF set , refusing to provide the first service to the second network element.
结合第五方面,在第五方面的某些实现方式中,该收发单元具体用于:向第三网元发送第二验证请求消息,该第二验证请求消息用于请求获取该第二网元所属的NF集的标识,该第二验证请求消息包括该第二网元的标识;从该第三网元接收第二NF集的标识;该处理单元具体用于:在该第二NF集的标识和该第一NF集的标识不相同的情况下,拒绝向该第二网元提供该第一服务。With reference to the fifth aspect, in some implementations of the fifth aspect, the transceiver unit is specifically configured to: send a second verification request message to the third network element, where the second verification request message is used to request to obtain the second network element The identification of the NF set to which the second verification request message includes the identification of the second network element; receiving the identification of the second NF set from the third network element; the processing unit is specifically configured to: in the second NF set If the identifier is not the same as the identifier of the first NF set, refuse to provide the first service to the second network element.
结合第五方面,在第五方面的某些实现方式中,该收发单元具体用于:该第一网元向第三网元发送第三验证请求消息,该第三验证请求消息用于请求获取该第一NF集的标识所指示的第一NF集合包括的NF的标识,该第三验证请求消息包括该第一NF集的标识;该第一网元从该第三网元接收该第一NF集合包括的NF的标识;该处理单元具体用于:在该第一NF集合包括的NF的标识不包括该第二网元的标识的情况下,拒绝向该第二网 元提供该第一服务。With reference to the fifth aspect, in some implementation manners of the fifth aspect, the transceiver unit is specifically configured to: the first network element sends a third verification request message to a third network element, and the third verification request message is used to request to obtain The identifier of the NF included in the first NF set indicated by the identifier of the first NF set, the third verification request message includes the identifier of the first NF set; the first network element receives the first NF from the third network element The identifier of the NF included in the NF set; the processing unit is specifically configured to: refuse to provide the first network element to the second network element when the identifier of the NF included in the first NF set does not include the identifier of the second network element Serve.
结合第五方面,在第五方面的某些实现方式中,该处理单元具体用于:该第一网元根据配置信息和该第二网元的标识,确定该第二网元是否属于该第一NF集合,该配置信息包括该第一NF集合中的NF的标识和/或该第二网元所属的NF集的标识。With reference to the fifth aspect, in some implementation manners of the fifth aspect, the processing unit is specifically configured to: the first network element determines whether the second network element belongs to the second network element according to the configuration information and the identifier of the second network element. A set of NFs, the configuration information includes the identifiers of the NFs in the first set of NFs and/or the identifiers of the set of NFs to which the second network element belongs.
结合第五方面,在第五方面的某些实现方式中,该收发单元还用于:从该第二网元的证书中获取该第二网元的标识;或者,从服务通信代理网元接收该第二网元的客户端凭证声明CCA,其中,该CCA中包括该第二网元的标识;或者,从该服务请求消息中获取该第二网元的标识。With reference to the fifth aspect, in some implementations of the fifth aspect, the transceiving unit is further configured to: acquire the identity of the second network element from the certificate of the second network element; or receive The client certificate declaration CCA of the second network element, wherein the CCA includes the identifier of the second network element; or, the identifier of the second network element is obtained from the service request message.
结合第五方面,在第五方面的某些实现方式中,该访问令牌还包括第四网元的标识,该第四网元属于该第一NF集的标识所指示的第一NF集合,该第四网元的标识用于指示该访问令牌由该第四网元请求获得的;该处理单元还用于:确定该第一网元的标识与该第四网元的标识不同。With reference to the fifth aspect, in some implementation manners of the fifth aspect, the access token further includes an identifier of a fourth network element, where the fourth network element belongs to the first NF set indicated by the identifier of the first NF set, The identifier of the fourth network element is used to indicate that the access token is requested by the fourth network element; the processing unit is further configured to: determine that the identifier of the first network element is different from the identifier of the fourth network element.
结合第五方面,在第五方面的某些实现方式中,该处理单元还用于:在确定该第二网元属于该第一NF集的标识该指示的第一NF集合的情形下,保存该第二网元的标识和该第一NF集的标识的关联关系。With reference to the fifth aspect, in some implementation manners of the fifth aspect, the processing unit is further configured to: when it is determined that the second network element belongs to the first NF set identifying the indication of the first NF set, save The association relationship between the identifier of the second network element and the identifier of the first NF set.
结合第五方面,在第五方面的某些实现方式中,该第三网元为网络存储功能网元。With reference to the fifth aspect, in some implementation manners of the fifth aspect, the third network element is a network storage function network element.
结合第五方面,在第五方面的某些实现方式中,该访问令牌还包括其他验证条件,该处理单元还用于:根据该其他验证条件,确定是否授权该第二网元使用该第一服务,其中,该其他验证条件包括以下一个或者多个:服务提供者的NF实例标识、服务提供者的NF类型、服务提供者的单网络切片选择辅助信息、服务提供者的网络切片实例标识、服务提供者所属的NF集的标识、期望的服务名称、该访问令牌的有效时间。With reference to the fifth aspect, in some implementations of the fifth aspect, the access token further includes other verification conditions, and the processing unit is further configured to: determine whether to authorize the second network element to use the second network element according to the other verification conditions. A service, wherein the other verification conditions include one or more of the following: the NF instance identifier of the service provider, the NF type of the service provider, the single network slice selection auxiliary information of the service provider, and the network slice instance identifier of the service provider , the identifier of the NF set to which the service provider belongs, the desired service name, and the valid time of the access token.
结合第五方面,在第五方面的某些实现方式中,该处理单元具体用于:当该第二网元属于该第一NF集的标识所指示的第一NF集合,且该其他验证条件验证通过时,确定授权该第二网元使用该第一服务。With reference to the fifth aspect, in some implementation manners of the fifth aspect, the processing unit is specifically configured to: when the second network element belongs to the first NF set indicated by the identifier of the first NF set, and the other verification condition When the verification passes, it is determined that the second network element is authorized to use the first service.
结合第五方面,在第五方面的某些实现方式中,该处理单元具体用于:当该第二网元不属于该第一NF集的标识所指示的第一NF集,和/或该其他验证条件中的任意一项验证不通过时,拒绝向该第二网元提供服务。With reference to the fifth aspect, in some implementation manners of the fifth aspect, the processing unit is specifically configured to: when the second network element does not belong to the first NF set indicated by the identifier of the first NF set, and/or the When any one of the other verification conditions fails to pass the verification, the second network element is refused to provide services.
第六方面,提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,当该计算机程序在计算机上运行时,使得计算机执行如第一方面至第五方面中任一方面所述的方法。A sixth aspect provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program runs on a computer, the computer executes any one of the first to fifth aspects the method described.
第七方面,提供了一种计算机程序产品,该计算机程序产品包括计算机程序指令,该计算机程序指令在计算机上运行时,使得计算机执行如第一方面至第五方面中任一方面所述的方法。In a seventh aspect, a computer program product is provided, the computer program product includes computer program instructions, and when the computer program instructions run on a computer, the computer executes the method described in any one of the first to fifth aspects .
第八方面,提供了一种通信装置,该装置包括至少一个处理器,该至少一个处理器用于执行存储在存储器中的计算机程序或指令,以执行如第一方面至第五方面中任一方面该的方法。In an eighth aspect, there is provided a communication device, the device includes at least one processor, and the at least one processor is used to execute computer programs or instructions stored in the memory, so as to perform any one of the first to fifth aspects The method.
附图说明Description of drawings
图1是适用于本申请实施例的网络结构的示意图。Fig. 1 is a schematic diagram of a network structure applicable to the embodiment of the present application.
图2和图3示出了直接通信场景下的两种通信模式的示意图。FIG. 2 and FIG. 3 show schematic diagrams of two communication modes in a direct communication scenario.
图4和图5示出了间接通信场景下的两种通信模式的示意图。FIG. 4 and FIG. 5 show schematic diagrams of two communication modes in an indirect communication scenario.
图6示出了一种NF服务请求及授权方法的示例性流程图。Fig. 6 shows an exemplary flow chart of a NF service request and authorization method.
图7示出了另一种NF服务请求及授权方法的示例性流程图。Fig. 7 shows an exemplary flow chart of another NF service request and authorization method.
图8示出了又一种NF服务请求及授权方法的示例性流程图。Fig. 8 shows an exemplary flow chart of another NF service request and authorization method.
图9示出了本申请实施例提供的一种授权验证方法的示例性流程图。Fig. 9 shows an exemplary flow chart of an authorization verification method provided by an embodiment of the present application.
图10示出了本申请实施例提供的另一种授权验证方法的示例性流程图。Fig. 10 shows an exemplary flow chart of another authorization verification method provided by the embodiment of the present application.
图11示出了本申请实施例提供的又一种授权验证方法的示例性流程图。Fig. 11 shows an exemplary flow chart of another authorization verification method provided by the embodiment of the present application.
图12示出了本申请实施例提供的又一种授权验证方法的示例性流程图。Fig. 12 shows an exemplary flow chart of another authorization verification method provided by the embodiment of the present application.
图13示出了本申请实施例提供的又一种授权验证方法的示例性流程图。Fig. 13 shows an exemplary flow chart of another authorization verification method provided by the embodiment of the present application.
图14是本申请实施例提供的认证授权的装置的示意性框图。FIG. 14 is a schematic block diagram of an authentication and authorization device provided by an embodiment of the present application.
图15是本申请实施例提供的认证授权的设备的结构示意图。FIG. 15 is a schematic structural diagram of an authentication and authorization device provided by an embodiment of the present application.
具体实施方式Detailed ways
本申请实施例的技术方案可以应用于各种通信系统,例如:长期演进(long term evolution,LTE)系统、LTE频分双工(frequency division duplex,FDD)系统、LTE时分双工(time division duplex,TDD)系统、通用移动通信系统(universal mobile telecommunication system,UMTS)、全球互联微波接入(worldwide interoperability for microwave access,WiMAX)通信系统、5G系统或新无线(new radio,NR)、第六代(6th generation,6G)系统或未来的通信系统等。本申请中所述的5G移动通信系统包括非独立组网(non-standalone,NSA)的5G移动通信系统或独立组网(standalone,SA)的5G移动通信系统。通信系统还可以是陆地公用移动通信网(public land mobile network,PLMN)网络、设备到设备(device-to-device,D2D)通信系统、机器到机器(machine to machine,M2M)通信系统、物联网(internet of Things,IoT)通信系统或者其他通信系统。The technical solution of the embodiment of the present application can be applied to various communication systems, for example: long term evolution (long term evolution, LTE) system, LTE frequency division duplex (frequency division duplex, FDD) system, LTE time division duplex (time division duplex) , TDD) system, universal mobile telecommunication system (universal mobile telecommunication system, UMTS), global interconnection microwave access (worldwide interoperability for microwave access, WiMAX) communication system, 5G system or new radio (new radio, NR), the sixth generation (6th generation, 6G) system or future communication system, etc. The 5G mobile communication system described in this application includes a non-standalone (NSA) 5G mobile communication system or a standalone (standalone, SA) 5G mobile communication system. The communication system may also be a public land mobile network (PLMN) network, a device-to-device (D2D) communication system, a machine-to-machine (M2M) communication system, an Internet of Things (Internet of Things, IoT) communication system or other communication systems.
为便于理解本申请实施例,首先结合图1详细说明适用于本申请实施例的网络架构。In order to facilitate understanding of the embodiment of the present application, the network architecture applicable to the embodiment of the present application will first be described in detail with reference to FIG. 1 .
图1是适用于本申请实施例提供的方法的网络架构的示意图。如图1所示,该网络架构例如是第三代合作伙伴计划(3rd generation partnership project,3GPP)定义的5G系统(the 5h generation system,5GS)。该网络架构为一种服务化的系统架构,图1虚线框内的网元为基于服务化接口通信的网元,即网元之间的通信使用服务化的接口。该网络架构可以包括接入网(access network,AN)和核心网(core network,CN),还可以包含用户设备(user equipment,UE)。FIG. 1 is a schematic diagram of a network architecture applicable to the method provided by the embodiment of the present application. As shown in FIG. 1 , the network architecture is, for example, the 5G system (the 5h generation system, 5GS) defined by the 3rd generation partnership project (3GPP). The network architecture is a service-oriented system architecture. The network elements in the dotted line box in FIG. 1 are network elements based on service-oriented interface communication, that is, communication between network elements uses a service-oriented interface. The network architecture may include an access network (access network, AN) and a core network (core network, CN), and may also include user equipment (user equipment, UE).
其中,接入网用于实现接入有关的功能,可以为特定区域的授权用户提供入网功能,并能够根据用户的级别,业务的需求等确定不同质量的传输链路以传输用户数据。接入网在终端设备与核心网之间转发控制信号和用户数据。接入网可以包括接入网络设备,接入网络设备可以是为终端设备提供接入的设备,可以包括无线接入网(radio access network,RAN)设备和AN设备。(R)AN设备,主要负责空口侧的无线资源管理、服务质量(quality of service,QoS)管理、数据压缩和加密等功能。RAN设备可以包括各种形式的基站,例如宏基站,微基站(也可称为小站),中继站,接入点,气球站等。在采用不同的无线接入技术的系统中,具备基站功能的设备的名称可能会有所不同,例如,在5G系统中,称 为RAN或者下一代基站(next-generation Node basestation,gNB);在长期演进(long term evolution,LTE)系统中,称为演进的节点B(evolved NodeB,eNB或eNodeB)。Among them, the access network is used to implement access-related functions, which can provide network access functions for authorized users in a specific area, and can determine transmission links of different qualities to transmit user data according to user levels and service requirements. The access network forwards control signals and user data between the terminal equipment and the core network. The access network may include access network devices, and the access network devices may be devices that provide access for terminal devices, and may include radio access network (radio access network, RAN) devices and AN devices. The (R)AN device is mainly responsible for wireless resource management, quality of service (QoS) management, data compression and encryption on the air interface side. RAN equipment may include various forms of base stations, such as macro base stations, micro base stations (also called small stations), relay stations, access points, and balloon stations. In systems using different radio access technologies, the names of equipment with base station functions may be different, for example, in 5G systems, it is called RAN or next-generation Node basestation (gNB); In a long term evolution (long term evolution, LTE) system, it is called an evolved Node B (evolved NodeB, eNB or eNodeB).
其中,核心网负责维护移动网络的签约数据,为UE提供会话管理、移动性管理、策略管理以及安全认证等功能。核心网可以包括如下网元:用户面功能(user plane function,UPF)、认证服务功能(authentication server function,AUSF)、接入和移动性管理功能(access and mobility management function,AMF)、会话管理功能(session management function,SMF)、网络切片选择功能(network slice selection function,NSSF)、网络开放功能(network exposure function,NEF)、网络功能仓储功能(NF repository function,NRF)、策略控制功能(policy control function,PCF)、统一数据管理(unified data management,UDM)和应用功能(application function,AF)。Among them, the core network is responsible for maintaining the subscription data of the mobile network, and providing functions such as session management, mobility management, policy management, and security authentication for the UE. The core network may include the following network elements: user plane function (user plane function, UPF), authentication server function (authentication server function, AUSF), access and mobility management function (access and mobility management function, AMF), session management function (session management function, SMF), network slice selection function (network slice selection function, NSSF), network exposure function (network exposure function, NEF), network function storage function (NF repository function, NRF), policy control function (policy control function, PCF), unified data management (unified data management, UDM) and application function (application function, AF).
下面对图1中示出的各网元做简单介绍:The following briefly introduces each network element shown in Figure 1:
1、用户设备(user equipment,UE):可以称终端设备、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置。1. User equipment (UE): can be called terminal equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, User Agent or User Device.
终端设备可以是一种向用户提供语音/数据连通性的设备,例如,具有无线连接功能的手持式设备、车载设备等。目前,一些终端的举例可以为:手机(mobile phone)、平板电脑(pad)、带无线收发功能的电脑(如笔记本电脑、掌上电脑等)、移动互联网设备(mobile internet device,MID)、虚拟现实(virtual reality,VR)设备、增强现实(augmented reality,AR)设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程医疗(remote medical)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、蜂窝电话、无绳电话、会话启动协议(session initiation protocol,SIP)电话、无线本地环路(wireless local loop,WLL)站、个人数字助理(personal digital assistant,PDA)、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、可穿戴设备,5G网络中的终端设备或者未来演进的公用陆地移动通信网络(public land mobile network,PLMN)中的终端设备等。A terminal device may be a device that provides voice/data connectivity to users, for example, a handheld device with a wireless connection function, a vehicle-mounted device, and the like. At present, examples of some terminals can be: mobile phone (mobile phone), tablet computer (pad), computer with wireless transceiver function (such as notebook computer, palmtop computer, etc.), mobile internet device (mobile internet device, MID), virtual reality (virtual reality, VR) equipment, augmented reality (augmented reality, AR) equipment, wireless terminals in industrial control (industrial control), wireless terminals in self driving (self driving), wireless in remote medical (remote medical) Terminals, wireless terminals in smart grid, wireless terminals in transportation safety, wireless terminals in smart city, wireless terminals in smart home, cellular phones, cordless Telephones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices, or connected Other processing devices to wireless modems, vehicle-mounted devices, wearable devices, terminal devices in the 5G network or terminal devices in the future evolution of the public land mobile network (PLMN), etc.
此外,终端设备还可以是物联网(Internet of things,IoT)系统中的终端设备。IoT是未来信息技术发展的重要组成部分,其主要技术特点是将物品通过通信技术与网络连接,从而实现人机互连,物物互连的智能化网络。IoT技术可以通过例如窄带(narrow band)NB技术,做到海量连接,深度覆盖,终端省电。In addition, the terminal device may also be a terminal device in an Internet of Things (Internet of things, IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, so as to realize the intelligent network of human-machine interconnection and object interconnection. IoT technology can achieve massive connections, deep coverage, and terminal power saving through, for example, narrow band NB technology.
此外,终端设备还可以包括智能打印机、火车探测器、加油站等传感器,主要功能包括收集数据(部分终端设备)、接收网络设备的控制信息与下行数据,并发送电磁波,向网络设备传输上行数据。In addition, terminal equipment can also include sensors such as smart printers, train detectors, and gas stations. The main functions include collecting data (partial terminal equipment), receiving control information and downlink data from network equipment, and sending electromagnetic waves to transmit uplink data to network equipment. .
应理解,终端设备可以是任何可以接入网络的设备。终端设备与接入网设备之间可以采用某种空口技术相互通信。It should be understood that the terminal device may be any device that can access the network. A certain air interface technology may be used to communicate with each other between the terminal device and the access network device.
2、接入网(access network,AN):接入网可以为特定区域的授权用户提供入网功能,包含无线接入网(radio access network,RAN)设备和AN设备。RAN设备主要是3GPP网络无线网络设备,AN设备可以是non-3GPP定义的接入网设备。2. Access network (access network, AN): The access network can provide network access functions for authorized users in a specific area, including wireless access network (radio access network, RAN) equipment and AN equipment. The RAN device is mainly a 3GPP network wireless network device, and the AN device may be an access network device defined by non-3GPP.
接入网络可以为采用不同接入技术的接入网络。目前的无线接入技术有两种类型: 3GPP接入技术(例如3G、4G或5G系统中采用的无线接入技术)和非3GPP(non-3GPP)接入技术。3GPP接入技术是指符合3GPP标准规范的接入技术,例如,5G系统中的接入网设备称为下一代基站节点(next generation Node Base station,gNB)或者RAN。非3GPP接入技术是指不符合3GPP标准规范的接入技术,例如,以无线保真(wireless fidelity,WiFi)中的接入点(access point,AP)为代表的空口技术、全球互联微波接入(worldwide interoperability for microwave access,WiMAX)、码分多址(code division multiple access,CDMA)网络等。接入网设备(AN设备)可以允许终端设备和3GPP核心网之间采用非3GPP技术互连互通。The access network may be an access network using different access technologies. There are two types of current wireless access technologies: 3GPP access technologies (such as those used in 3G, 4G or 5G systems) and non-3GPP (non-3GPP) access technologies. The 3GPP access technology refers to the access technology that complies with the 3GPP standard specifications. For example, the access network equipment in the 5G system is called the next generation Node Base station (gNB) or RAN. Non-3GPP access technologies refer to access technologies that do not comply with 3GPP standards, such as air interface technologies represented by access points (APs) in wireless fidelity (WiFi), global interconnection microwave access technologies, etc. Access (worldwide interoperability for microwave access, WiMAX), code division multiple access (code division multiple access, CDMA) network, etc. The access network equipment (AN equipment) may allow non-3GPP technology interconnection and intercommunication between the terminal equipment and the 3GPP core network.
基于无线通信技术实现接入网络功能的接入网可以称为RAN。无线接入网能够负责空口侧的无线资源管理、服务质量(quality of service,QoS)管理、数据压缩和加密等功能。无线接入网为终端设备提供接入服务,进而完成控制信号和用户数据在终端和核心网之间的转发。An access network that implements access network functions based on wireless communication technologies may be called a RAN. The radio access network can be responsible for functions such as radio resource management, quality of service (QoS) management, data compression and encryption on the air interface side. The wireless access network provides access services for terminal equipment, and then completes the forwarding of control signals and user data between the terminal and the core network.
无线接入网例如可以包括但不限于:宏基站、微基站(也称为小站)、无线网络控制器(radio network controller,RNC)、节点B(Node B,NB)、基站控制器(base station controller,BSC)、基站收发台(base transceiver station,BTS)、家庭基站(例如,home evolved NodeB,或home Node B,HNB)、基带单元(baseband unit,BBU),WiFi系统中的AP、无线中继节点、无线回传节点、传输点(transmission point,TP)或者发送接收点(transmission and reception point,TRP)等,还可以为5G(如,NR)系统中的gNB或传输点(TRP或TP),5G系统中的基站的一个或一组(包括多个天线面板)天线面板,或者,还可以为构成gNB或传输点的网络节点,如基带单元(BBU),或,分布式单元(distributed unit,DU),或者下一代通信6G系统中的基站等。本申请实施例对无线接入网设备所采用的具体技术和具体设备形态不做限定。For example, the radio access network may include but not limited to: a macro base station, a micro base station (also called a small station), a radio network controller (radio network controller, RNC), a node B (Node B, NB), a base station controller (base station controller, BSC), base transceiver station (base transceiver station, BTS), home base station (for example, home evolved NodeB, or home Node B, HNB), baseband unit (baseband unit, BBU), AP in WiFi system, wireless Relay node, wireless backhaul node, transmission point (transmission point, TP) or transmission and reception point (transmission and reception point, TRP), etc., can also be gNB or transmission point (TRP or TRP) in the 5G (for example, NR) system TP), one or a group (including multiple antenna panels) antenna panels of the base station in the 5G system, or it can also be a network node that constitutes a gNB or a transmission point, such as a baseband unit (BBU), or a distributed unit ( distributed unit, DU), or the base station in the next-generation communication 6G system, etc. The embodiment of the present application does not limit the specific technology and specific equipment form adopted by the radio access network equipment.
接入网可以为小区提供服务。终端设备可以通过接入网设备分配的传输资源(例如,频域资源,或者说,频谱资源)与小区通信。The access network can provide services for the cells. The terminal device can communicate with the cell through the transmission resources (for example, frequency domain resources, or spectrum resources) allocated by the access network device.
3、AMF网元:主要用于移动性管理和接入管理等,如用户位置更新、用户注册网络、用户切换等。AMF还可用于实现移动性管理实体(mobility management entity,MME)中除会话管理之外的其它功能。例如,合法监听、或接入授权(或鉴权)等功能。3. AMF network element: mainly used for mobility management and access management, such as user location update, user registration network, user switching, etc. The AMF can also be used to implement other functions in a mobility management entity (mobility management entity, MME) except session management. For example, functions such as lawful interception or access authorization (or authentication).
4、SMF网元:主要用于会话管理、UE的网际协议(internet protocol,IP)地址分配和管理、选择可管理用户平面功能、策略控制、或收费功能接口的终结点以及下行数据通知等。在本申请实施例中,SMF主要用户负责移动网络中的会话管理,如会话建立、修改、释放等。具体功能例如可以包括为终端设备分配IP地址、选择提供报文转发功能的UPF等。4. SMF network element: mainly used for session management, UE's internet protocol (internet protocol, IP) address allocation and management, selection of manageable user plane functions, policy control, or termination points of charging function interfaces, and downlink data notification, etc. In this embodiment of the application, the SMF primary user is responsible for session management in the mobile network, such as session establishment, modification, and release. Specific functions may include, for example, assigning an IP address to the terminal device, selecting a UPF that provides a packet forwarding function, and the like.
5、UPF网元:负责终端设备中用户数据的转发和接收。UPF网元可以从数据网络(data network,DN)接收用户数据,通过接入网设备传输给终端设备。UPF网元还可以通过接入网设备从终端设备接收用户数据,转发到数据网络。UPF网元中为终端设备提供服务的传输资源和调度功能由SMF网元管理控制的。5. UPF network element: responsible for forwarding and receiving user data in terminal equipment. The UPF network element can receive user data from the data network (data network, DN) and transmit it to the terminal device through the access network device. The UPF network element can also receive user data from the terminal equipment through the access network equipment and forward it to the data network. The transmission resources and scheduling functions that provide services for terminal equipment in the UPF network element are managed and controlled by the SMF network element.
6、数据网络(DN):用于为用户提供数据服务的服务网络,可以是私有网络,例如局域网;也可以是不受运营商管控的外部网络,例如互联网(Internet);还可以是运营商共同部署的专有网络,例如提供IP多媒体子系统(IP multimedia subsystem,IMS)的网 络。UE可通过建立的协议数据单元(protocol data unit,PDU)会话,来访问DN。6. Data network (DN): a service network used to provide data services to users, which can be a private network, such as a local area network; or an external network that is not controlled by an operator, such as the Internet; it can also be an operator Commonly deployed proprietary networks, such as networks providing IP multimedia subsystems (IMS). The UE can access the DN through the established protocol data unit (protocol data unit, PDU) session.
7、认证服务网元(authentication server function,AUSF):主要用于用户的安全认证等。7. Authentication server function (AUSF): mainly used for user security authentication.
8、网络开放功能(network exposure function,NEF)网元:主要用于支持能力和事件的开放,如用于安全地向外部开放由3GPP网络功能提供的业务和能力等。8. Network exposure function (network exposure function, NEF) network element: mainly used to support the exposure of capabilities and events, such as for safely exposing services and capabilities provided by 3GPP network functions to the outside.
9、网络存储网元(network repository function,NRF):主要提供服务注册、发现和授权,并维护可用的网络功能(network function,NF)实例信息,可以实现网络功能和服务的按需配置以及NF之间的互连。其中,服务注册是指,NF网元需要在NRF网元进行注册登记后才能提供服务。服务发现是指,NF网元需要其他NF网元为其提供服务时,需先通过NRF网元执行服务发现,以发现所期望的为其提供服务的NF网元。例如,NF网元1需要NF网元2为其提供服务时,需先通过NRF网元进行服务发现,以发现NF网元2。9. Network repository function (NRF): It mainly provides service registration, discovery and authorization, and maintains available network function (network function, NF) instance information, which can realize on-demand configuration of network functions and services and NF interconnection between. Wherein, the service registration means that the NF network element needs to register with the NRF network element before providing the service. Service discovery means that when an NF network element needs other NF network elements to provide services for it, it needs to perform service discovery through the NRF network element first, so as to find the desired NF network element that provides services for it. For example, when the NF network element 1 needs the NF network element 2 to provide services for it, it needs to first perform service discovery through the NRF network element to discover the NF network element 2.
10、PCF网元:用于指导网络行为的统一策略框架,为控制平面功能网元(例如AMF,SMF网元等)提供策略规则信息,负责获取与策略决策相关的用户签约信息等。10. PCF network element: a unified policy framework used to guide network behavior, provide policy rule information for control plane functional network elements (such as AMF, SMF network elements, etc.), and be responsible for obtaining user subscription information related to policy decisions, etc.
11、UDM网元:用于生成认证信任状,用户标识处理(如存储和管理用户永久身份等),接入授权控制和签约数据管理等。11. UDM network element: used to generate authentication credentials, user identification processing (such as storing and managing user permanent identities, etc.), access authorization control and contract data management, etc.
12、应用功能(application function,AF)网元:主要支持与3GPP核心网交互来提供服务,例如影响数据路由决策、与策略控制功能(PCF)交互、或者向网络侧提供第三方等。12. Application function (application function, AF) network element: mainly supports interaction with the 3GPP core network to provide services, such as influencing data routing decisions, interacting with policy control functions (PCF), or providing third parties to the network side, etc.
13、服务通信代理(service communication proxy,SCP):用于完成服务化接口信令的路由和转发。运营商可以根据需要部署SCP,SCP网元可为服务化接口信令的发送方提供路由和转发服务,服务化接口信令的发送方例如可为某NF网元。NF网元上可配置对应的SCP网元的信息,该SCP网元可为该NF网元提供转发消息的服务。在该NF网元需要使用SCP网元进行通信的情况下,该NF网元可向配置的SCP网元发送消息。13. Service communication proxy (SCP): used to complete the routing and forwarding of service interface signaling. The operator can deploy the SCP according to the needs. The SCP network element can provide routing and forwarding services for the sender of the service interface signaling. The sender of the service interface signaling can be, for example, a certain NF network element. The information of the corresponding SCP network element can be configured on the NF network element, and the SCP network element can provide the service of forwarding messages for the NF network element. In the case that the NF network element needs to use the SCP network element for communication, the NF network element can send a message to the configured SCP network element.
在图1所示的网络架构中,各网元之间可以通过图中所示的接口通信。如图所示,UE和AMF之间可以通过N1接口进行交互,交互消息例如可以称为N1消息(N1Message)。RAN和AMF之间可以通过N2接口进行交互,N2接口可以用于非接入层(non-access stratum,NAS)消息的发送等。RAN和UPF之间可以通过N3接口进行交互,N3接口可以用于传输用户面的数据等。SMF和UPF之间可以通过N4接口进行交互,N4接口可以用于传输例如N3连接的隧道标识信息,数据缓存指示信息,以及下行数据通知消息等信息。UPF和DN之间可以通过N6接口进行交互,N6接口可以于传输用户面的数据等。其他接口与各网元之间的关系如图1中所示,为了简洁,这里不一一详述。In the network architecture shown in FIG. 1 , network elements can communicate through the interfaces shown in the figure. As shown in the figure, the UE and the AMF may interact through the N1 interface, and the interaction message may be called an N1 message (N1Message), for example. The RAN and the AMF can interact through the N2 interface, and the N2 interface can be used for sending non-access stratum (non-access stratum, NAS) messages, etc. The RAN and UPF can interact through the N3 interface, and the N3 interface can be used to transmit user plane data, etc. The SMF and UPF can interact through the N4 interface, and the N4 interface can be used to transmit information such as the tunnel identification information of the N3 connection, data cache indication information, and downlink data notification messages. The UPF and DN can interact through the N6 interface, and the N6 interface can be used to transmit data on the user plane. The relationship between other interfaces and each network element is shown in FIG. 1 , and for the sake of brevity, details are not described here one by one.
应理解,上述应用于本申请实施例的网络架构仅是举例说明的从服务化架构的角度描述的网络架构,适用本申请实施例的网络架构并不局限于此,任何能够实现上述各个网元的功能的网络架构都适用于本申请实施例。It should be understood that the above-mentioned network architecture applied to the embodiment of the present application is only an example network architecture described from the perspective of a service-oriented architecture, and the network architecture applicable to the embodiment of the present application is not limited thereto. Any network element that can implement the above-mentioned All functional network architectures are applicable to this embodiment of the application.
还应理解,图1中所示的AMF、SMF、UPF、网络切片选择功能网元(network slice selection function,NSSF)、NEF、AUSF、NRF、PCF、UDM可以理解为核心网中用于实现不同功能的网元,例如可以按需组合成网络切片。这些核心网网元可以各自独立的设备,也可以集成于同一设备中实现不同的功能,本申请对于上述网元的具体形态不作限定。It should also be understood that AMF, SMF, UPF, network slice selection function (network slice selection function, NSSF), NEF, AUSF, NRF, PCF, and UDM shown in FIG. Functional network elements, for example, can be combined into network slices on demand. These core network elements may be independent devices, or may be integrated into the same device to implement different functions. This application does not limit the specific forms of the above network elements.
还应理解,上述命名仅为便于区分不同的功能而定义,不应对本申请构成任何限定。本申请并不排除在5G网络以及未来其它的网络中采用其他命名的可能。例如,在6G网络中,上述各个网元中的部分或全部可以沿用5G中的术语,也可能采用其他名称等。图1中的各个网元之间的接口名称只是一个示例,具体实现中接口的名称可能为其他的名称,本申请对此不作具体限定。此外,上述各个网元之间的所传输的消息(或信令)的名称也仅仅是一个示例,对消息本身的功能不构成任何限定。It should also be understood that the above names are only defined for the convenience of distinguishing different functions, and shall not constitute any limitation to the present application. This application does not exclude the possibility of using other names in the 5G network and other networks in the future. For example, in a 6G network, some or all of the above network elements may use the terms in 5G, or may use other names. The name of the interface between network elements in FIG. 1 is just an example, and the name of the interface in a specific implementation may be another name, which is not specifically limited in this application. In addition, the name of the message (or signaling) transmitted between the above network elements is only an example, and does not constitute any limitation on the function of the message itself.
为了便于理解本申请实施例提供的方案,首先对服务化网元之间的通信模式进行简单说明。In order to facilitate the understanding of the solutions provided by the embodiments of the present application, a communication mode between service network elements is briefly described first.
5G服务化的系统架构中,基于服务化接口通信的双方分别称为服务消费者(service consumer)和服务提供者(service producer)。其中请求服务的一方为service consumer,提供服务的一方叫service producer。服务消费者也可以称为消费者、消费网元、用户、请求端或请求者或服务消费网元等。服务提供者也可以称为提供网元、服务提供网元、提供者、生产者或响应者等,本申请不作限定。In the 5G service-based system architecture, the two parties communicating based on the service-based interface are called service consumers and service producers respectively. The party that requests the service is called the service consumer, and the party that provides the service is called the service producer. A service consumer may also be called a consumer, a consuming network element, a user, a requester or a requester or a service consuming network element, etc. A service provider may also be called a providing network element, a service providing network element, a provider, a producer, or a responder, etc., which are not limited in this application.
根据服务通信双方的消息交互是否经过SCP可以将通信分为直接通信和间接通信。服务消费者与服务提供者之间直接进行服务消息的交互,这种交互方式称为直接通信。间接通信即服务消费者与服务提供者之间通过一个或者多个SCP进行消息的交互。间接通信也可以称为非直接通信。Communication can be divided into direct communication and indirect communication according to whether the message interaction between the service communication parties passes through the SCP. Service consumers and service providers directly interact with service messages, which is called direct communication. Indirect communication refers to the interaction of messages between service consumers and service providers through one or more SCPs. Indirect communication can also be referred to as indirect communication.
图2示出了直接通信场景下的一种通信模式的示意图。在图2所示的通信模式中,无需NRF网元参与,服务消费者上配置有服务提供者的信息,当服务消费者需要通信时,根据本地的配置选择服务提供者,并向选择的服务提供者发送服务请求消息。Fig. 2 shows a schematic diagram of a communication mode in a direct communication scenario. In the communication mode shown in Figure 2, there is no need for the participation of NRF network elements, and the information of the service provider is configured on the service consumer. When the service consumer needs to communicate, the service provider is selected according to the local configuration, and the selected service provider is sent to The provider sends a service request message.
图3示出了直接通信场景下的另一种通信模式的示意图。在图3所示的通信模式中,需要基于NRF网元进行通信,服务消费者通过NRF网元执行服务发现流程,以发现可用的服务提供者的信息,并基于发现的结果选择服务提供者,并向选择的服务提供者发送服务请求消息。Fig. 3 shows a schematic diagram of another communication mode in a direct communication scenario. In the communication mode shown in Figure 3, it is necessary to communicate based on the NRF network element. The service consumer executes the service discovery process through the NRF network element to discover the information of the available service provider, and selects the service provider based on the result of the discovery. And send a service request message to the selected service provider.
图4示出了间接通信场景下的一种通信模式的示意图。在图4所示的通信模式中,服务发现流程无需SCP参与,即服务消费者直接与NRF网元进行通信,以执行服务发现流程来选择对应的服务提供者。Fig. 4 shows a schematic diagram of a communication mode in an indirect communication scenario. In the communication mode shown in FIG. 4 , the service discovery process does not require the SCP to participate, that is, the service consumer directly communicates with the NRF network element to execute the service discovery process to select a corresponding service provider.
图5示出了间接通信场景下的另一种通信模式的示意图。在图5所示的通信模式基于代理发现,即服务消费者不直接与NRF网元进行通信,由SCP网元代理服务消费者与NRF网元进行通信,以执行服务发现流程来选择对应的服务提供者。Fig. 5 shows a schematic diagram of another communication mode in an indirect communication scenario. The communication mode shown in Figure 5 is based on agent discovery, that is, the service consumer does not directly communicate with the NRF network element, and the SCP network element communicates with the NRF network element on behalf of the service consumer to execute the service discovery process to select the corresponding service provider.
下面结合图6介绍一种NF服务请求及授权方法100,该方法100是在直接通信场景下的一种服务请求和授权流程。从图6中可以看出,方法100包括:The following introduces a NF service request and authorization method 100 with reference to FIG. 6 . The method 100 is a service request and authorization process in a direct communication scenario. As can be seen from FIG. 6, the method 100 includes:
S101,NF服务消费者向NRF发送访问令牌获取请求消息。S101. The NF service consumer sends an access token acquisition request message to the NRF.
在服务化的系统架构中,NF服务消费者向NF服务提供者请求服务时,NF服务提供者需要对NF服务消费者请求的服务进行授权检查,即检查NF服务消费者是否被授权使用请求的服务,只有通过了授权检查,NF服务提供者才会向NF服务消费者提供相应的服务。In a service-oriented system architecture, when an NF service consumer requests a service from an NF service provider, the NF service provider needs to perform an authorization check on the service requested by the NF service consumer, that is, check whether the NF service consumer is authorized to use the requested Service, only through the authorization check, the NF service provider will provide the corresponding service to the NF service consumer.
针对NF服务提供者对NF服务消费者请求的服务的授权验证,可以使用基于访问令牌(access token)的授权验证方案。在NF服务消费者向NF服务提供网元请求服务之前, NF服务消费者向授权服务网元发送访问令牌获取请求(Nnrf_AccessToken_Get Request)消息以请求获取访问令牌,为了方便,这里以NRF为授权服务网元为例进行说明。For the authorization verification of the service requested by the NF service consumer by the NF service provider, an authorization verification scheme based on an access token (access token) can be used. Before the NF service consumer provides the network element request service to the NF service, the NF service consumer sends an access token acquisition request (Nnrf_AccessToken_Get Request) message to the authorized service network element to request an access token. For convenience, NRF is used here as the authorization The service network element is taken as an example for description.
在一种情况下,NF服务消费者可以请求接入特定网络功能类型(NF type)的NF服务提供者的服务的access token。在这种情况下,访问令牌获取请求消息中包括NF服务消费者的NF实例ID,期望的服务名称,NF服务消费者的NF type和NF服务提供者的NF type。可选地,该访问令牌获取请求消息中还可以包括附加范围(即请求的资源和请求的针对资源的操作)、期望的NF服务提供者实例的S-NSSAI列表或NSI ID列表、期望的NF服务提供者实例的NF Set ID、NF服务消费者的S-NSSAI列表等。In one case, an NF service consumer may request an access token for accessing services of an NF service provider of a specific network function type (NF type). In this case, the access token acquisition request message includes the NF instance ID of the NF service consumer, the desired service name, the NF type of the NF service consumer, and the NF type of the NF service provider. Optionally, the access token acquisition request message may also include an additional scope (that is, the requested resource and the requested operation on the resource), the S-NSSAI list or NSI ID list of the desired NF service provider instance, the desired NF Set ID of NF service provider instance, S-NSSAI list of NF service consumer, etc.
在另一种情况下,NF服务消费者可以请求接入特定NF服务提供者实例或NF服务提供者服务实例的服务的access token。在这种情况下,访问令牌获取请求消息中包括请求的NF服务提供者的NF实例ID(s),期望的服务名称,NF服务消费者的NF实例ID。可选地,该访问令牌获取请求消息中还包括附加范围(即请求的资源和请求的针对资源的操作)。In another case, an NF Service Consumer may request an access token for accessing a specific NF Service Provider instance or a service of an NF Service Provider Service Instance. In this case, the access token acquisition request message includes the NF instance ID(s) of the requesting NF service provider, the desired service name, and the NF instance ID of the NF service consumer. Optionally, the access token acquisition request message also includes an additional scope (ie, the requested resource and the requested operation on the resource).
如果NF服务消费者希望请求一个access token用于该NF服务消费者的NF set中的任意NF请求被授权的服务,则该访问令牌获取请求消息中包括NF set ID,该NF set ID用于标识该NF服务消费者所属的NF set。If the NF service consumer wishes to request an access token for any NF request authorized service in the NF set of the NF service consumer, the access token acquisition request message includes the NF set ID, which is used for Identify the NF set to which the NF service consumer belongs.
S102,NRF验证NF服务消费者是否被授权使用相应的服务。S102. The NRF verifies whether the NF service consumer is authorized to use the corresponding service.
授权网元对访问令牌获取请求消息中的参数进行验证。示例性地,授权网元验证请求消息中携带的参数(如NF type等)是否与NF服务消费者的公钥证书或NF profile匹配。授权网元还检查NF服务消费者是否被授权接入请求的服务。The authorized network element verifies the parameters in the access token acquisition request message. Exemplarily, the authorized network element verifies whether the parameters carried in the request message (such as NF type, etc.) match the public key certificate or NF profile of the NF service consumer. The authorizing network element also checks whether the NF service consumer is authorized to access the requested service.
如果上述验证流程验证通过,则授权网元生成access token,该access token中包括claims,该claims包括授权网元的NF实例Id,NF服务消费者的NF实例ID,NF服务提供者的NF type,期望的服务名称,到期时间等。可选的,该claims还可以包括附加范围(允许请求的资源和请求的针对资源的操作),期望的NF服务提供者实例的S-NSSAI列表或NSI ID列表、期望的NF服务提供者实例的NF Set ID等。If the above verification process is verified, the authorized network element generates an access token, which includes claims, and the claims include the NF instance ID of the authorized network element, the NF instance ID of the NF service consumer, and the NF type of the NF service provider. Desired service name, expiration time, etc. Optionally, the claims may also include additional scopes (allowing the requested resource and the requested operation on the resource), the S-NSSAI list or NSI ID list of the desired NF service provider instance, the desired NF service provider instance NF Set ID, etc.
另一方面,授权网元可以对生成的access token进行安全保护,这里的安全保护可以是完整性保护。例如,授权网元利用共享的密钥对access token生成消息认证码(message authentication code,MAC),授权网元可以将该MAC和access token一起发送给NF服务消费者,该MAC用于验证access token内的信息是否被篡改;或者,授权网元利用私钥对claims进行签名,服务消费者可以通过该签名可以验证claims是否被篡改。On the other hand, the authorized network element can perform security protection on the generated access token, where the security protection can be integrity protection. For example, the authorized network element uses the shared key to generate a message authentication code (message authentication code, MAC) for the access token, and the authorized network element can send the MAC and the access token to the NF service consumer, and the MAC is used to verify the access token Whether the information in the claim has been tampered with; or, the authorized network element uses the private key to sign the claims, and the service consumer can verify whether the claims have been tampered with through the signature.
如果访问令牌获取请求消息中包括NF set ID,则NRF确定NF服务消费者请求的access token是否用于NF set中所有NF服务消费者实例。若NRF确定NF服务消费者授权通过,则NRF将该NF set ID包括在claims中。If the NF set ID is included in the access token acquisition request message, the NRF determines whether the access token requested by the NF service consumer is used for all NF service consumer instances in the NF set. If the NRF determines that the NF service consumer is authorized, the NRF includes the NF set ID in the claims.
S103,授权网元(NRF)向NF服务消费者发送访问令牌获取响应消息,该响应消息中包括访问令牌。S103. The authorization network element (NRF) sends an access token acquisition response message to the NF service consumer, where the response message includes the access token.
示例性地,如果访问令牌获取请求消息中的参数均验证通过,且NF服务请求者被授权接入请求的服务,则授权网元通过访问令牌获取响应(Nnrf_AccessToken_Get Response)消息向NF服务消费者发送生成的access token。该访问令牌获取响应消息中还可以包括其他的参数,例如access token的到期时间,允许使用该access token请求的范围等。Exemplarily, if the parameters in the access token acquisition request message are verified, and the NF service requester is authorized to access the requested service, the authorized network element obtains a response (Nnrf_AccessToken_Get Response) message to the NF service for consumption or send the generated access token. The access token acquisition response message may also include other parameters, such as the expiration time of the access token, the scope of the access token request that is allowed to be used, and the like.
对应地,NF服务消费者从授权网元接收该access token,并保存该access token,在有效期内,用于后续访问claims中的NF提供者类型的服务使用。Correspondingly, the NF service consumer receives the access token from the authorized network element, and saves the access token, within the validity period, for subsequent access to the service usage of the NF provider type in the claims.
如果S102中的授权验证没有通过,则授权网元向NF服务消费者发送错误响应或者拒绝响应。If the authorization verification in S102 fails, the authorized network element sends an error response or a rejection response to the NF service consumer.
S104,NF服务消费者向NF服务提供者发送NF服务请求消息,该NF服务请求消息用于向NF服务提供者请求服务,该NF服务请求消息包括访问令牌。对应地,NF服务提供者从NF服务消费者接收该NF服务请求消息。S104. The NF service consumer sends an NF service request message to the NF service provider, where the NF service request message is used to request a service from the NF service provider, and the NF service request message includes an access token. Correspondingly, the NF service provider receives the NF service request message from the NF service consumer.
在一些情况下,该请求NF服务的NF消费者可能与请求获取访问令牌的NF消费者不同。此时,在该NF服务请求消息中携带NF set ID。In some cases, the NF consumer requesting the NF service may be different from the NF consumer requesting the access token. At this time, the NF set ID is carried in the NF service request message.
S105,NF服务提供者验证NF服务消费者是否被授权。S105. The NF service provider verifies whether the NF service consumer is authorized.
示例性地,NF服务提供者从NF服务请求消息中获取access token,并对该access token进行完整性验证。例如,该NF服务请求消息中携带了通过共享密钥对access token中的claims生成的MAC值(该共享密钥为NF服务提供者与NRF之间共享的密钥),则NF服务提供者使用共享密钥验证该MAC值;又例如,NRF对该access token进行了签名,则NF服务提供者使用NRF的公钥验证该签名。Exemplarily, the NF service provider obtains the access token from the NF service request message, and performs integrity verification on the access token. For example, the NF service request message carries the MAC value generated by the shared key pair of claims in the access token (the shared key is the key shared between the NF service provider and the NRF), and the NF service provider uses The shared key verifies the MAC value; for another example, if the NRF signs the access token, the NF service provider uses the NRF public key to verify the signature.
在完整性验证通过之后,NF服务提供者进一步对access token中的claims进行验证:After the integrity verification is passed, the NF service provider further verifies the claims in the access token:
验证claims中的NF服务提供者的NF实例ID或NF type与自己的id或type是否匹配。Verify that the NF instance ID or NF type of the NF service provider in the claims matches its own id or type.
如果claims中包括S-NSSAIs或NSI IDs,则NF服务提供者验证是否能够服务对应的切片。If the claims include S-NSSAIs or NSI IDs, the NF service provider verifies whether it can serve the corresponding slice.
如果claims中包括NF服务提供者的NF Set ID,则NF服务提供者验证claims中的NF set ID是否与自己的NF Set ID匹配;If the claims include the NF Set ID of the NF service provider, the NF service provider verifies whether the NF set ID in the claims matches its own NF Set ID;
如果claims中包括service服务名,则NF服务提供者验证是否匹配请求的服务操作;If the service service name is included in the claims, the NF service provider verifies whether it matches the requested service operation;
如果claims中包括附加范围信息,则NF服务提供者验证该附加范围与请求的操作是否匹配;If claims include additional scope information, the NF service provider verifies whether the additional scope matches the requested operation;
NF服务提供者将access token中的到期时间与当前的时间比较以验证该access token是否过期。The NF service provider compares the expiration time in the access token with the current time to verify whether the access token has expired.
如果NF服务请求消息中包括NF set ID,则NF服务提供者验证该NF set ID与access token中的claims中的NF set ID是否匹配。If the NF service request message includes the NF set ID, the NF service provider verifies whether the NF set ID matches the NF set ID in the claims in the access token.
若上述流程均验证成功,则NF服务提供者执行请求的服务,并在S106,向NF服务消费者发送NF服务响应消息。否则将验证错误的响应消息回复NF服务消费者。If the above procedures are verified successfully, the NF service provider executes the requested service, and at S106, sends an NF service response message to the NF service consumer. Otherwise, a verification error response message will be returned to the NF service consumer.
下面结合图7介绍另一种NF服务请求及授权方法200,该方法200是在间接通信场景下的一种服务请求和授权流程,例如,该方法200可应用于图4所示的间接通信模式中。从图7中可以看出,方法200包括:The following introduces another NF service request and authorization method 200 in conjunction with FIG. 7 . The method 200 is a service request and authorization process in an indirect communication scenario. For example, the method 200 can be applied to the indirect communication mode shown in FIG. 4 middle. As can be seen from FIG. 7, the method 200 includes:
S201,NF服务消费者通过NRF执行NF服务提供者的发现流程,发现可用的NF服务提供者。S201, the NF service consumer executes the discovery process of the NF service provider through the NRF, and discovers available NF service providers.
进一步地,NF服务提供者通过NRF获取access token。Further, the NF service provider obtains the access token through NRF.
在一种可能的实现方式中(记为方案1),NF服务消费者与NRF直接交互获取access token。示例性地:In a possible implementation (denoted as scheme 1), the NF service consumer directly interacts with the NRF to obtain an access token. Exemplarily:
S202,NF服务消费者向NRF发送访问令牌获取请求消息。S202. The NF service consumer sends an access token acquisition request message to the NRF.
S203,NRF向NF服务消费者发送访问令牌获取响应消息,该响应消息中包括access token。S203. The NRF sends an access token acquisition response message to the NF service consumer, where the response message includes the access token.
应理解,S202至S203与方法100中的S101至S103类似,NF服务消费者可以请求NF type粒度的access token,也可以请求NF服务提供者实例粒度的access token,NRF从NF服务消费者接收到访问令牌获取请求消息之后,需要验证NF服务消费者是否被授权请求该访问令牌(图7中为画出这个步骤)。具体流程可以参考方法100中的S101至S103,这里不再赘述。It should be understood that S202 to S203 are similar to S101 to S103 in method 100. The NF service consumer can request the access token at the granularity of NF type, or the access token at the instance granularity of the NF service provider, and the NRF receives it from the NF service consumer. After the access token acquisition request message, it is necessary to verify whether the NF service consumer is authorized to request the access token (this step is shown in Figure 7). For the specific process, reference may be made to S101 to S103 in the method 100, which will not be repeated here.
需要说明的是,针对请求NF type粒度的access token,S201可以在S202之前执行,也可以在S203之后执行。也就是说,在访问令牌获取流程之前,如果NF服务消费者没有执行服务发现流程,即NF服务消费者上没有可用的服务提供者信息,则NF服务消费者可以在访问令牌获取流程之后再执行服务发现流程。针对请求NF服务提供者实例粒度的access token,需要先执行服务发现流程。It should be noted that, for requesting an access token with NF type granularity, S201 can be executed before S202 or after S203. That is, before the access token acquisition process, if the NF service consumer does not perform the service discovery process, that is, there is no service provider information available on the NF service consumer, the NF service consumer can access the token after the access token acquisition process Then execute the service discovery process. For the access token requesting NF service provider instance granularity, the service discovery process needs to be executed first.
在另一种可能的实现方式中(记为方案2),NF服务消费者与NRF之间通过SCP交互获取access token。示例性地:In another possible implementation (denoted as scheme 2), the NF service consumer and the NRF interact to obtain an access token through SCP. Exemplarily:
S204,NF服务消费者向SCP发送访问令牌获取请求消息。S204, the NF service consumer sends an access token acquisition request message to the SCP.
该访问令牌获取请求消息中包括客户凭据声明CCA,该CCA包括NF消费者的NF实例ID、时间戳和到期时间、NF type。NF服务消费者利用私钥对该CCA进行了签名,签名的CCA包括公钥证书或者证书链,或者签名的CCA包括定位到公钥证书或证书链的统一资源定位符(uniform resource locator,URL)。The access token acquisition request message includes the client credential statement CCA, and the CCA includes the NF instance ID, timestamp and expiration time, and NF type of the NF consumer. The NF service consumer signs the CCA with the private key, and the signed CCA includes the public key certificate or the certificate chain, or the signed CCA includes the uniform resource locator (uniform resource locator, URL) located to the public key certificate or the certificate chain .
该访问令牌获取请求消息中包括的其他参数与方法100的S101中的访问令牌获取请求消息中的参数类似,为了简洁,不再重复说明。Other parameters included in the access token acquisition request message are similar to the parameters in the access token acquisition request message in S101 of the method 100, and for the sake of brevity, no repeated description is given.
S205,SCP向NRF发送该访问令牌获取请求消息。S205, the SCP sends the access token acquisition request message to the NRF.
S206,NRF验证NF服务消费者是否被授权。S206. The NRF verifies whether the NF service consumer is authorized.
示例性地,若访问令牌获取请求消息中包括CCA,则NRF根据CCA认证NF服务消费者若认证通过,NRF进一步执行授权检查,具体流程与方法100中的S102类似,不再赘述。若授权验证通过,则NRF生成access token,NRF分发和保护access token的方式与方法100中的相关内容类似,不再重复说明。Exemplarily, if the access token acquisition request message includes CCA, the NRF authenticates the NF service consumer according to the CCA. If the authentication passes, the NRF further performs an authorization check. The specific process is similar to S102 in the method 100 and will not be described again. If the authorization verification is passed, the NRF generates an access token, and the method of distributing and protecting the access token by the NRF is similar to the relevant content in method 100, and will not be described again.
S207,NRF向SCP发送访问令牌获取响应(Nnrf_AccessToken_Get Response)消息,该响应消息中包括access token。S207. The NRF sends an access token acquisition response (Nnrf_AccessToken_Get Response) message to the SCP, and the response message includes the access token.
S208,SCP向NF服务消费者发送访问令牌获取响应(Nnrf_AccessToken_Get Response)消息,该响应消息中包括access token。S208, the SCP sends an access token acquisition response (Nnrf_AccessToken_Get Response) message to the NF service consumer, and the response message includes the access token.
S209,NF服务消费者向SCP发送NF服务请求消息,该服务请求消息中包括访问令牌以及CCA。S209, the NF service consumer sends an NF service request message to the SCP, where the service request message includes the access token and the CCA.
对应地,SCP从NF接收NF服务请求消息。SCP选择一个NF服务提供者实例,执行应用编程接口(application programming interface,API)修改。并在S210,将接收到的NF服务请求消息发送给选择的NF服务提供者实例。Correspondingly, the SCP receives the NF Service Request message from the NF. The SCP selects an NF service provider instance and performs application programming interface (application programming interface, API) modification. And at S210, send the received NF service request message to the selected NF service provider instance.
S211,NF服务提供者验证NF服务消费者是否被授权。S211. The NF service provider verifies whether the NF service consumer is authorized.
如果NF服务请求消息中包括CCA,则NF服务提供者通过验证CCA来验证NF服务 消费者。其他验证流程与方法100中的S105类似,不再赘述。If the CCA is included in the NF Service Request message, the NF Service Provider authenticates the NF Service Consumer by verifying the CCA. Other verification processes are similar to S105 in the method 100 and will not be repeated here.
如果上述步骤验证成功,则NF服务提供者处理服务请求,并在S212向SCP发送NF服务响应消息。If the verification of the above steps is successful, the NF service provider processes the service request, and sends a NF service response message to the SCP at S212.
SCP执行API修改,并在S213向NF服务消费者发送NF服务响应消息。The SCP executes the API modification, and sends an NF service response message to the NF service consumer at S213.
下面结合图8介绍又一种NF服务请求及授权方法300,该方法300是在间接通信场景下的一种服务请求和授权流程,例如,方法300应用于图5所示的间接通信模式中。从图8中可以看出,方法300包括:The following introduces another NF service request and authorization method 300 in conjunction with FIG. 8 . The method 300 is a service request and authorization process in an indirect communication scenario. For example, the method 300 is applied to the indirect communication mode shown in FIG. 5 . As can be seen from FIG. 8, method 300 includes:
S301,NF服务消费者向SCP发送访问令牌获取请求消息。该请求消息中可以包括NF服务消费者的CCA,还可以包括access token。该access token为在NF服务消费者之前与SCP交互从服务响应消息中接收的。如果之前接收的access token已经过期,则NF服务消费者可以在请求中包含发现参数,发现参数用于发现NF服务提供者。S301. The NF service consumer sends an access token acquisition request message to the SCP. The request message may include the CCA of the NF service consumer, and may also include an access token. The access token is received from the service response message before the NF service consumer interacts with the SCP. If the previously received access token has expired, the NF service consumer can include discovery parameters in the request, and the discovery parameters are used to discover the NF service provider.
S302,SCP与NRF之间执行服务发现流程。S302. Execute a service discovery process between the SCP and the NRF.
若SCP上没有存储可用的access token,且S301中没有包含access token,则SCP发起访问令牌获取流程:If there is no available access token stored on the SCP, and the access token is not included in S301, the SCP initiates the access token acquisition process:
S303,SCP向NRF发送访问令牌获取请求消息。S303. The SCP sends an access token acquisition request message to the NRF.
S304,NRF验证NF服务消费者是否被授权。S304. The NRF verifies whether the NF service consumer is authorized.
S305,NRF向SCP发送访问令牌获取响应消息。S305. The NRF sends an access token acquisition response message to the SCP.
应理解,S303至S305与方法200中的S205至S207类似,这里不再重复说明。It should be understood that S303 to S305 are similar to S205 to S207 in the method 200 and will not be repeated here.
需要说明的是,若S303请求的不是针对特定NF服务提供者的access token,则S302可以在步骤S303和S306之间的任何时间。It should be noted that, if what S303 requests is not an access token for a specific NF service provider, then S302 can be at any time between steps S303 and S306.
若SCP存储了可用的access token,或S301中包含了access token,则SCP跳过S303至S305,直接向NF服务提供者执行服务请求流程。示例性地:If the SCP stores an available access token, or the access token is included in S301, the SCP skips S303 to S305, and directly executes the service request process to the NF service provider. Exemplarily:
S306,SCP向NF服务提供者发送NF服务请求消息。S306, the SCP sends an NF service request message to the NF service provider.
S307,NF服务提供者验证NF服务消费者是否被授权。S307. The NF service provider verifies whether the NF service consumer is authorized.
S308,NF服务提供者向SCP发送NF服务响应消息。S308. The NF service provider sends an NF service response message to the SCP.
S309,SCP向NF服务消费者发送NF服务响应消息。S309, the SCP sends an NF service response message to the NF service consumer.
应理解,S306至S309与方法200中的S210至S213类似,这里不再重复说明。It should be understood that S306 to S309 are similar to S210 to S213 in the method 200 and will not be repeated here.
在上述的方法100至方法300中,NF set中的任意一个NF都能够为该NF set请求access token以用于请求服务,并且该NF set中的其他NF都可以使用该NF请求的access token来请求服务。然而,恶意的NF服务消费者可以通过窃听等方式获取其他NF set的access token,并越权或非法使用该access token获取服务。In the above method 100 to method 300, any NF in the NF set can request an access token for the NF set to request services, and other NFs in the NF set can use the access token requested by the NF to Request service. However, malicious NF service consumers can obtain access tokens of other NF sets through eavesdropping, etc., and use the access token beyond authority or illegally to obtain services.
鉴于此,本申请提供了一种授权验证的方法,可以防止恶意的NF消费者越权或者非法使用access token获取服务。In view of this, this application provides an authorization verification method, which can prevent malicious NF consumers from overreaching or illegally using access tokens to obtain services.
图9示出了本申请实施例提供的授权验证的方法400的示例性流程图。方法400包括:FIG. 9 shows an exemplary flowchart of a method 400 for authorization verification provided by the embodiment of the present application. Method 400 includes:
S401,第一网元接收服务请求消息。S401. The first network element receives a service request message.
该服务请求消息与第二网元相关联。例如,在直接通信场景下,第一网元从第二网元接收该服务请求消息;在间接通信场景下,第一网元从服务通信代理网元接收该服务请求消息,其中,该服务通信代理网元可以是直接从第二网元接收到的该服务请求消息,也可以是通过其他一个或多个服务通信代理网元从第二网元接收到的该服务请求消息。也就是 说,在间接通信场景下,第一网元可以通过一个或者多个服务通信网元与第二网元进行通信。The service request message is associated with the second network element. For example, in the direct communication scenario, the first network element receives the service request message from the second network element; in the indirect communication scenario, the first network element receives the service request message from the service communication agent network element, wherein the service communication The proxy network element may receive the service request message directly from the second network element, or may receive the service request message from the second network element through one or more service communication proxy network elements. That is to say, in the indirect communication scenario, the first network element can communicate with the second network element through one or more service communication network elements.
该第一网元可以是一种服务提供网元,该第二网元可以是一种服务请求网元。The first network element may be a service providing network element, and the second network element may be a service requesting network element.
该服务请求消息用于请求第一网元向第二网元提供第一服务,该服务请求消息中包括访问令牌,该访问令牌包括第一NF集的标识,即该访问令牌与该第一NF集的标识相关联,或者说,该访问令牌用于该第一NF集中的NF请求服务,该第一NF集的标识用于指示该访问令牌所适用的服务请求网元,即该第一NF集对应于服务请求网元。The service request message is used to request the first network element to provide the first service to the second network element, and the service request message includes an access token, and the access token includes an identifier of the first NF set, that is, the access token and the The identifier of the first NF set is associated, or in other words, the access token is used for the NF request service in the first NF set, and the identifier of the first NF set is used to indicate the service requesting network element to which the access token is applicable, That is, the first NF set corresponds to the service requesting network element.
应理解,该访问令牌受到了安全保护,因此恶意的NF无法对访问令牌内的信息进行篡改。可以是由分发该访问令牌的网元(例如第三网元)对该访问令牌进行的安全保护。例如,第三网元利用共享密钥对该访问令牌(或者是访问令牌内的参数)生成完整性保护参数(例如消息认证码MAC),第二网元在服务请求消息中携带该完整性保护参数。第一网元可以根据该完整性保护参数验证访问令牌内的信息是否被篡改。又例如,第三网元利用私钥对安全令牌内的信息进行签名,第一网元从服务请求消息中获取访问令牌之后,通过对签名进行验证来确定访问令牌内的信息是否被篡改。It should be understood that the access token is protected, so a malicious NF cannot tamper with the information in the access token. The security protection of the access token may be performed by the network element (for example, the third network element) that distributes the access token. For example, the third network element uses the shared key to generate an integrity protection parameter (such as a message authentication code MAC) for the access token (or a parameter in the access token), and the second network element carries the integrity protection parameter in the service request message. sexual protection parameters. The first network element may verify whether the information in the access token has been tampered with according to the integrity protection parameter. For another example, the third network element uses the private key to sign the information in the security token, and after the first network element obtains the access token from the service request message, it determines whether the information in the access token is verified by verifying the signature. tamper.
可选地,该访问令牌中还可以包括第四网元的标识,该第四网元属于第一NF集,该第四网元的标识用于指示该访问令牌是由该第四网元请求获得的。第一网元从服务请求消息中获取第四网元的标识之后,判断第二网元的标识与第四网元的标识相匹配。在不匹配的情况下,说明第二网元与第四网元不同,或者说,该访问令牌不是由第二网元请求获得的,则进一步地:Optionally, the access token may also include an identifier of a fourth network element that belongs to the first NF set, and the identifier of the fourth network element is used to indicate that the access token is issued by the fourth network element. Obtained by meta request. After the first network element obtains the identifier of the fourth network element from the service request message, it determines that the identifier of the second network element matches the identifier of the fourth network element. If it does not match, it means that the second network element is different from the fourth network element, or that the access token is not obtained by the request of the second network element, then further:
S402,第一网元根据第一NF集的标识,确定是否授权第二网元使用该第一服务。S402. The first network element determines whether to authorize the second network element to use the first service according to the identifier of the first NF set.
也就是说,在第一网元根据第一NF集的标识确定是否授权第二网元使用第一服务之前,可选地,第一网元确定该第一网元的标识与第四网元的标识不同。需要说明的是,如果第一网元的标识和该第四网元的标识相同的情况下,可以跳过S402步骤的验证过程。需要说明的是,该第一网元根据该第一NF集的标识,确定是否授权该第二网使用该第一服务,还可以理解为,第一网元根据该第一NF集的标识,确定第二网元是否被授权使用第一服务,或者还可以理解为,第一网元根据该第一NF集的标识,确定向第二网元提供第一服务或者拒绝向第二网元提供第一服务,或者还可以理解为,第一网元根据该第一NF集的标识,提供请求的第一服务(或者说执行第一服务)并发送响应消息,或者发送指示拒绝服务请求的响应消息;或者还可以理解为,第一网元根据该第一NF集的标识,提供请求的第一服务(或者说执行第一服务)并发送响应消息,或者发送服务请求失败的响应消息。That is to say, before the first network element determines whether to authorize the second network element to use the first service according to the identifier of the first NF set, optionally, the first network element determines the identity of the first network element and the fourth network element IDs are different. It should be noted that, if the identifier of the first network element is the same as the identifier of the fourth network element, the verification process of step S402 may be skipped. It should be noted that the first network element determines whether to authorize the second network to use the first service according to the identifier of the first NF set. It can also be understood that, according to the identifier of the first NF set, the first network element, Determining whether the second network element is authorized to use the first service, or it can also be understood that the first network element determines to provide the first service to the second network element or refuse to provide the first service to the second network element according to the identifier of the first NF set. The first service, or it can also be understood that the first network element provides the requested first service (or executes the first service) according to the identifier of the first NF set and sends a response message, or sends a response indicating that the service request is rejected message; or it can also be understood that, according to the identifier of the first NF set, the first network element provides the requested first service (or executes the first service) and sends a response message, or sends a response message that the service request fails.
该第一网元确定是否授权该第二网元使用所述第一服务的具体表现形式可以是:在授权所述第二网元使用所述第一服务的情况下,所述第一网元向所述第二网元提供所述第一服务;或者,在未授权所述第二网元使用所述第一服务的情况下,所述第一网元拒绝所述服务请求消息,以拒绝所述第二网元请求的所述第一服务。The specific manifestation of the first network element determining whether to authorize the second network element to use the first service may be: when the second network element is authorized to use the first service, the first network element providing the first service to the second network element; or, if the second network element is not authorized to use the first service, the first network element rejects the service request message to reject The first service requested by the second network element.
示例性地,第一网元确定该第二网元是否属于该第一NF集的标识所指示的第一NF集合,例如,第一网元根据访问令牌获取该第一NF集的标识,然后根据该第一NF集的标识判断第二网元是否属于第一NF集合,在该第二网元不属于该第一NF集合的情况下,该第一网元拒绝向该第二网元提供该第一服务。Exemplarily, the first network element determines whether the second network element belongs to the first NF set indicated by the identifier of the first NF set, for example, the first network element acquires the identifier of the first NF set according to the access token, Then, according to the identifier of the first NF set, it is judged whether the second network element belongs to the first NF set, and if the second network element does not belong to the first NF set, the first network element refuses to send to the second network element The first service is provided.
应理解,在该第二网元不属于该第一NF集合的情况下,该第一网元确定该第二网元未被授权使用该访问令牌,从而拒绝向该第二网元提供该第一服务。It should be understood that, in the case that the second network element does not belong to the first NF set, the first network element determines that the second network element is not authorized to use the access token, thereby refusing to provide the second network element with the access token. First service.
一种可能的实现方式中,第一网元根据配置信息和第二网元的标识确定第二网元是否属于第一NF集(或者说第一NF集的标识所指示的NF集合),在第二网元不属于第一NF集的情况下,第一网元拒绝向第二网元提供第一服务,在第二网元属于第一NF集且访问令牌被验证通过的情况下,第一网元授权第二网元使用第一服务。In a possible implementation manner, the first network element determines whether the second network element belongs to the first NF set (or the NF set indicated by the identifier of the first NF set) according to the configuration information and the identifier of the second network element, and then When the second network element does not belong to the first NF set, the first network element refuses to provide the first service to the second network element; when the second network element belongs to the first NF set and the access token is verified, The first network element authorizes the second network element to use the first service.
示例性地,第一网元预先保存了NF消费者的配置信息,该配置信息包括第一NF集的标识和/或第二网元所属的NF集的标识(记为第二NF集的标识)。第一网元接收到服务请求消息之后,第一网元根据本地保存的配置信息判断第二网元是否属于第一NF集。具体例如,在直接通信场景下,第一网元从第二网元的证书信息中获取第二网元的标识,然后根据该第二网元的标识和配置信息确定第二网元的标识所对应的第二NF集的标识,如果第二网元没有对应的NF集,或者第二NF集的标识与第一NF集的标识不同,则第一网元确定第二网元不属于该第一NF集,否则第一网元确定第二网元数据属于第一NF集。应理解,在直接通信场景下,第一网元和第二网元通信前会建立安全连接,第二网元会将自己的证书信息发送给第一网元,从而第一网元可以从该证书信息中获取第二网元的标识。又例如,第一网元根据第一NF集的标识和配置信息确定第一NF集所对应的所有NF的标识,当这些标识中包括第二NF的标识,则第一网元确定第二网元属于该第一NF集,否则第一网元确定第二网元不属于该第一NF集。在间接通信场景下,服务请求消息中还包括第二网元的CCA,该CCA中包括该第二网元的标识,第一网元可以从该CCA中获取第二网元的标识。后续验证流程与直接通信场景类似,这里不再赘述。在第二网元不属于第一NF集的情况下,第一网元拒绝向第二网元提供第一服务;在第二网元属于第一NF集且访问令牌被验证通过的情况下,第一网元授权第二网元使用第一服务。又例如,在直接通信场景下,第一网元从该服务请求中获取第二网元的标识,即第二网元在服务请求消息中携带第二网元的标识,当该服务请求消息中携带的该第二网元的标识与第二网元的证书信息中的身份标识相同时,第一网元根据该第二网元的标识(或者证书中的标识)和配置信息确定第二网元的标识所对应的NF集的标识(记为第二NF集的标识),如果第二网元没有对应的NF集,或者第二NF集的标识与第一NF集的标识不同,则第一网元确定第二网元不属于该第一NF集,否则第一网元确定第二网元属于第一NF集。应理解,在直接通信场景下,第一网元和第二网元通信前会建立安全连接,在安全连接建立过程中第二网元会将自己的证书信息发送给第一网元,从而第一网元可以从该证书信息中获取第二网元的身份标识。Exemplarily, the first network element pre-stores the configuration information of the NF consumer, and the configuration information includes the identifier of the first NF set and/or the identifier of the NF set to which the second network element belongs (denoted as the identifier of the second NF set ). After the first network element receives the service request message, the first network element judges whether the second network element belongs to the first NF set according to the locally stored configuration information. Specifically, for example, in a direct communication scenario, the first network element obtains the identity of the second network element from the certificate information of the second network element, and then determines the identity of the second network element according to the identity and configuration information of the second network element. The identifier of the corresponding second NF set, if the second network element does not have a corresponding NF set, or the identifier of the second NF set is different from the identifier of the first NF set, then the first network element determines that the second network element does not belong to the first NF set An NF set, otherwise the first network element determines that the data of the second network element belongs to the first NF set. It should be understood that in the direct communication scenario, the first network element and the second network element will establish a secure connection before communicating, and the second network element will send its own certificate information to the first network element, so that the first network element can access the Obtain the identifier of the second network element from the certificate information. For another example, the first network element determines the identities of all NFs corresponding to the first NF set according to the identities and configuration information of the first NF set, and when these identities include the identities of the second NF, the first network element determines the The element belongs to the first NF set, otherwise the first network element determines that the second network element does not belong to the first NF set. In the indirect communication scenario, the service request message also includes the CCA of the second network element, and the CCA includes the identifier of the second network element, and the first network element can acquire the identifier of the second network element from the CCA. The subsequent verification process is similar to the direct communication scenario, and will not be repeated here. When the second network element does not belong to the first NF set, the first network element refuses to provide the first service to the second network element; when the second network element belongs to the first NF set and the access token is verified and passed , the first network element authorizes the second network element to use the first service. For another example, in a direct communication scenario, the first network element obtains the identifier of the second network element from the service request, that is, the second network element carries the identifier of the second network element in the service request message, and when the service request message contains When the carried identifier of the second network element is the same as the identifier in the certificate information of the second network element, the first network element determines the second network element according to the identifier of the second network element (or the identifier in the certificate) and configuration information. The identity of the NF set corresponding to the identity of the element (denoted as the identity of the second NF set), if the second network element does not have a corresponding NF set, or the identity of the second NF set is different from the identity of the first NF set, the first NF set A network element determines that the second network element does not belong to the first NF set; otherwise, the first network element determines that the second network element belongs to the first NF set. It should be understood that in the direct communication scenario, a secure connection will be established before the communication between the first network element and the second network element, and the second network element will send its own certificate information to the first network element during the establishment of the secure connection, so that the second network element A network element can obtain the identity of the second network element from the certificate information.
该第一网元拒绝向该第二网元提供该第一服务的具体表现形式可以是:该第一网元向该第二网元发送服务响应消息,该服务响应消息用于指示拒绝提供该第一服务,可选的,该服务响应消息中还包括拒绝的原因,例如,拒绝的原因可以是访问令牌验证不通过。The specific manifestation of the first network element's refusal to provide the first service to the second network element may be: the first network element sends a service response message to the second network element, and the service response message is used to indicate the refusal to provide the first service For the first service, optionally, the service response message further includes a reason for rejection, for example, the reason for rejection may be that the access token verification fails.
另一种可能的实现方式中,第一网元请求第三网元验证第二网元是否属于第一NF集。示例性地,第一网元向第三网元发送第一验证请求消息,该第一验证请求消息中包括第二网元的标识和第一NF集的标识,该第一验证请求消息用于请求验证第二网元是否属于第一NF集(或者说第一NF集的标识所指示的NF集合),或者说,该第一验证请求消息用于请求验证第二网元的标识是否与第一NF集的标识对应,或者说,该第一验证请求消 息用于请求验证第二网元所属的NF集的标识是否与第一NF集的标识匹配。这里的第三网元可以是网络存储功能网元,例如在5G系统中,该第三网元可以是NRF。第三网元接收到第一验证请求消息之后,根据第二网元的标识获取与第二网元的标识相关联的NF消费者配置信息,通过该配置信息确定第二网元的标识所对应的NF集的标识(记为第二NF集的标识)。如果该配置信息中没有第二网元的标识所对应的NF集的标识,或者第二NF集的标识与第一NF集的标识不同,则第三网元确定第二网元不属于第一NF集,否则第三网元确定第二网元属于第一NF集;或者,第三网元根据第一NF集的标识确定第一NF集的标识所对应的NF消费者配置信息,根据该配置信息确定第一NF集所对应的所有NF的标识,当这些标识中包括第二NF的标识,则第三网元确定第二网元属于第一NF集,否则第三网元确定第二网元不属于第一NF集。进一步地,第三网元向第一网元发送指示信息,该指示信息用于指示第二网元是否属于第一NF集,或者,该指示信息用于指示第二网元的标识是否与第一NF集的标识对应,或者,该指示信息用于指示第二NF集的标识是否与第一NF集的标识匹配。对应的,第一网元接收来自第三网元的指示信息,根据该指示信息确定第二网元是否属于第一NF集。在第二网元不属于第一NF集的情况下,第一网元拒绝向第二网元提供第一服务;在第二网元属于第一NF集且访问令牌被验证通过的情况下,第一网元拒绝向第二网元提供第一服务。In another possible implementation manner, the first network element requests the third network element to verify whether the second network element belongs to the first NF set. Exemplarily, the first network element sends a first verification request message to the third network element, the first verification request message includes the identifier of the second network element and the identifier of the first NF set, and the first verification request message is used for Request to verify whether the second network element belongs to the first NF set (or the NF set indicated by the identifier of the first NF set), or in other words, the first verification request message is used to request to verify whether the identifier of the second network element is consistent with the first NF set The identity of an NF set corresponds, or in other words, the first verification request message is used to request to verify whether the identity of the NF set to which the second network element belongs matches the identity of the first NF set. The third network element here may be a network storage function network element, for example, in a 5G system, the third network element may be an NRF. After the third network element receives the first verification request message, it obtains the NF consumer configuration information associated with the second network element's identifier according to the second network element's identifier, and uses the configuration information to determine the corresponding The identity of the NF set (denoted as the identity of the second NF set). If there is no identity of the NF set corresponding to the identity of the second network element in the configuration information, or the identity of the second NF set is different from the identity of the first NF set, the third network element determines that the second network element does not belong to the first NF set. NF set, otherwise the third network element determines that the second network element belongs to the first NF set; or, the third network element determines the NF consumer configuration information corresponding to the identity of the first NF set according to the identity of the first NF set, and according to the The configuration information determines the identities of all NFs corresponding to the first NF set. When these identities include the identity of the second NF, the third network element determines that the second network element belongs to the first NF set; otherwise, the third network element determines that the second NF The network element does not belong to the first NF set. Further, the third network element sends indication information to the first network element, the indication information is used to indicate whether the second network element belongs to the first NF set, or the indication information is used to indicate whether the identifier of the second network element is consistent with the first NF set The identity of an NF set corresponds, or the indication information is used to indicate whether the identity of the second NF set matches the identity of the first NF set. Correspondingly, the first network element receives the indication information from the third network element, and determines whether the second network element belongs to the first NF set according to the indication information. When the second network element does not belong to the first NF set, the first network element refuses to provide the first service to the second network element; when the second network element belongs to the first NF set and the access token is verified and passed , the first network element refuses to provide the first service to the second network element.
又一种可能的实现方式中,第一网元通过第三网元获取第二网元所对应的NF集的标识,根据第二网元所对应的NF集的标识验证第二网元是否属于第一NF集。示例性地,第一网元向第三网元发送第二验证请求消息,该第二验证请求消息包括第二网元的标识,该第二验证请求消息用于请求获取第二网元的标识所对应的NF集的标识(记为第二NF集的标识)。对应地,第三网元接收第二验证请求消息之后,根据第二网元的标识获取与第二网元的标识相关联NF消费者配置信息,通过该配置信息确定第二NF集的标识。如果该配置信息中没有第二网元的标识所对应的NF集的标识,则第三网元向第一网元发送指示信息,该指示信息用于指示第二网元的NF集的标识获取失败,第一网元根据该指示信息确定第二网元没有被授权使用该访问令牌。如果该配置信息中存在第二NF集的标识,则第三网元向第一网元发送该第二NF集的标识。对应的,第一网元接收该第二NF集的标识,并判断该第二NF集的标识与第一NF集的标识是否匹配,在匹配的情况下,第一网元确定第二网元属于第一NF集,否则第一网元确定第二网元不属于第一NF集。在第二网元不属于第一NF集的情况下,第一网元拒绝向第二网元未提供第一服务;在第二网元属于第一NF集且访问令牌被验证通过的情况下,第一网元拒绝向第二网元提供第一服务。In yet another possible implementation, the first network element obtains the identifier of the NF set corresponding to the second network element through the third network element, and verifies whether the second network element belongs to the First NF set. Exemplarily, the first network element sends a second verification request message to the third network element, the second verification request message includes the identifier of the second network element, and the second verification request message is used to request to obtain the identifier of the second network element The identifier of the corresponding NF set (denoted as the identifier of the second NF set). Correspondingly, after receiving the second verification request message, the third network element obtains configuration information of the NF consumer associated with the identifier of the second network element according to the identifier of the second network element, and determines the identifier of the second NF set through the configuration information. If there is no identifier of the NF set corresponding to the identifier of the second network element in the configuration information, the third network element sends indication information to the first network element, where the indication information is used to instruct the second network element to acquire the identifier of the NF set If it fails, the first network element determines that the second network element is not authorized to use the access token according to the indication information. If there is an identifier of the second NF set in the configuration information, the third network element sends the identifier of the second NF set to the first network element. Correspondingly, the first network element receives the identifier of the second NF set, and judges whether the identifier of the second NF set matches the identifier of the first NF set, and if they match, the first network element determines that the second network element belongs to the first NF set, otherwise the first network element determines that the second network element does not belong to the first NF set. In the case that the second network element does not belong to the first NF set, the first network element refuses to provide the first service to the second network element; in the case that the second network element belongs to the first NF set and the access token is verified In this case, the first network element refuses to provide the first service to the second network element.
又一种可能的实现方式中,第一网元通过第三网元获取第一NF集中所有NF的标识,根据第一NF集中的NF的标识验证第二网元是否属于第一NF集。示例性地,第一网元向第三网元发送第三验证请求消息,该第三验证请求消息包括第一NF集的标识,该第三验证请求消息用于请求获取第一NF集内所有NF的标识。对应地,第三网元接收第三验证请求消息后,根据第一NF集的小时获取第一NF集的NF消费者配置信息,通过该配置信息获取第一NF集内所有NF的标识,然后第三网元将这些NF的标识发送给第一网元,第一网元根据第一NF集内所有NF的标识确定第二网元是否属于第一NF集。如果第一NF集内的NF的标识包括第二NF的标识,则第一网元确定第二网元属于第一NF集, 否则第一网元确定第二网元不属于第一NF集。在第二网元不属于第一NF集的情况下,第一网元拒绝向第二网元提供第一服务;在第二网元属于第一NF集且访问令牌被验证通过的情况下,第一网元授权第二网元使用第一服务。In yet another possible implementation manner, the first network element obtains the identifiers of all NFs in the first NF set through the third network element, and verifies whether the second network element belongs to the first NF set according to the NF identifiers in the first NF set. Exemplarily, the first network element sends a third verification request message to the third network element, the third verification request message includes the identifier of the first NF set, and the third verification request message is used to request to obtain all NF identification. Correspondingly, after receiving the third verification request message, the third network element obtains the NF consumer configuration information of the first NF set according to the hours of the first NF set, obtains the identifiers of all NFs in the first NF set through the configuration information, and then The third network element sends the identifiers of these NFs to the first network element, and the first network element determines whether the second network element belongs to the first NF set according to the identifiers of all NFs in the first NF set. If the identifier of the NF in the first NF set includes the identifier of the second NF, the first network element determines that the second network element belongs to the first NF set; otherwise, the first network element determines that the second network element does not belong to the first NF set. When the second network element does not belong to the first NF set, the first network element refuses to provide the first service to the second network element; when the second network element belongs to the first NF set and the access token is verified and passed , the first network element authorizes the second network element to use the first service.
需要说明的是,在第二网元属于第一NF集的情况下,还需要对访问令牌中的其他验证条件(例如是访问令牌内携带的其他参数)进行进一步验证,在验证通过的情况下,第一网元才授权第二网元使用第一服务。示例性地,访问令牌中的其他验证条件包括以下一项或多项:服务提供者的NF实例标识、服务提供者的NF类型、服务提供者的单网络切片选择辅助信息、服务提供者的网络切片实例标识、服务提供者所属的NF集的标识、期望的服务名称、所述访问令牌的有效时间。例如:第一网元验证访问令牌中的NF实例标识或NF type与自己的标识或type是否匹配;如果访问令牌中包括单网络切片选择辅助信息(single network slice selection assistance information,S-NSSAIs)或网络切片实例标识(network slice instances IDs,NSI IDs),则第一网元验证是否能够服务对应的切片;如果访问令牌中包括服务提供者的NF集标识,则第一网元验证该NF集标识是否与自己的NF集标识匹配,或者说第一网元验证自己是否属于该NF集标识所指示的NF集;如果访问令牌中包括期望的服务名称,则第一网元验证是否匹配请求的服务操作;如果访问令牌中包括附加范围信息,则第一网元验证包含的附加范围与请求的操作是否匹配;其他地,第一网元验证该访问令牌是否在有效时间,例如,第一网元将访问令牌中的到期时间与当前的时间进行比较以验证访问令牌是否过期。示例性的,在验证通过的情况下,第一网元授权第二网元使用第一服务的表现形式包括:在所有参数验证通过时,第一网元向第二网元提供请求的第一服务(或者说第一网元执行第一服务),并发送指示提供第一服务的响应消息。It should be noted that, in the case that the second network element belongs to the first NF set, other verification conditions in the access token (for example, other parameters carried in the access token) need to be further verified. In this case, the first network element authorizes the second network element to use the first service. Exemplarily, other verification conditions in the access token include one or more of the following: the service provider's NF instance identifier, the service provider's NF type, the service provider's single network slice selection auxiliary information, the service provider's The identifier of the network slice instance, the identifier of the NF set to which the service provider belongs, the desired service name, and the valid time of the access token. For example: the first network element verifies whether the NF instance identifier or NF type in the access token matches its own identifier or type; if the access token includes single network slice selection assistance information (single network slice selection assistance information, S-NSSAIs ) or network slice instances IDs (network slice instances IDs, NSI IDs), the first network element verifies whether the corresponding slice can be served; if the access token includes the NF set identifier of the service provider, the first network element verifies the Whether the NF set ID matches its own NF set ID, or the first network element verifies whether it belongs to the NF set indicated by the NF set ID; if the access token includes the expected service name, then the first network element verifies whether matching the requested service operation; if the access token includes additional scope information, the first network element verifies whether the included additional scope matches the requested operation; otherwise, the first network element verifies whether the access token is within the valid time, For example, the first network element compares the expiration time in the access token with the current time to verify whether the access token is expired. Exemplarily, in the case that the verification is passed, the expression form of the first network element authorizing the second network element to use the first service includes: when all parameters pass the verification, the first network element provides the requested first service to the second network element. service (or the first network element executes the first service), and sends a response message indicating to provide the first service.
本申请对第一网元验证第一NF集的标识以及验证其他验证条件的顺序不做限定。优选的,可以先验证第一NF集的标识,再验证其他验证条件,这样当第一NF集的标识验证不通过的情况下,可以不用再验证其他验证条件,从而节省资源。This application does not limit the order in which the first network element verifies the identity of the first NF set and verifies other verification conditions. Preferably, the identity of the first NF set can be verified first, and then other verification conditions can be verified. In this way, when the verification of the identity of the first NF set fails, other verification conditions need not be verified, thereby saving resources.
可选地,当第一网元确定第二网元属于第一NF集,则第一网元保存第二网元的标识和第一NF集的标识的关联关系,以便第二网元再次利用该访问令牌请求服务时,第一网元可以直接利用本地保存的该关联关系确定第二网元被授权使用该第一NF集的标识所对应的访问令牌。Optionally, when the first network element determines that the second network element belongs to the first NF set, the first network element saves the association between the identity of the second network element and the identity of the first NF set, so that the second network element can reuse When the access token requests a service, the first network element may directly use the locally stored association relationship to determine that the second network element is authorized to use the access token corresponding to the identifier of the first NF set.
因此,本申请实施例提供的授权验证的方法,在第二网元向第一网元请求服务的过程中,通过验证第二网元是否属于请求消息中携带的访问令牌所对应的NF集,来确定NF服务消费者是否被授权使用请求消息中所携带的访问令牌,从而防止了恶意的NF服务消费者越权使用访问令牌获取服务。Therefore, in the authorization verification method provided by the embodiment of the present application, in the process of the second network element requesting a service from the first network element, by verifying whether the second network element belongs to the NF set corresponding to the access token carried in the request message , to determine whether the NF service consumer is authorized to use the access token carried in the request message, thereby preventing malicious NF service consumers from using the access token to obtain services beyond their authority.
图10示出了本申请实施例提供的方法500的示例性流程图。方法500包括:FIG. 10 shows an exemplary flow chart of a method 500 provided by an embodiment of the present application. Method 500 includes:
S501,NRF保存NFc配置信息。S501. The NRF saves the NFc configuration information.
示例性地,向NRF配置NFc配置信息,这里的NFc指的是NF集(NF set)A中的NF服务消费者,该NF set A中包括多个NF服务消费者,例如,NFc1,NFc2,……,NFcx,x为大于或等于2的整数。该NFc的配置信息包括NFc实例标识以及NF集A的标识(记为NF set A ID,或NF集A ID)。Exemplarily, configure NFc configuration information to NRF, where NFc refers to NF service consumers in NF set (NF set) A, including a plurality of NF service consumers in this NF set A, for example, NFc1, NFc2, ..., NFcx, x is an integer greater than or equal to 2. The configuration information of the NFc includes the NFc instance identifier and the identifier of the NF set A (denoted as NF set A ID, or NF set A ID).
S502,NFc1向NRF发送访问令牌获取请求消息。S502. NFc1 sends an access token acquisition request message to NRF.
示例性地,当NFc1确定要为NF set A中的NF服务消费者获取访问令牌(access token)时,向NRF发送访问令牌获取请求(Nnrf_accesstoken_Get Request)消息。例如,在NFc1希望请求服务,且本地没有可用的Access Token的情况下,NFc1向NRF发送访问令牌获取请求,以请求获取访问令牌。其中,NFc1是NF set A中的任意一个NF服务请求者。这里的访问令牌用于NF服务消费者向NF服务提供者请求服务,NF服务提供者可以根据该访问令牌对NF服务消费者进行授权检查。Exemplarily, when NFc1 determines to obtain an access token (access token) for the NF service consumer in NF set A, it sends an access token acquisition request (Nnrf_accesstoken_Get Request) message to NRF. For example, when NFc1 wants to request a service and there is no Access Token available locally, NFc1 sends an access token acquisition request to NRF to request for an access token. Among them, NFc1 is any NF service requester in NF set A. The access token here is used for the NF service consumer to request services from the NF service provider, and the NF service provider can perform an authorization check on the NF service consumer according to the access token.
在一种可能的实现方式中,NFc1可以请求接入NF type的NF服务提供者的服务的Access Token。即,NFc1向NRF发送访问令牌获取请求,该访问令牌获取请求消息用于向NRF请求一个NF type类型的access token。该访问令牌请求消息中包括NFc1的NF实例Id,NF set A ID,期望的服务名称,NFc1的NF type和NF服务提供者的NF type。可选地,该访问令牌获取请求消息中还可以包括附加范围(即请求的资源和请求的针对资源的操作)、期望的NF服务提供者实例的S-NSSAI列表或NSI ID列表、期望的NF服务提供者实例的NF Set ID、NF服务消费者的S-NSSAI列表等。In a possible implementation, NFc1 may request the Access Token for accessing the service of the NF service provider of NF type. That is, NFc1 sends an access token acquisition request to NRF, and the access token acquisition request message is used to request an NF type access token from NRF. The access token request message includes NF instance Id of NFc1, NF set A ID, desired service name, NF type of NFc1 and NF type of NF service provider. Optionally, the access token acquisition request message may also include an additional scope (that is, the requested resource and the requested operation on the resource), the S-NSSAI list or NSI ID list of the desired NF service provider instance, the desired NF Set ID of NF service provider instance, S-NSSAI list of NF service consumer, etc.
在另一种可能的实现方式中,NFc1可以请求接入特定NF服务提供者实例或NF服务提供者服务实例的服务的access token。此时,该访问令牌获取请求消息中包括NFc1的NF实例Id,NF set A ID,期望的服务名称。可选地,该访问令牌获取请求消息中还可以包括附加范围(即请求的资源和请求的针对资源的操作)等。In another possible implementation manner, NFc1 may request an access token for accessing a specific NF service provider instance or a service of an NF service provider service instance. At this time, the access token acquisition request message includes the NF instance Id of NFc1, NF set A ID, and the expected service name. Optionally, the access token acquisition request message may also include an additional scope (that is, the requested resource and the requested operation on the resource) and the like.
在一种可能的实现方式中,上述实现方式中的访问令牌请求消息中的NF Set A ID可以替换为指示信息,该指示信息用于指示为NFc所属的NF set集合请求访问令牌。In a possible implementation manner, the NF Set A ID in the access token request message in the above implementation manner may be replaced with indication information, and the indication information is used to indicate that an access token is requested for the NF set set to which the NFc belongs.
S503,NRF验证NFc1是否被授权。S503. The NRF verifies whether the NFc1 is authorized.
示例性地,NRF验证访问令牌获取请求中的参数(如NF type)是否与NF服务消费者的公钥证书或NFc配置信息中的参数匹配。若访问令牌获取请求消息中包括NF set A ID,则NRF验证NF set A ID是否与NFc1的公钥证书或NFc配置信息中的NF set ID相匹配,即验证NFc1是否被授权请求NF set A ID的access token。进一步地,NRF检查NFc1是否被授权接入请求的服务。Exemplarily, the NRF verifies whether the parameters (such as NF type) in the access token acquisition request match the parameters in the NF service consumer's public key certificate or NFc configuration information. If the access token acquisition request message includes NF set A ID, NRF verifies whether NF set A ID matches NFc1’s public key certificate or NF set ID in NFc configuration information, that is, verifies whether NFc1 is authorized to request NF set A The access token of the ID. Further, NRF checks whether NFc1 is authorized to access the requested service.
S504,当NFc1授权验证通过,则NRF生成访问令牌。S504, when the NFc1 authorization verification passes, the NRF generates an access token.
示例性地,当访问令牌获取请求中的参数(包括NF set A ID)与NFc1的公钥证书或NFc配置信息中的NF set ID相匹配,且NFc1有权请求NF set A ID的access token,则NRF生成访问令牌,该访问令牌包括claims。Exemplarily, when the parameters in the access token acquisition request (including NF set A ID) match the NF set ID in the public key certificate of NFc1 or NFc configuration information, and NFc1 has the right to request the access token of NF set A ID , the NRF generates an access token that includes claims.
在NFc1请求接入NF type的NF服务提供者的服务的access token的情况下,该claims包括NRF的NF实例Id,NFc1的NF实例Id,NF set A ID,NF服务提供者的NF type,期望的服务名称,到期时间。可选的,该claims还可以包括附加范围(允许请求的资源和请求的针对资源的操作),期望的NF服务提供者实例的S-NSSAI列表或NSI ID列表、期望的NF服务提供者实例的NF Set B ID等。When NFc1 requests to access the access token of the service of the NF service provider of NF type, the claims include the NF instance Id of NRF, the NF instance Id of NFc1, the NF set A ID, the NF type of the NF service provider, and the expected The service name, expiration time. Optionally, the claims may also include additional scopes (allowing the requested resource and the requested operation on the resource), the S-NSSAI list or NSI ID list of the desired NF service provider instance, the desired NF service provider instance NF Set B ID etc.
在NFc1请求接入特定NF服务提供者实例或NF服务提供者服务实例的服务的access token的情况下,该claims包括NRF的NF实例Id,NFc1的NF实例#1,NF set A ID,NF服务提供者的NF实例ID#3,期望的服务名称,到期时间。可选的,该claims还可以包括附加范围(允许请求的资源和请求的针对资源的操作)等。In the case where NFc1 requests an access token to access a specific NF service provider instance or a service of a NF service provider service instance, the claims include NF instance Id of NRF, NF instance #1 of NFc1, NF set A ID, NF service Provider's NF instance ID#3, desired service name, expiration time. Optionally, the claims may also include an additional scope (allowing the requested resource and the requested operation on the resource) and the like.
NRF使用共享的密钥对access token生成MAC值,或者NRF利用私钥对生成的claims 进行签名。NRF uses the shared secret key to generate the MAC value of the access token, or NRF uses the private key to sign the generated claims.
在另一种可能的实现方式中,上述访问令牌中的claims可以不包含NFc1的NF实例ID。In another possible implementation manner, the claims in the above access token may not contain the NF instance ID of NFc1.
若令牌请求消息中包含的为指示信息,则NRF根据证书信息或者配置信息确定NFc1所属的NF集,并在访问令牌中包含该NF集对应的NF集标识。If the token request message contains indication information, the NRF determines the NF set to which NFc1 belongs according to the certificate information or configuration information, and includes the NF set identifier corresponding to the NF set in the access token.
S505,NRF向NFc1发送访问令牌获取响应消息。S505. The NRF sends an access token acquisition response message to the NFc1.
示例性地,NRF生成访问令牌之后,向NFc1发送访问令牌获取响应(Nnrf_accesstoken_Get Response)消息,该访问令牌获取响应消息中包括该访问令牌。可选地,该访问令牌获取响应消息中还包括访问令牌的过期时间。Exemplarily, after the NRF generates the access token, it sends an access token acquisition response (Nnrf_accesstoken_Get Response) message to the NFc1, and the access token acquisition response message includes the access token. Optionally, the access token acquisition response message also includes an expiration time of the access token.
通过上述技术方案,在直接通信场景下通过验证请求访问令牌的NF服务消费者是否被授权,可以避免恶意的NF服务消费者越权请求访问令牌。Through the above technical solution, by verifying whether the NF service consumer requesting the access token is authorized in the direct communication scenario, malicious NF service consumers can be prevented from requesting the access token beyond their authority.
图11示出了本申请实施例提供的方法600的示例性流程图。在方法600中,服务消费者不直接与NRF网元进行通信,由SCP网元代理服务消费者与NRF网元进行通信。方法600包括:FIG. 11 shows an exemplary flow chart of a method 600 provided by an embodiment of the present application. In method 600, the service consumer does not directly communicate with the NRF network element, and the SCP network element communicates with the NRF network element on behalf of the service consumer. Method 600 includes:
S601,NRF保存NFc配置信息。S601. The NRF saves the NFc configuration information.
应理解,S601与方法500中的S501类似,这里不再赘述。It should be understood that S601 is similar to S501 in method 500, and will not be repeated here.
S602,NFc1向SCP发送访问令牌请求消息。S602. The NFc1 sends an access token request message to the SCP.
示例性地,当NFc1确定要为NF set A中的NF服务消费者获取访问令牌(access token)时,向NRF发送访问令牌获取请求(Nnrf_accesstoken_Get Request)消息。Exemplarily, when NFc1 determines to obtain an access token (access token) for the NF service consumer in NF set A, it sends an access token acquisition request (Nnrf_accesstoken_Get Request) message to NRF.
在一种可能的实现方式中,NFc1可以请求接入NF type的NF服务提供者的服务的Access Token。此时,该访问令牌请求消息中包括NFc1的NF实例Id,NF set A ID,期望的服务名称,NFc1的NF type和NF服务提供者的NF type。该访问令牌请求消息中还包括客户凭据声明(CCA,该CCA包括NFc1的NF实例ID、时间戳和到期时间、NF type。可选地,该访问令牌获取请求消息中还可以包括附加范围(即请求的资源和请求的针对资源的操作)、期望的NF服务提供者实例的S-NSSAI列表或NSI ID列表、期望的NF服务提供者实例的NF Set ID、NF服务消费者的S-NSSAI列表等。In a possible implementation, NFc1 may request the Access Token for accessing the service of the NF service provider of NF type. At this time, the access token request message includes NF instance Id of NFc1, NF set A ID, desired service name, NF type of NFc1 and NF type of NF service provider. The access token request message also includes a client credential statement (CCA, the CCA includes the NF instance ID, timestamp and expiration time, and NF type of NFc1. Optionally, the access token acquisition request message may also include an additional Scope (i.e. the requested resource and the requested operation on the resource), the S-NSSAI list or NSI ID list of the desired NF service provider instance, the NF Set ID of the desired NF service provider instance, the S of the NF service consumer -NSSAI list etc.
在另一种可能的实现方式中,NFc1可以请求接入特定NF服务提供者实例或NF服务提供者服务实例的服务的access token。此时,该访问令牌获取请求消息中包括NFc1的NF实例Id,NF set A ID,期望的服务名称。该访问令牌请求消息中还包括CCA,该CCA包括NFc1的NF实例ID、时间戳和到期时间、NF type。可选地,该访问令牌获取请求消息中还可以包括附加范围(即请求的资源和请求的针对资源的操作)等。In another possible implementation manner, NFc1 may request an access token for accessing a specific NF service provider instance or a service of an NF service provider service instance. At this time, the access token acquisition request message includes the NF instance Id of NFc1, NF set A ID, and the expected service name. The access token request message also includes CCA, and the CCA includes the NF instance ID of NFc1, timestamp and expiration time, and NF type. Optionally, the access token acquisition request message may also include an additional scope (that is, the requested resource and the requested operation on the resource) and the like.
在一种可能的实现方式中,上述实现方式中访问令牌请求消息中的NF Set A ID可以替换为指示信息,该指示信息用于指示为NFc所属的NF set集合请求访问令牌。In a possible implementation manner, the NF Set A ID in the access token request message in the above implementation manner may be replaced with indication information, and the indication information is used to indicate that an access token is requested for the NF set set to which the NFc belongs.
S603,SCP向NRF发送访问令牌获取请求消息。S603. The SCP sends an access token acquisition request message to the NRF.
应理解,该访问令牌获取请求消息与S702中的请求消息相同,或者说,该访问令牌请求消息中包括S702中的请求消息所携带的参数。It should be understood that the access token acquisition request message is the same as the request message in S702, or in other words, the access token request message includes the parameters carried in the request message in S702.
S604,NRF验证NFc1是否被授权。S604. The NRF verifies whether the NFc1 is authorized.
示例性地,若访问令牌获取请求消息中包括CCA,NRF根据CCA验证NFc1。若CCA验证通过,NRF验证访问令牌获取请求中的参数(如NF type)是否与NF服务消费者的 公钥证书或NFc配置信息中的参数匹配。若访问令牌获取请求消息中包括NF set A ID,则NRF验证NF set A ID是否与NFc1的公钥证书或NFc配置信息中的NF set ID相匹配,即验证NFc1是否被授权请求NF set A ID的access token。进一步地,NRF检查NFc1是否被授权接入请求的服务。Exemplarily, if the access token acquisition request message includes the CCA, the NRF verifies the NFc1 according to the CCA. If the CCA verification is passed, the NRF verifies whether the parameters in the access token acquisition request (such as NF type) match the parameters in the NF service consumer's public key certificate or NFc configuration information. If the access token acquisition request message includes NF set A ID, NRF verifies whether NF set A ID matches NFc1’s public key certificate or NF set ID in NFc configuration information, that is, verifies whether NFc1 is authorized to request NF set A The access token of the ID. Further, NRF checks whether NFc1 is authorized to access the requested service.
若令牌请求消息中包括的为指示信息,则NRF根据证书信息或者配置信息确定NFc1所属的NF集,并在访问令牌中包含NF集对应的NF集标识。If the token request message includes indication information, the NRF determines the NF set to which the NFc1 belongs according to the certificate information or configuration information, and includes the NF set identifier corresponding to the NF set in the access token.
S605,当NFc1授权验证成功,NRF生成访问令牌。S605. When the NFc1 authorization verification succeeds, the NRF generates an access token.
应理解,S605与方法500中的S504类似,为了简洁,不再重复说明。It should be understood that S605 is similar to S504 in the method 500, and for the sake of brevity, repeated description is omitted.
S606,NRF向SCP发送访问令牌获取响应消息。S606. The NRF sends an access token acquisition response message to the SCP.
示例性地,NRF生成访问令牌之后,向SCP发送访问令牌获取响应(Nnrf_accesstoken_Get Response)消息,该访问令牌获取响应消息中包括NRF在S705生成的访问令牌。可选地,该访问令牌获取响应消息中还包括访问令牌的过期时间。Exemplarily, after the NRF generates the access token, it sends an access token obtaining response (Nnrf_accesstoken_Get Response) message to the SCP, and the access token obtaining response message includes the access token generated by the NRF at S705. Optionally, the access token acquisition response message also includes an expiration time of the access token.
S607,SCP向NFc1发送该访问令牌获取响应消息。S607, the SCP sends the access token acquisition response message to the NFc1.
通过上述技术方案,在间接通信场景下通过验证请求访问令牌的NF服务消费者是否被授权,可以避免恶意的NF服务消费者越权请求访问令牌。Through the above technical solution, by verifying whether the NF service consumer requesting the access token is authorized in the indirect communication scenario, malicious NF service consumers can be prevented from requesting the access token beyond their authority.
图12示出了本申请实施例提供的方法700的示例性流程图。方法700可以与方法500结合实施,例如,方法700在方法500之后实施。方法700也可以独立实施,本申请不做限定。方法700包括:Fig. 12 shows an exemplary flow chart of a method 700 provided by an embodiment of the present application. Method 700 may be implemented in conjunction with method 500 , for example, method 700 may be implemented after method 500 . The method 700 can also be implemented independently, which is not limited in this application. Method 700 includes:
S701,NFc2向NFp发送NF服务请求消息。对应地,NFp接收来自NFc2的该NF服务请求。S701, NFc2 sends an NF service request message to NFp. Correspondingly, NFp receives the NF service request from NFc2.
示例性地,当NFc2需要获取访问令牌access token授权的服务提供者NFp的服务时,NFc2向NFp发送NF服务请求消息,该服务请求消息包括该访问令牌access token。其中,该access token用于NF set A中的任意一个NF服务消费者请求服务,该access token与该NF set A的标识相关联(NF set A ID相关联),因此,在该access token未过期的任意时间,NF set A中的任意NF服务消费者都可以使用该access token请求该access token授权的NFp的服务。Exemplarily, when NFc2 needs to obtain the service of the service provider NFp authorized by the access token access token, NFc2 sends the NF service request message to NFp, and the service request message includes the access token access token. Among them, the access token is used for any NF service consumer in NF set A to request services, and the access token is associated with the identity of the NF set A (associated with the NF set A ID). Therefore, the access token has not expired At any time, any NF service consumer in NF set A can use the access token to request the NFp service authorized by the access token.
该access token中包括claims。The access token includes claims.
在NFc2请求接入NF type的NF服务提供者的服务的access token的情况下,该claims包括NRF的NF实例ID,NFc1的NF实例ID#1,NF set A ID,NF服务提供者的NF type B,期望的服务名称,到期时间,应理解,NFc1为请求该access token的NF服务消费者,或者说该access token是由NFc1从NRF请求获取的。可选的,该claims还可以包括附加范围(允许请求的资源和请求的针对资源的操作),期望的NF服务提供者实例的S-NSSAI列表或NSI ID列表、期望的NF服务提供者实例的NF Set B ID等。In the case where NFc2 requests to access the access token of the service of the NF service provider of NF type, the claims include the NF instance ID of NRF, the NF instance ID#1 of NFc1, NF set A ID, and the NF type of the NF service provider B. Expected service name and expiration time. It should be understood that NFc1 is the NF service consumer requesting the access token, or that the access token is obtained by NFc1 from the NRF request. Optionally, the claims may also include additional scopes (allowing the requested resource and the requested operation on the resource), the S-NSSAI list or NSI ID list of the desired NF service provider instance, the desired NF service provider instance NF Set B ID etc.
在NFc2请求接入特定NF服务提供者实例或NF服务提供者服务实例的服务的access token的情况下,该claims包括NRF的NF实例ID,NFc1的NF实例ID#1,NF set A ID,NF服务提供者的NF实例ID#3,期望的服务名称,到期时间。可选的,该claims还可以包括附加范围(允许请求的资源和请求的针对资源的操作)等。In the case of NFc2 requesting access to a specific NF service provider instance or an access token for a service of a NF service provider service instance, the claims include NF instance ID of NRF, NF instance ID#1 of NFc1, NF set A ID, NF NF instance ID#3 of the service provider, desired service name, and expiration time. Optionally, the claims may also include an additional scope (allowing the requested resource and the requested operation on the resource) and the like.
应理解,该access token经过了完整性保护。例如,NRF在生成该access token之后,使用共享的密钥对该access token生成MAC值,或者NRF利用私钥对生成的claims进行 签名。It should be understood that the access token is integrity protected. For example, after NRF generates the access token, it uses the shared key to generate the MAC value of the access token, or NRF uses the private key to sign the generated claims.
需要说明的是,在方法700在方法500之后实施的情况下,方法700中的NRF与方法500中的NRF可以相同也可以不同,即生成和分发访问令牌的NRF与方法700中进行验证的NRF可以是不同的网元,本申请对此不做限定。It should be noted that, in the case where method 700 is implemented after method 500, the NRF in method 700 and the NRF in method 500 may be the same or different, that is, the NRF for generating and distributing access tokens is the same as the NRF for verification in method 700 The NRF may be different network elements, which is not limited in this application.
S702,NFp验证访问令牌的完整性。S702. The NFp verifies the integrity of the access token.
示例性地,NFp接收到NF服务请求消息时,若消息中包含access token,则对access token执行完整性验证。例如,NFp根据access token中的NRF实例ID获取验证完整性的公钥或共享密钥(即NRF与NF服务提供者之间共享的密钥),若并使用公钥验证签名或使用共享密钥验证MAC值。Exemplarily, when the NFp receives the NF service request message, if the message contains the access token, it performs integrity verification on the access token. For example, NFp obtains the public key or shared key for verifying integrity (that is, the shared key between NRF and NF service provider) according to the NRF instance ID in the access token, and uses the public key to verify the signature or use the shared key Verify the MAC value.
若完整性校验成功,则进一步可选地,在S703,NFp确定安全令牌access token中的NF实例ID#1与NFc2的NF实例ID#2是否相同。If the integrity check is successful, further optionally, at S703, the NFp determines whether the NF instance ID #1 in the security token access token is the same as the NF instance ID #2 of the NFc2.
示例性地,NFp从access token中获取NFc1的NF实例ID#1,从NF消费者证书(NFc证书)中获取NFc2的NF实例ID#2,然后判断NF实例ID#1与NF实例ID#2是否相同。或者,NFp从access token中获取NFc1的NF实例ID#1,从NF服务请求消息中获取NFc2的NF实例ID#2,然后判断NF实例ID#1与NF实例ID#2是否相同。Exemplarily, NFp obtains the NF instance ID #1 of NFc1 from the access token, obtains the NF instance ID #2 of NFc2 from the NF consumer certificate (NFc certificate), and then judges the NF instance ID #1 and the NF instance ID #2 Is it the same. Or, NFp obtains the NF instance ID #1 of NFc1 from the access token, obtains the NF instance ID #2 of NFc2 from the NF service request message, and then judges whether the NF instance ID #1 is the same as the NF instance ID #2.
在一种可能的情况中,NF实例ID#1与NF实例ID#2不相同,则表示NFc2与NFc1不相同,或者说,该access token不是NFc2请求获取的。此时NFp进一步确定该access token中是否包括NF服务请求者的NF集的标识。如果该access token中包括NF服务请求者的NF集的标识(例如本申请实施例中的NF set A ID),则NFp进一步验证NFc2是否有权使用该NF set A ID所对应的该access token。In a possible situation, if the NF instance ID#1 is different from the NF instance ID#2, it means that NFc2 is not the same as NFc1, or that the access token is not requested by NFc2. At this time, NFp further determines whether the access token includes the identification of the NF set of the NF service requester. If the access token includes the identity of the NF set of the NF service requester (such as the NF set A ID in the embodiment of the present application), then NFp further verifies whether NFc2 has the right to use the access token corresponding to the NF set A ID.
如果access token不包括NF实例ID#1,则可以不执行703,直接进行后续的验证流程。If the access token does not include the NF instance ID#1, step 703 may not be executed, and the subsequent verification process may be directly performed.
一种可能的实现方式(记为方案1)中,NFp根据本地配置信息确定NFc2是否属于NF set A,或者说NFp根据本地配置信息确定NFc2是否有权使用该NF set A ID所对应的该access token,示例性地:In a possible implementation (denoted as scheme 1), NFp determines whether NFc2 belongs to NF set A according to the local configuration information, or NFp determines whether NFc2 has the right to use the access corresponding to the NF set A ID according to the local configuration information token, exemplary:
如果NFp本地保存了NF消费者配置信息,则在S704,NFp根据本地配置信息确定NFc2是否属于NF set A。应理解,该NF消费者配置信息中包括NF消费者与NF集的标识之间的关联关系。如果NFc2属于NF set A,则NFp确定NFc2有权使用该NF set A ID所对应的该access token。If the NFp locally saves the NF consumer configuration information, then at S704, the NFp determines whether the NFc2 belongs to the NF set A according to the local configuration information. It should be understood that the NF consumer configuration information includes the association relationship between the NF consumer and the identifier of the NF set. If NFc2 belongs to NF set A, then NFp determines that NFc2 has the right to use the access token corresponding to the NF set A ID.
另一种可能的实现方式(记为方案2)中,NFp请求NRF验证NFc2是否属于NF set A,或者说,NFp请求NRF验证NFc2是否有权使用该NF set A ID所对应的该access token。示例性地:In another possible implementation (denoted as scheme 2), NFp requests NRF to verify whether NFc2 belongs to NF set A, or in other words, NFp requests NRF to verify whether NFc2 has the right to use the access token corresponding to the NF set A ID. Exemplarily:
S705,NFp向NRF发送验证服务消费者请求消息,该请求消息中包括NFc2的NF实例ID#2以及NF set A ID,该验证服务消费者请求消息用于请求验证NFc2是否有权限使用NF set A ID所对应的access token,或者说该验证服务消费者请求消息用于请求验证NFc2是否与NF set A ID对应,或者说该验证服务消费者请求消息用于请求验证NFc2所属NF集的标识是否与NF set A ID相同。S705, NFp sends a verification service consumer request message to NRF, the request message includes NF instance ID#2 and NF set A ID of NFc2, and the verification service consumer request message is used to request verification of whether NFc2 has permission to use NF set A The access token corresponding to the ID, or the verification service consumer request message is used to request verification whether NFc2 corresponds to the NF set A ID, or the verification service consumer request message is used to request verification whether the identity of the NF set to which NFc2 belongs is the same as NF set A ID same.
S706,NRF根据NFc2的NF实例ID#2获取对应的NFc配置信息,验证该配置信息中是否包括NF集的标识,如果包括,则验证该配置信息中的NF集的标识(记为NF集C  ID,或NF set C ID)是否与NF set A ID相同,如果相同,则NRF确定NFc2有权使用该NF set A ID所对应的该access token。S706, NRF obtains the corresponding NFc configuration information according to the NF instance ID#2 of NFc2, and verifies whether the configuration information includes the identification of the NF set, and if so, verifies the identification of the NF set in the configuration information (denoted as NF set C ID, or NF set C ID) is the same as NF set A ID, if they are the same, NRF determines that NFc2 has the right to use the access token corresponding to the NF set A ID.
S707,NRF向NFp发送验证服务消费者响应消息,该消息中包括验证结果,例如,该消息中包括指示信息,该指示信息用于指示NFc2有权使用该NF set A ID所对应的该access token,或者该指示信息用于指示NFc2属于NF set A。S707, NRF sends a verification service consumer response message to NFp, the message includes a verification result, for example, the message includes indication information, and the indication information is used to indicate that NFc2 has the right to use the access token corresponding to the NF set A ID , or the indication information is used to indicate that NFc2 belongs to NF set A.
又一种可能的实现方式(记为方案3)中,NFp通过NRF获取NF实例ID#2所对应的NF集的标识(记为NF set C ID)或NF set A中所有NF的ID(记为NF A ID),根据NF set C ID或NF A ID验证NFc2是否有权使用该NF set A ID所对应的该access token。示例性地:In yet another possible implementation (denoted as scheme 3), NFp obtains the identification of the NF set corresponding to NF instance ID#2 (denoted as NF set C ID) or the IDs of all NFs in NF set A (denoted as NF A ID), verify whether NFc2 has the right to use the access token corresponding to the NF set A ID according to the NF set C ID or NF A ID. Exemplarily:
S708,NFp向NRF发送NF服务消费者验证请求消息,该NF服务消费者验证请求消息中包括NFc2的NF实例ID#2,该NF服务消费者验证请求消息用于请求获取该NF实例ID#2所对应的NF集的标识;或者,该NF服务消费者验证请求消息中包括NF set A ID,该NF服务消费者验证请求消息用于请求获取NF set A ID所对应的所有NF A ID。S708, NFp sends an NF service consumer verification request message to NRF, the NF service consumer verification request message includes NF instance ID#2 of NFc2, and the NF service consumer verification request message is used to request to acquire the NF instance ID#2 The identification of the corresponding NF set; or, the NF service consumer verification request message includes the NF set A ID, and the NF service consumer verification request message is used to request to obtain all NF A IDs corresponding to the NF set A ID.
S709,NRF根据NF实例ID#2获取NF set C ID,或者NRF根据NF set A ID获取所有NF A ID。S709. The NRF obtains the NF set C ID according to the NF instance ID#2, or the NRF obtains all the NF A IDs according to the NF set A ID.
示例性地,NRF接收到NF服务消费者验证请求消息之后,根据NFc2的NF实例ID#2获取对应的NFc配置信息,根据该配置信息确定NF set C ID,该NF set C ID为NF实例ID#2所对应的NF集的标识;或者,NRF接收到NF服务消费者验证请求消息之后,根据NF set A ID获取对应的NFc配置信息,根据该配置信息确定所有NF A ID。Exemplarily, after the NRF receives the NF service consumer verification request message, it obtains the corresponding NFc configuration information according to the NF instance ID#2 of NFc2, and determines the NF set C ID according to the configuration information, and the NF set C ID is the NF instance ID The identification of the NF set corresponding to #2; or, after receiving the NF service consumer verification request message, the NRF obtains the corresponding NFc configuration information according to the NF set A ID, and determines all the NF A IDs according to the configuration information.
S710,NRF向NFp发送NF服务消费者验证响应消息,该响应消息中包括NF set C ID或者所有NF A ID。S710. The NRF sends an NF service consumer verification response message to the NFp, where the response message includes the NF set C ID or all NF A IDs.
S711,NFp根据NF服务消费者验证响应消息验证NFc2是否属于NF set A。S711. NFp verifies whether NFc2 belongs to NF set A according to the NF service consumer verification response message.
示例性地,如果NF服务消费者验证响应消息中包括NF set C ID,则NFp验证NF set C ID与NF set A ID是否匹配,如果匹配的话,则NFp确定NFc2属于NF set A,因此NFc2有权使用该NF set A ID所对应的该access token。Exemplarily, if the NF service consumer verification response message includes NF set C ID, then NFp verifies whether the NF set C ID matches the NF set A ID, and if they match, NFp determines that NFc2 belongs to NF set A, so NFc2 has The right to use the access token corresponding to the NF set A ID.
如果NF服务消费者验证响应消息中包括多个NF A ID,则NFp验证NFc2的NF实例ID#2是否属于该多个NF A ID,如果属于的话,则NFp确定NFc2属于NF set A,因此NFc2有权使用该NF set A ID所对应的该access token。If the NF service consumer verification response message includes multiple NF A IDs, NFp verifies whether the NF instance ID#2 of NFc2 belongs to the multiple NF A IDs, and if so, NFp determines that NFc2 belongs to NF set A, so NFc2 Have the right to use the access token corresponding to the NF set A ID.
这里需要说明的是,如果access token中不包括NF服务请求者的NF实例ID#2,则可以不执行S703,直接采用方案1至方案3中任一种方法验证NFc2是否有权使用该NF set A ID所对应的该access token。What needs to be explained here is that if the NF instance ID#2 of the NF service requester is not included in the access token, S703 may not be executed, and any method in Scheme 1 to Scheme 3 may be used to directly verify whether NFc2 has the right to use the NF set The access token corresponding to the A ID.
通过上述方案,如果NFp确定NFc有权使用该NF set A ID所对应的该access token,则可选地,在S712,NFp存储NFc2的NF实例ID#2和NF set A ID(或者说保存NF实例ID#2和NF set A ID的关联关系),该信息用于后续验证流程,例如,当NFc2后续再次通过NF set A ID所对应的该access token向该NFp请求服务时,NFp可以根据本地保存的NF实例ID#2和NF set A ID的关联关系确定NFc2有权使用该NF set A ID所对应的该access token,从而可以避免后续再次执行繁琐的验证过程,可以节省信令开销。Through the above scheme, if NFp determines that NFc has the right to use the access token corresponding to the NF set A ID, then optionally, at S712, NFp stores NF instance ID#2 and NF set A ID of NFc2 (or saves NF Instance ID#2 and NF set A ID), this information is used in the subsequent verification process, for example, when NFc2 requests service from the NFp again through the access token corresponding to the NF set A ID, NFp can according to the local The saved association between NF instance ID#2 and NF set A ID determines that NFc2 has the right to use the access token corresponding to the NF set A ID, so as to avoid subsequent cumbersome verification process and save signaling overhead.
在另一种可能的情况中,NF实例ID#1与NF实例ID#2相同,则表示NFc2与NFc1相同,或者说,该access token为NFc2请求获取的,因此NFc2有权使用该access token 请求服务。此时即使access token中包括NF set A ID,也可以不需要验证NFc2是否有权使用该NF set A ID所对应的该access token,或者也不需要验证NFc2是否属于NF Set A或者跳过NF set A ID的验证流程(或者也可以采用上述方案1至方案3中的任意一种进行验证,本申请不做限定)。NFp可以进一步验证claims中的参数,具体方式与前文所述的类似,这里不再赘述。In another possible situation, if the NF instance ID #1 is the same as the NF instance ID #2, it means that NFc2 is the same as NFc1, or that the access token is obtained by NFc2 request, so NFc2 has the right to use the access token request Serve. At this time, even if the access token includes the NF set A ID, there is no need to verify whether NFc2 has the right to use the access token corresponding to the NF set A ID, or it is not necessary to verify whether NFc2 belongs to NF Set A or skip NF set A ID verification process (or any one of the above schemes 1 to 3 can be used for verification, which is not limited in this application). NFp can further verify the parameters in the claims. The specific method is similar to that described above and will not be repeated here.
当NFp确定NFc2有权使用该access token后,进一步地,NFp验证claims中的参数,例如:After NFp determines that NFc2 has the right to use the access token, further, NFp verifies the parameters in claims, for example:
NFp验证claims中的NF实例ID#3或NF type B与自己的ID或type匹配;NFp verifies that the NF instance ID#3 or NF type B in the claims matches its own ID or type;
如果claims中包括S-NSSAIs或NSI IDs,则NFp验证是否能够服务对应的切片;If claims include S-NSSAIs or NSI IDs, NFp verifies whether the corresponding slice can be served;
如果claims中包括NF Set B ID,则NFp验证claims中的NF set B ID是否与自己的NF Set ID是否匹配,或者说NFp验证自己是否属于NF Set B ID所对应的NF集B;If the claims include NF Set B ID, then NFp verifies whether the NF set B ID in the claims matches its own NF Set ID, or NFp verifies whether it belongs to the NF set B corresponding to the NF Set B ID;
如果claims中包括service服务名,则NFp验证是否匹配请求的服务操作;If the service service name is included in the claims, NFp verifies whether it matches the requested service operation;
如果claims中包括附加范围信息,则NFp验证包含的附加范围与请求的操作是否匹配;If claims include additional range information, NFp verifies whether the included additional range matches the requested operation;
其他地,NFp验证该access token是否在有效时间,例如,NFp将access token中的到期时间与当前的时间进行比较以验证access token是否过期。Otherwise, NFp verifies whether the access token is within the valid time, for example, NFp compares the expiration time in the access token with the current time to verify whether the access token is expired.
本申请对NFp验证NF set A ID以及验证claims中的其他参数的顺序不做限定。优选的,可以先验证NF set A ID,再验证claims中的其他参数,这样当NF set A ID以验证不通过的情况下,可以不用再验证claims中的其他参数,从而节省资源。This application does not limit the order in which NFp verifies NF set A ID and verifies other parameters in claims. Preferably, the NF set A ID can be verified first, and then other parameters in the claims can be verified, so that when the verification of the NF set A ID fails, other parameters in the claims can be saved, thereby saving resources.
本申请对验证claim中的参数的顺序不做限定。S713,NFp向NFc2发送NF服务响应消息。This application does not limit the order of verifying the parameters in the claim. S713. The NFp sends an NF service response message to the NFc2.
示例性地,当上述验证过程均通过,则NFp确定NFc2有权请求服务,则NFp处理NFc2的NF服务请求,并向NF服务消费者发送NF服务响应消息。如果上述验证过程中任意一项验证失败,则NFp向NFc2发送NF服务响应,该NF服务响应用于拒绝NF服务请求。Exemplarily, when the above verification processes all pass, NFp determines that NFc2 has the right to request the service, then NFp processes the NF service request of NFc2, and sends an NF service response message to the NF service consumer. If any one of the above verification processes fails, the NFp sends an NF service response to the NFc2, where the NF service response is used to reject the NF service request.
示例性地,当上述验证过程均通过,则NFp向NFc2提供请求的服务(或者说执行请求的服务),并发送服务响应消息。Exemplarily, when the above verification processes all pass, the NFp provides the requested service (or executes the requested service) to the NFc2, and sends a service response message.
因此,本申请实施例提供的授权验证的方法,在NF服务消费者请求服务的过程中,通过验证NF服务消费者是否属于请求消息中携带的访问令牌所对应的NF集,来确定NF服务消费者是否被授权使用请求消息中所携带的访问令牌,从而防止了恶意的NF服务消费者越权使用该访问令牌获取服务。Therefore, the authorization verification method provided by the embodiment of the present application determines whether the NF service consumer belongs to the NF set corresponding to the access token carried in the request message by verifying whether the NF service consumer is in the process of requesting the service. Whether the consumer is authorized to use the access token carried in the request message, thereby preventing malicious NF service consumers from using the access token to obtain services beyond their authority.
图13示出了本申请实施例提供的方法800的示例性流程图。该方法800中,服务消费者不直接与NRF网元进行通信,由SCP网元代理服务消费者与NRF网元进行通信。方法800可以与方法600结合实施,例如,方法800在方法600之后实施。方法800也可以独立实施,本申请不做限定。方法800包括:Fig. 13 shows an exemplary flow chart of a method 800 provided by an embodiment of the present application. In the method 800, the service consumer does not directly communicate with the NRF network element, and the SCP network element communicates with the NRF network element on behalf of the service consumer. Method 800 may be implemented in conjunction with method 600 , for example, method 800 may be implemented after method 600 . The method 800 may also be implemented independently, which is not limited in this application. Method 800 includes:
S801,NFc2向SCP发送NF服务请求消息,该NF服务请求消息中包括访问令牌和NFc2的CCA。S801. The NFc2 sends an NF service request message to the SCP, where the NF service request message includes the access token and the CCA of the NFc2.
S802,SCP向NFp发送接收到的该NF服务请求消息。S802. The SCP sends the received NF service request message to the NFp.
应理解,S801与方法700中的S701类似,区别在于S701中的接收端为NFp,S801 中的接收端为SCP,且S801的NF服务请求消息中携带了NFc2的CCA,该CCA包括NFc2的NF实例ID、时间戳和到期时间、NF type。。It should be understood that S801 is similar to S701 in method 700, except that the receiving end in S701 is NFp, the receiving end in S801 is SCP, and the NF service request message in S801 carries the CCA of NFc2, and the CCA includes the NF of NFc2. Instance ID, timestamp and expiration time, NF type. .
需要说明的是,在直接通信场景下,NFp可以直接从NFc2的证书中获取NFc2的NF实例ID或者从服务请求消息中获取NFc2的NF实例ID,而在间接通信场景中,NFp需要从CCA中获取NFc2的NF实例ID。It should be noted that in the direct communication scenario, NFp can obtain the NF instance ID of NFc2 directly from the certificate of NFc2 or obtain the NF instance ID of NFc2 from the service request message, while in the indirect communication scenario, NFp needs to obtain the NF instance ID of NFc2 from the CCA Obtain the NF instance ID of NFc2.
应理解,S803至S806与方法700中的S702至S712类似,其中,方法800中的步骤S805可对应于方法700中的方案1至方案3。It should be understood that S803 to S806 are similar to S702 to S712 in method 700 , wherein step S805 in method 800 may correspond to scheme 1 to scheme 3 in method 700 .
S807,NFp向SCP发送NF服务响应消息。S807. The NFp sends an NF service response message to the SCP.
S808,SCP向NFc2发送接收到的该NF服务响应消息。S808, the SCP sends the received NF service response message to NFc2.
示例性地,当上述验证过程均通过,则NFp确定NFc2有权请求服务,则NFp处理NFc2的NF服务请求,并通过SCP向NF服务消费者发送NF服务响应消息。如果上述验证过程中任意一项验证失败,则NFp通过SCP向NFc2发送NF服务响应,该NF服务响应用于拒绝NF服务请求。Exemplarily, when the above verification processes pass, NFp determines that NFc2 has the right to request the service, then NFp processes the NF service request of NFc2, and sends an NF service response message to the NF service consumer through the SCP. If any one of the above verification processes fails, the NFp sends an NF service response to the NFc2 through the SCP, and the NF service response is used to reject the NF service request.
因此,本申请实施例提供的授权验证的方法,在NF服务消费者请求服务的过程中,通过验证NF服务消费者是否属于请求消息中携带的访问令牌所对应的NF集,来确定NF服务消费者是否被授权使用请求消息中所携带的访问令牌,从而防止了恶意的NF服务消费者越权使用该访问令牌获取服务。Therefore, the authorization verification method provided by the embodiment of the present application determines whether the NF service consumer belongs to the NF set corresponding to the access token carried in the request message by verifying whether the NF service consumer is in the process of requesting the service. Whether the consumer is authorized to use the access token carried in the request message, thereby preventing malicious NF service consumers from using the access token to obtain services beyond their authority.
本文中描述的各个实施例可以为独立的方案,也可以根据内在逻辑进行组合,这些方案都落入本申请的保护范围中。例如,方法500和方法700可以结合使用,也可以独立使用。又如,方法600可以单独使用,也可以与方法800结合使用,等等。The various embodiments described herein may be independent solutions, or may be combined according to internal logic, and these solutions all fall within the protection scope of the present application. For example, method 500 and method 700 can be used in combination, or can be used independently. As another example, the method 600 can be used alone, or combined with the method 800, and so on.
可以理解的是,上述各个方法实施例中,由网络设备(如各个网元)实现的方法和操作,也可以由可用于网络设备的部件(例如芯片或者电路)实现。It can be understood that, in the foregoing method embodiments, the methods and operations implemented by network equipment (such as each network element) may also be implemented by components (such as chips or circuits) that can be used in network equipment.
以上,结合图6至图13详细说明了本申请实施例提供的方法。以下,结合图14至图15详细说明本申请实施例提供的装置。应理解,装置实施例的描述与方法实施例的描述相互对应,因此,未详细描述的内容可以参见上文方法实施例,为了简洁,这里不再赘述。Above, the method provided by the embodiment of the present application is described in detail with reference to FIG. 6 to FIG. 13 . Hereinafter, the device provided by the embodiment of the present application will be described in detail with reference to FIG. 14 to FIG. 15 . It should be understood that the descriptions of the device embodiments correspond to the descriptions of the method embodiments. Therefore, for details that are not described in detail, reference may be made to the method embodiments above. For brevity, details are not repeated here.
图14是本申请实施例提供的授权验证的装置的示意性框图。该装置10包括收发单元11和处理单元12。收发单元11可以实现相应的通信功能,处理单元12用于进行数据处理。收发单元11还可以称为通信接口或通信单元。Fig. 14 is a schematic block diagram of an apparatus for authorization verification provided by an embodiment of the present application. The device 10 includes a transceiver unit 11 and a processing unit 12 . The transceiver unit 11 can implement a corresponding communication function, and the processing unit 12 is used for data processing. The transceiver unit 11 may also be called a communication interface or a communication unit.
可选地,该装置10还可以包括存储单元,该存储单元可以用于存储指令和/或数据,处理单元12可以读取存储单元中的指令和/或数据,以使得通信装置实现前述方法实施例。Optionally, the device 10 may also include a storage unit, which may be used to store instructions and/or data, and the processing unit 12 may read the instructions and/or data in the storage unit, so that the communication device implements the aforementioned methods. example.
该装置10可以用于执行上文方法实施例中第一网元(或NF服务提供者)所执行的动作,这时,该装置10可以为第一网元(或NF服务提供者/NFp)或者可配置于第一网元的部件,收发单元11用于执行上文方法实施例中第一网元侧的收发相关的操作,处理单元12用于执行上文方法实施例中第一网元的处理相关的操作。The device 10 can be used to execute the actions performed by the first network element (or NF service provider) in the method embodiment above, and at this time, the device 10 can be the first network element (or NF service provider/NFp) Alternatively, it can be configured as a component of the first network element. The transceiver unit 11 is used to perform operations related to sending and receiving on the side of the first network element in the above method embodiments, and the processing unit 12 is used to perform operations on the first network element in the above method embodiments. processing related operations.
或者,该装置10可以用于执行上文方法实施例中第三网元(或NRF)所执行的动作,这时,该装置10可以为第三网元或者可配置于第三网元的部件,收发单元11用于执行上文方法实施例中第三网元侧的收发相关的操作,处理单元12用于执行上文方法实施例中第三网元侧的处理相关的操作。Alternatively, the device 10 may be used to execute the actions performed by the third network element (or NRF) in the above method embodiments, and at this time, the device 10 may be the third network element or a component that can be configured in the third network element The transceiving unit 11 is configured to perform transceiving-related operations on the third network element side in the above method embodiments, and the processing unit 12 is configured to perform processing-related operations on the third network element side in the above method embodiments.
或者,该装置10可以用于执行上文方法实施例中第二网元(或NF服务消费者)所 执行的动作,这时,该装置10可以为第二网元或者可配置于第二网元的部件,收发单元11用于执行上文方法实施例中第二网元的收发相关的操作,处理单元12用于执行上文方法实施例中第二网元侧的处理相关的操作。Alternatively, the device 10 can be used to execute the actions performed by the second network element (or NF service consumer) in the above method embodiments. At this time, the device 10 can be the second network element or can be configured on the second network The transceiving unit 11 is used to perform operations related to the sending and receiving of the second network element in the above method embodiments, and the processing unit 12 is used to perform operations related to processing on the second network element side in the above method embodiments.
作为一种设计,该装置10用于执行上文图9所示实施例中第一网元所执行的动作。As a design, the apparatus 10 is configured to perform actions performed by the first network element in the embodiment shown in FIG. 9 above.
在一种实现方式中,收发单元11,用于接收与第二网元关联的服务请求消息,该服务请求消息用于请求该第一网元向该第二网元提供的第一服务,该服务请求消息包括访问令牌,该访问令牌包括第一网络功能NF集的标识,该第一NF集的标识用于指示该访问令牌适用的服务请求网元;In an implementation manner, the transceiver unit 11 is configured to receive a service request message associated with the second network element, where the service request message is used to request the first service provided by the first network element to the second network element, the The service request message includes an access token, where the access token includes an identifier of a first network function NF set, and the identifier of the first NF set is used to indicate a service requesting network element to which the access token applies;
处理单元12,用于根据该第一NF集的标识,确定是否授权该第二网元使用该第一服务。The processing unit 12 is configured to determine whether to authorize the second network element to use the first service according to the identifier of the first NF set.
作为一示例,该处理单元12具体用于:确定该第二网元是否属于该第一NF集的标识所指示的第一NF集合;在该第二网元不属于该第一NF集合的情况下,拒绝向第二网元提供该第一服务。As an example, the processing unit 12 is specifically configured to: determine whether the second network element belongs to the first NF set indicated by the identifier of the first NF set; if the second network element does not belong to the first NF set Next, refuse to provide the first service to the second network element.
作为又一示例,该收发单元11具体用于:向第三网元发送第一验证请求消息,该第一验证请求消息用于请求验证该第二网元是否属于该第一NF集的标识所指示的第一NF集合,该第一验证请求消息包括该第二网元的标识和该第一NF集的标识;从该第三网元接收指示信息;As yet another example, the transceiving unit 11 is specifically configured to: send a first verification request message to a third network element, where the first verification request message is used to request verification of whether the second network element belongs to the identifier of the first NF set Indicating the first NF set, the first verification request message includes the identifier of the second network element and the identifier of the first NF set; receiving indication information from the third network element;
该处理单元12具体用于:根据该指示信息确定该第二网元是否属于该第一NF集合;在该第二网元不属于该第一NF集的情况下,拒绝向该第二网元提供该第一服务。The processing unit 12 is specifically configured to: determine whether the second network element belongs to the first NF set according to the indication information; if the second network element does not belong to the first NF set, refuse to send The first service is provided.
作为又一示例,该收发单元11具体用于:向第三网元发送第二验证请求消息,该第二验证请求消息用于请求获取该第二网元所属的NF集的标识,该第二验证请求消息包括该第二网元的标识;从该第三网元接收第二NF集的标识;As yet another example, the transceiving unit 11 is specifically configured to: send a second verification request message to a third network element, where the second verification request message is used to request to acquire the identifier of the NF set to which the second network element belongs, and the second The verification request message includes the identification of the second network element; receiving the identification of the second NF set from the third network element;
该处理单元12具体用于:在该第二NF集的标识和该第一NF集的标识不相同的情况下,拒绝向该第二网元提供该第一服务。The processing unit 12 is specifically configured to: refuse to provide the first service to the second network element when the identifier of the second NF set is different from the identifier of the first NF set.
作为又一示例,该收发单元11具体用于:该第一网元向第三网元发送第三验证请求消息,该第三验证请求消息用于请求获取该第一NF集的标识所指示的第一NF集合包括的NF的标识,该第三验证请求消息包括该第一NF集的标识;从该第三网元接收该第一NF集合包括的NF的标识;As another example, the transceiving unit 11 is specifically configured to: the first network element sends a third verification request message to a third network element, and the third verification request message is used to request to obtain the information indicated by the identifier of the first NF set. An identifier of an NF included in the first NF set, where the third verification request message includes an identifier of the first NF set; receiving an identifier of the NF included in the first NF set from the third network element;
该处理单元12具体用于:在该第一NF集合包括的NF的标识不包括该第二网元的标识的情况下,拒绝向该第二网元提供该第一服务。The processing unit 12 is specifically configured to: refuse to provide the first service to the second network element when the identifiers of the NFs included in the first NF set do not include the identifier of the second network element.
作为又一示例,该处理单元12具体用于:该第一网元根据配置信息和该第二网元的标识,确定该第二网元是否属于该第一NF集合,该配置信息包括该第一NF集合中的NF的标识和/或该第二网元所属的NF集的标识。As another example, the processing unit 12 is specifically configured to: the first network element determines whether the second network element belongs to the first NF set according to the configuration information and the identifier of the second network element, where the configuration information includes the second network element An identifier of an NF in the NF set and/or an identifier of the NF set to which the second network element belongs.
作为又一示例,该收发单元11还用于:从该第二网元的证书中获取该第二网元的标识;或者,从服务通信代理网元接收该第二网元的客户端凭证声明CCA,其中,该CCA中包括该第二网元的标识;或者,从该服务请求消息中获取该第二网元的标识。As another example, the transceiving unit 11 is further configured to: acquire the identity of the second network element from the certificate of the second network element; or receive the client certificate statement of the second network element from the service communication agent network element The CCA, wherein the CCA includes the identifier of the second network element; or, the identifier of the second network element is acquired from the service request message.
作为又一示例,该访问令牌还包括第四网元的标识,该第四网元属于该第一NF集的标识所指示的第一NF集合,该第四网元的标识用于指示该访问令牌由该第四网元请求获得的;As another example, the access token further includes an identifier of a fourth network element, the fourth network element belongs to the first NF set indicated by the identifier of the first NF set, and the identifier of the fourth network element is used to indicate the The access token is obtained by the request of the fourth network element;
作为又一示例,该处理单元12还用于:确定该第一网元的标识与该第四网元的标识不同。As yet another example, the processing unit 12 is further configured to: determine that the identifier of the first network element is different from the identifier of the fourth network element.
作为又一示例,该处理单元12还用于:在确定该第二网元属于该第一NF集的标识该指示的第一NF集合的情形下,保存该第二网元的标识和该第一NF集的标识的关联关系。As yet another example, the processing unit 12 is further configured to: save the identifier of the second network element and the first NF set that identifies the indicated first NF set when it is determined that the second network element belongs to the first NF set An association relation of the identities of an NF set.
作为又一示例,该第三网元为网络存储功能网元。As yet another example, the third network element is a network storage function network element.
该装置10可实现对应于根据本申请实施例的方法700至方法800中的NFp执行的步骤或者流程,该装置10可以包括用于执行图10中的方法700至图13中方法800中的NFp执行的方法的单元。并且,该装置10中的各单元和上述其他操作和/或功能分别为了实现方法700至方法800的相应流程。The device 10 can implement steps or processes corresponding to the execution of NFp in the method 700 to the method 800 according to the embodiment of the present application, and the device 10 can include a method for executing the NFp in the method 700 in FIG. 10 to the method 800 in FIG. 13 The unit of method to execute. Moreover, each unit in the device 10 and the above-mentioned other operations and/or functions are for realizing the corresponding processes of the method 700 to the method 800 respectively.
其中,当该装置10用于执行图12中的方法700时,收发单元11可用于执行方法700中的步骤S701、S705、S707、S708、S710、S713,处理单元12用于指示方法700中的S702、S703、S704、S711、S712。Wherein, when the device 10 is used to execute the method 700 in FIG. S702, S703, S704, S711, S712.
当该装置10用于执行图13中的方法800时,收发单元11可用于执行方法800中的步骤S802、S807,处理单元12可用于执行方法800中的步骤S803-S806中任意步骤。When the device 10 is used to execute the method 800 in FIG. 13 , the transceiver unit 11 can be used to execute steps S802 and S807 in the method 800, and the processing unit 12 can be used to execute any step in the steps S803-S806 in the method 800.
应理解,各单元执行上述相应步骤的具体过程在上述方法实施例中已经详细说明,为了简洁,在此不再赘述。It should be understood that the specific process for each unit to perform the above corresponding steps has been described in detail in the above method embodiments, and for the sake of brevity, details are not repeated here.
该装置10可实现对应于根据本申请实施例的方法500至方法800中的NRF执行的步骤或者流程,该装置10可以包括用于执行图10中的方法500至图12中方法700中的NRF执行的方法的单元。并且,该装置10中的各单元和上述其他操作和/或功能分别为了实现方法500至方法800的相应流程。The device 10 can implement the steps or processes corresponding to the NRF execution in the method 500 to the method 800 according to the embodiment of the present application, and the device 10 can include an NRF for executing the method 500 in FIG. 10 to the method 700 in FIG. 12 The unit of method to execute. Moreover, each unit in the apparatus 10 and the above-mentioned other operations and/or functions are for realizing the corresponding processes of the method 500 to the method 800 respectively.
其中,当该装置10用于执行图10中的方法500时,收发单元11可用于执行方法500中的步骤S502、S505,处理单元12用于指示方法500中的S501、S503、S504。Wherein, when the device 10 is used to execute the method 500 in FIG. 10 , the transceiver unit 11 can be used to execute steps S502 and S505 in the method 500 , and the processing unit 12 can be used to instruct steps S501 , S503 and S504 in the method 500 .
当该装置10用于执行图11中的方法600时,收发单元11可用于执行方法600中的步骤S603、S606,处理单元12可用于执行方法600中的步骤S601、S604、S605中任意步骤。When the device 10 is used to execute the method 600 in FIG. 11 , the transceiver unit 11 can be used to execute steps S603 and S606 in the method 600, and the processing unit 12 can be used to execute any step in the steps S601, S604, and S605 in the method 600.
当该装置10用于执行图12中的方法700时,收发单元11可用于执行方法700中的步骤S703、S709,处理单元12可用于执行方法700中的步骤S705、S707、S708、S710中任意步骤。When the device 10 is used to execute the method 700 in FIG. 12 , the transceiver unit 11 can be used to execute steps S703 and S709 in the method 700, and the processing unit 12 can be used to execute any of the steps S705, S707, S708, and S710 in the method 700. step.
应理解,各单元执行上述相应步骤的具体过程在上述方法实施例中已经详细说明,为了简洁,在此不再赘述。It should be understood that the specific process for each unit to perform the above corresponding steps has been described in detail in the above method embodiments, and for the sake of brevity, details are not repeated here.
如图15所示,本申请实施例还提供一种认证授权的设备20。该设备20包括处理器21,处理器21与存储器22耦合,存储器22用于存储计算机程序或指令和/或数据,处理器21用于执行存储器22存储的计算机程序或指令和/或数据,使得上文方法实施例中的方法被执行。As shown in FIG. 15 , the embodiment of the present application also provides an authentication and authorization device 20 . The device 20 includes a processor 21, the processor 21 is coupled with a memory 22, the memory 22 is used for storing computer programs or instructions and/or data, and the processor 21 is used for executing the computer programs or instructions and/or data stored in the memory 22, so that The methods in the above method embodiments are performed.
可选地,该设备20包括的处理器21为一个或多个。Optionally, the device 20 includes one or more processors 21 .
可选地,如图14所示,该设备20还可以包括存储器22。Optionally, as shown in FIG. 14 , the device 20 may further include a memory 22 .
可选地,该设备20包括的存储器22可以为一个或多个。Optionally, the device 20 may include one or more memories 22 .
可选地,该存储器22可以与该处理器21集成在一起,或者分离设置。Optionally, the memory 22 can be integrated with the processor 21, or set separately.
可选地,如图14所示,该设备20还可以包括收发器23,收发器23用于信号的接收和/或发送。例如,处理器21用于控制收发器23进行信号的接收和/或发送。Optionally, as shown in FIG. 14 , the device 20 may further include a transceiver 23 for receiving and/or sending signals. For example, the processor 21 is used to control the transceiver 23 to receive and/or send signals.
作为一种方案,该设备20用于实现上文方法实施例中由第一网元或者NF服务提供者(NFp)执行的操作。As a solution, the device 20 is configured to implement the operations performed by the first network element or the NF service provider (NFp) in the above method embodiments.
例如,处理器21用于实现上文方法实施例中由第一网元或者NF服务提供者(NFp)执行的处理相关的操作,收发器23用于实现上文方法实施例中由第一网元或者NF服务提供者(NFp)执行的收发相关的操作。For example, the processor 21 is used to implement the processing-related operations performed by the first network element or NF service provider (NFp) in the above method embodiments, and the transceiver 23 is used to implement the processing related operations performed by the first network element in the above method embodiments. Transceiver-related operations performed by elements or NF service providers (NFp).
作为另一种方案,该设备20用于实现上文方法实施例中由第三网元或者NRF执行的操作。As another solution, the device 20 is configured to implement the operations performed by the third network element or NRF in the above method embodiments.
例如,处理器21用于实现上文方法实施例中由第三网元或者NRF执行的处理相关的操作,收发器23用于实现上文方法实施例中由第三网元或者NRF执行的收发相关的操作。For example, the processor 21 is used to implement the processing-related operations performed by the third network element or NRF in the above method embodiments, and the transceiver 23 is used to implement the transceiving operations performed by the third network element or NRF in the above method embodiments related operations.
作为又一种方案,该设备20用于实现上文方法实施例中由第二网元或者NF服务消费者(NFc)执行的操作。As yet another solution, the device 20 is configured to implement the operations performed by the second network element or NF service consumer (NFc) in the above method embodiments.
例如,处理器21用于实现上文方法实施例中由第二网元或者NF服务消费者(NFc)执行的处理相关的操作,收发器23用于实现上文方法实施例中由第二网元或者NF服务消费者(NFc)执行的收发相关的操作。For example, the processor 21 is used to implement the processing-related operations performed by the second network element or NF service consumer (NFc) in the above method embodiments, and the transceiver 23 is used to implement the processing related operations performed by the second network element in the above method embodiments. Transceiver-related operations performed by elements or NF service consumers (NFc).
应理解,各模块执行上述相应步骤的具体过程在上述方法实施例中已经详细说明,为了简洁,在此不再赘述。It should be understood that the specific process of each module performing the above corresponding steps has been described in detail in the above method embodiments, and for the sake of brevity, details are not repeated here.
本申请实施例还提供了一种处理装置,包括处理器和接口;该处理器用于执行上述任一方法实施例中的方法。The embodiment of the present application also provides a processing device, including a processor and an interface; the processor is configured to execute the method in any one of the above method embodiments.
应理解,上述处理装置可以是一个或多个芯片。例如,该处理装置可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(application specific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。It should be understood that the above processing device may be one or more chips. For example, the processing device may be a field programmable gate array (field programmable gate array, FPGA), an application specific integrated circuit (ASIC), or a system chip (system on chip, SoC). It can be a central processor unit (CPU), a network processor (network processor, NP), a digital signal processing circuit (digital signal processor, DSP), or a microcontroller (micro controller unit) , MCU), can also be a programmable controller (programmable logic device, PLD) or other integrated chips.
本申请实施例还提供一种计算机可读存储介质,其上存储有用于实现上述方法实施例中由第一网元(NF服务提供者)或第二网元(NF服务消费者)或第三网元(NRF)执行的方法的计算机指令。The embodiment of the present application also provides a computer-readable storage medium, on which is stored the first network element (NF service provider) or the second network element (NF service consumer) or the third Computer instructions of a method performed by a network element (NRF).
例如,该计算机程序被计算机执行时,使得该计算机可以实现上述方法实施例中由第一网元(NF服务提供者)或第二网元(NF服务消费者)或第三网元(NRF)执行的方法。For example, when the computer program is executed by a computer, the computer can implement the method described above by the first network element (NF service provider) or the second network element (NF service consumer) or the third network element (NRF). method of execution.
本申请实施例还提供一种包含指令的计算机程序产品,该指令被计算机执行时使得该计算机实现上述方法实施例中由一网元(或NF服务提供者)执行的方法,或由第二网元(或NF服务消费者)执行的方法,或由第三网元(或NRF)执行的方法。The embodiment of the present application also provides a computer program product containing instructions. When the instructions are executed by a computer, the computer implements the method performed by a network element (or NF service provider) in the above method embodiments, or by the second network element. A method performed by a network element (or NF service consumer), or a method performed by a third network element (or NRF).
本申请实施例还提供一种通信系统,该通信系统包括上文实施例中的第一网元、第二网元和第三网元。An embodiment of the present application further provides a communication system, where the communication system includes the first network element, the second network element, and the third network element in the foregoing embodiments.
所属领域的技术人员可以清楚地了解到,为描述方便和简洁,上述提供的任一种通信装置中相关内容的解释及有益效果均可参考上文提供的对应的方法实施例,此处不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of description, the explanations and beneficial effects of the relevant content in any communication device provided above can refer to the corresponding method embodiments provided above, and are not repeated here. repeat.
本申请实施例并未对本申请实施例提供的方法的执行主体的具体结构进行特别限定,只要能够通过运行记录有本申请实施例提供的方法的代码的程序,以根据本申请实施例提供的方法进行通信即可。例如,本申请实施例提供的方法的执行主体可以是终端设备或网络设备,或者,是终端设备或网络设备中能够调用程序并执行程序的功能模块。The embodiment of the present application does not specifically limit the specific structure of the execution subject of the method provided in the embodiment of the present application, as long as the program that records the code of the method provided in the embodiment of the present application can be executed according to the method provided in the embodiment of the present application Just communicate. For example, the subject of execution of the method provided by the embodiment of the present application may be a terminal device or a network device, or a functional module in the terminal device or network device that can call a program and execute the program.
本申请的各个方面或特征可以实现成方法、装置或使用标准编程和/或工程技术的制品。本文中使用的术语“制品”可以涵盖可从任何计算机可读器件、载体或介质访问的计算机程序。Various aspects or features of the present application can be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques. The term "article of manufacture" as used herein may encompass a computer program accessible from any computer readable device, carrier or media.
其中,计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质(或者说计算机可读介质)例如可以包括但不限于:磁性介质或磁存储器件(例如,软盘、硬盘(如移动硬盘)、磁带)、光介质(例如,光盘、压缩盘(compact disc,CD)、数字通用盘(digital versatile disc,DVD)等)、智能卡和闪存器件(例如,可擦写可编程只读存储器(erasable programmable read-only memory,EPROM)、卡、棒或钥匙驱动器等)、或者半导体介质(例如固态硬盘(solid state disk,SSD)等、U盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)等各种可以存储程序代码的介质。Wherein, the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media. Usable media (or computer-readable media) may include, but are not limited to, magnetic media or magnetic storage devices (for example, floppy disks, hard disks (such as removable hard disks), magnetic tapes), optical media (for example, optical disks, compact discs, etc.) , CD), digital versatile disc (digital versatile disc, DVD, etc.), smart cards and flash memory devices (such as erasable programmable read-only memory (EPROM), card, stick or key drive, etc. ), or semiconductor media (such as solid state disk (SSD), U disk, read-only memory (ROM), random access memory (RAM), etc. can store programs The medium of the code.
本文描述的各种存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读介质。术语“机器可读介质”可以包括但不限于:无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。Various storage media described herein can represent one or more devices and/or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and/or carrying instructions and/or data.
应理解,本申请实施例中提及的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM)。例如,RAM可以用作外部高速缓存。作为示例而非限定,RAM可以包括如下多种形式:静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。It should be understood that the memory mentioned in the embodiments of the present application may be a volatile memory or a nonvolatile memory, or may include both volatile memory and nonvolatile memory. Among them, the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically programmable Erases programmable read-only memory (electrically EPROM, EEPROM) or flash memory. The volatile memory may be random access memory (RAM). For example, RAM can be used as an external cache. As an example and not limitation, RAM may include the following forms: static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM) , double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (synchlink DRAM, SLDRAM) and Direct memory bus random access memory (direct rambus RAM, DR RAM).
需要说明的是,当处理器为通用处理器、DSP、ASIC、FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件时,存储器(存储模块)可以集成在处理器中。It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, the memory (storage module) may be integrated in the processor.
还需要说明的是,本文描述的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It should also be noted that the memories described herein are intended to include, but are not limited to, these and any other suitable types of memories.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅是示意性的,例如,上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。此外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通 信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the above units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or can be Integrate into another system, or some features may be ignored, or not implemented. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元实现本申请提供的方案。The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to implement the solutions provided in this application.
另外,在本申请各个实施例中的各功能单元可以集成在一个单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof.
当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。例如,计算机可以是个人计算机,服务器,或者网络设备等。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。关于计算机可读存储介质,可以参考上文描述。When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. A computer can be a general purpose computer, special purpose computer, computer network, or other programmable device. For example, the computer can be a personal computer, a server, or a network device, etc. Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g. Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to another website site, computer, server or data center. Regarding the computer-readable storage medium, reference may be made to the above description.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求和说明书的保护范围为准。The above is only a specific embodiment of the application, but the scope of protection of the application is not limited thereto. Any person familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the application. All should be covered within the scope of protection of this application. Therefore, the protection scope of the present application shall be determined by the protection scope of the claims and the specification.

Claims (40)

  1. 一种授权验证的方法,其特征在于,包括:A method for authorization verification, characterized by comprising:
    第一网元接收与第二网元关联的服务请求消息,所述服务请求消息用于请求所述第一网元向所述第二网元提供第一服务,所述服务请求消息包括访问令牌,所述访问令牌包括第一网络功能NF集的标识,所述第一NF集的标识用于指示所述访问令牌适用的服务请求网元;The first network element receives a service request message associated with the second network element, the service request message is used to request the first network element to provide the first service to the second network element, and the service request message includes an access token A card, the access token includes an identifier of a first network function NF set, and the identifier of the first NF set is used to indicate a service requesting network element to which the access token is applicable;
    所述第一网元根据所述第一NF集的标识,确定是否授权所述第二网元使用所述第一服务。The first network element determines whether to authorize the second network element to use the first service according to the identifier of the first NF set.
  2. 根据权利要求1所述的方法,其特征在于,所述第一网元根据所述第一NF集的标识,确定是否授权所述第二网元使用所述第一服务,包括:The method according to claim 1, wherein the first network element determines whether to authorize the second network element to use the first service according to the identifier of the first NF set, comprising:
    所述第一网元确定所述第二网元是否属于所述第一NF集的标识所指示的第一NF集合;determining, by the first network element, whether the second network element belongs to the first NF set indicated by the identifier of the first NF set;
    在所述第二网元不属于所述第一NF集合的情况下,所述第一网元拒绝向所述第二网元提供所述第一服务。If the second network element does not belong to the first NF set, the first network element refuses to provide the first service to the second network element.
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一网元根据所述第一NF集的标识,确定是否授权所述第二网元使用所述第一服务,包括:The method according to claim 1 or 2, wherein the first network element determines whether to authorize the second network element to use the first service according to the identifier of the first NF set, including:
    所述第一网元向第三网元发送第一验证请求消息,所述第一验证请求消息用于请求验证所述第二网元是否属于所述第一NF集的标识所指示的第一NF集合,所述第一验证请求消息包括所述第二网元的标识和所述第一NF集的标识;The first network element sends a first verification request message to a third network element, where the first verification request message is used to request to verify whether the second network element belongs to the first NF indicated by the identifier of the first NF set. NF set, the first verification request message includes the identifier of the second network element and the identifier of the first NF set;
    所述第一网元接收来自所述第三网元的指示信息;The first network element receives indication information from the third network element;
    所述第一网元根据所述指示信息确定所述第二网元是否属于所述第一NF集合;determining, by the first network element, whether the second network element belongs to the first NF set according to the indication information;
    在所述第二网元不属于所述第一NF集的情况下,所述第一网元拒绝向所述第二网元提供所述第一服务。If the second network element does not belong to the first NF set, the first network element refuses to provide the first service to the second network element.
  4. 根据权利要求1或2所述的方法,其特征在于,所述第一网元根据所述第一NF集的标识,确定是否授权所述第二网元使用所述第一服务,包括:The method according to claim 1 or 2, wherein the first network element determines whether to authorize the second network element to use the first service according to the identifier of the first NF set, including:
    所述第一网元向第三网元发送第二验证请求消息,所述第二验证请求消息用于请求获取所述第二网元所属的NF集的标识,所述第二验证请求消息包括所述第二网元的标识;The first network element sends a second verification request message to the third network element, where the second verification request message is used to request to obtain the identifier of the NF set to which the second network element belongs, and the second verification request message includes an identifier of the second network element;
    所述第一网元接收来自所述第三网元的第二NF集的标识;receiving, by the first network element, an identification of a second NF set from the third network element;
    在所述第二NF集的标识和所述第一NF集的标识不相同的情况下,所述第一网元拒绝向所述第二网元提供所述第一服务。If the identifier of the second NF set is different from the identifier of the first NF set, the first network element refuses to provide the first service to the second network element.
  5. 根据权利要求1或2所述的方法,其特征在于,所述第一网元根据所述第一NF集的标识,确定是否授权所述第二网元使用所述第一服务,包括:The method according to claim 1 or 2, wherein the first network element determines whether to authorize the second network element to use the first service according to the identifier of the first NF set, including:
    所述第一网元向第三网元发送第三验证请求消息,所述第三验证请求消息用于请求获取所述第一NF集的标识所指示的第一NF集合包括的NF的标识,所述第三验证请求消息包括所述第一NF集的标识;The first network element sends a third verification request message to a third network element, where the third verification request message is used to request to obtain the identifier of the NF included in the first NF set indicated by the identifier of the first NF set, The third verification request message includes an identification of the first NF set;
    所述第一网元接收来自所述第三网元的所述第一NF集合包括的NF的标识;receiving, by the first network element, identifiers of NFs included in the first set of NFs from the third network element;
    在所述第一NF集合包括的NF的标识不包括所述第二网元的标识的情况下,所述第 一网元拒绝向所述第二网元提供所述第一服务。When the identifier of the NF included in the first NF set does not include the identifier of the second network element, the first network element refuses to provide the first service to the second network element.
  6. 根据权利要求3至5中任一项所述的方法,其特征在于,所述第三网元为网络存储功能网元。The method according to any one of claims 3 to 5, wherein the third network element is a network storage function network element.
  7. 根据权利要求2所述的方法,其特征在于,所述第一网元确定所述第二网元是否属于所述第一NF集的标识所指示的第一NF集合,包括:The method according to claim 2, wherein the determining by the first network element whether the second network element belongs to the first NF set indicated by the identifier of the first NF set comprises:
    所述第一网元根据配置信息和所述第二网元的标识,确定所述第二网元是否属于所述第一NF集合,所述配置信息包括所述第一NF集合中的NF的标识和/或所述第二网元所属的NF集的标识。The first network element determines whether the second network element belongs to the first NF set according to the configuration information and the identifier of the second network element, and the configuration information includes the NFs in the first NF set An identifier and/or an identifier of the NF set to which the second network element belongs.
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 7, further comprising:
    所述第一网元从所述第二网元的证书中获取所述第二网元的标识;或者,The first network element obtains the identity of the second network element from the certificate of the second network element; or,
    所述第一网元从服务通信代理网元接收所述第二网元的客户端凭证声明CCA,其中,所述CCA中包括所述第二网元的标识;或者,The first network element receives the client certificate statement CCA of the second network element from the service communication proxy network element, wherein the CCA includes the identifier of the second network element; or,
    所述第一网元从所述服务请求消息中获取所述第二网元的标识。The first network element acquires the identifier of the second network element from the service request message.
  9. 根据权利要求1至8中任一项所述的方法,其特征在于,所述访问令牌还包括第四网元的标识,所述第四网元的标识用于指示所述访问令牌由所述第四网元请求获得的,且所述第四网元属于所述第一NF集的标识所指示的第一NF集合;The method according to any one of claims 1 to 8, wherein the access token further includes an identifier of a fourth network element, and the identifier of the fourth network element is used to indicate that the access token is issued by The fourth network element requests to obtain, and the fourth network element belongs to the first NF set indicated by the identifier of the first NF set;
    所述方法还包括:The method also includes:
    所述第一网元确定所述第二网元的标识与所述第四网元的标识不同。The first network element determines that the identifier of the second network element is different from the identifier of the fourth network element.
  10. 根据权利要求1至9中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 9, further comprising:
    在所述第一网元确定所述第二网元属于所述第一NF集的标识所指示的第一NF集合的情形下,所述第一网元保存所述第二网元的标识和所述第一NF集的标识的关联关系。When the first network element determines that the second network element belongs to the first NF set indicated by the identifier of the first NF set, the first network element saves the identifier of the second network element and An association relationship of identifiers of the first NF set.
  11. 根据权利要求1至10中任一项所述的方法,其特征在于,所述访问令牌还包括其他验证条件,所述方法还包括:The method according to any one of claims 1 to 10, wherein the access token further includes other verification conditions, and the method further includes:
    所述第一网元根据所述其他验证条件,确定是否授权所述第二网元使用所述第一服务,其中,所述其他验证条件包括以下一个或者多个:The first network element determines whether to authorize the second network element to use the first service according to the other verification conditions, where the other verification conditions include one or more of the following:
    服务提供者的NF实例标识、服务提供者的NF类型、服务提供者的单网络切片选择辅助信息、服务提供者的网络切片实例标识、期望的服务提供者所属的NF集的标识、期望的服务名称、所述访问令牌的有效时间。The service provider's NF instance ID, the service provider's NF type, the service provider's single network slice selection auxiliary information, the service provider's network slice instance ID, the ID of the NF set to which the desired service provider belongs, the desired service name, the validity time of said access token.
  12. 根据权利要求11所述的方法,其特征在于,所述第一网元根据所述第一NF集的标识,确定是否授权所述第二网元使用所述第一服务,包括:The method according to claim 11, wherein the first network element determines whether to authorize the second network element to use the first service according to the identifier of the first NF set, comprising:
    当所述第二网元属于所述第一NF集的标识所指示的第一NF集合,且所述其他验证条件验证通过时,所述第一网元授权所述第二网元使用所述第一服务。When the second network element belongs to the first NF set indicated by the identifier of the first NF set, and the other verification conditions pass the verification, the first network element authorizes the second network element to use the First service.
  13. 根据权利要求11所述的方法,其特征在于,所述第一网元根据所述第一NF集的标识,确定是否授权所述第二网元使用所述第一服务,包括:The method according to claim 11, wherein the first network element determines whether to authorize the second network element to use the first service according to the identifier of the first NF set, comprising:
    当所述第二网元不属于所述第一NF集的标识所指示的第一NF集,和/或所述其他验证条件中的任意一项验证不通过时,所述第一网元拒绝向所述第二网元提供服务。When the second network element does not belong to the first NF set indicated by the identifier of the first NF set, and/or any one of the other verification conditions fails the verification, the first network element rejects Provide services to the second network element.
  14. 一种授权验证的方法,其特征在于,包括:A method for authorization verification, characterized by comprising:
    第三网元接收来自第一网元的第一验证请求消息,所述第一验证请求消息包括所述第二网元的标识和所述第一NF集的标识,所述第一验证请求消息用于请求验证所述第二网 元是否属于所述第一NF集的标识所指示的第一NF集合;The third network element receives a first verification request message from the first network element, where the first verification request message includes the identifier of the second network element and the identifier of the first NF set, and the first verification request message Used to request to verify whether the second network element belongs to the first NF set indicated by the identifier of the first NF set;
    所述第三网元根据所述第二网元的标识和所述第一NF集的标识确定所述第二网元是否属于所述第一NF集合;determining, by the third network element, whether the second network element belongs to the first NF set according to the identifier of the second network element and the identifier of the first NF set;
    所述第三网元向所述第一网元发送指示信息,所述指示信息用于指示所述第二网元是否属于所述第一NF集合。The third network element sends indication information to the first network element, where the indication information is used to indicate whether the second network element belongs to the first NF set.
  15. 根据权利要求14所述的方法,其特征在于,所述第三网元根据所述第二网元的标识和所述第一NF集的标识确定所述第二网元是否属于所述第一NF集合,包括:The method according to claim 14, wherein the third network element determines whether the second network element belongs to the first NF set according to the identifier of the second network element and the identifier of the first NF set. NF collections, including:
    所述第三网元根据所述第二网元的标识和所述第二网元的配置信息确定所述第二网元所属的NF集的标识;determining, by the third network element, the identifier of the NF set to which the second network element belongs according to the identifier of the second network element and the configuration information of the second network element;
    在所述第二网元所属的NF集的标识与第一NF集的标识匹配的情况下,所述第三网元确定所述第二网元属于所述第一NF集合,否则所述第三网元确定所述第二网元不属于所述第一NF集合。When the identifier of the NF set to which the second network element belongs matches the identifier of the first NF set, the third network element determines that the second network element belongs to the first NF set, otherwise the second network element The three network elements determine that the second network element does not belong to the first NF set.
  16. 根据权利要求14所述的方法,其特征在于,所述第三网元根据所述第二网元的标识和所述第一NF集的标识确定所述第二网元是否属于所述第一NF集合,包括:The method according to claim 14, wherein the third network element determines whether the second network element belongs to the first NF set according to the identifier of the second network element and the identifier of the first NF set. NF collections, including:
    所述第三网元根据所述第一NF集的标识和所述第一NF集合的配置信息确定所述第一NF集合中的NF的标识;The third network element determines the identities of the NFs in the first NF set according to the identities of the first NF set and the configuration information of the first NF set;
    在所述第一NF集合中的NF的标识包括所述第二网元的标识的情况下,所述第三网元确定所述第二网元属于所述第一NF集合,否则所述第三网元确定所述第二网元不属于所述第一NF集合。If the identifier of the NF in the first NF set includes the identifier of the second network element, the third network element determines that the second network element belongs to the first NF set, otherwise the second network element The three network elements determine that the second network element does not belong to the first NF set.
  17. 一种授权验证的方法,其特征在于,包括:A method for authorization verification, characterized by comprising:
    第一网元接收与第二网元关联的服务请求消息,所述服务请求消息用于请求所述第一网元向所述第二网元提供第一服务,所述服务请求消息包括访问令牌,所述访问令牌包括第一网络功能NF集的标识,所述第一NF集的标识用于指示所述访问令牌适用的服务请求网元;The first network element receives a service request message associated with the second network element, the service request message is used to request the first network element to provide the first service to the second network element, and the service request message includes an access token A card, the access token includes an identifier of a first network function NF set, and the identifier of the first NF set is used to indicate a service requesting network element to which the access token is applicable;
    所述第一网元向第三网元发送第一验证请求消息,所述第一验证请求消息用于请求验证所述第二网元是否属于所述第一NF集的标识所指示的第一NF集合,所述第一验证请求消息包括所述第二网元的标识和所述第一NF集的标识;The first network element sends a first verification request message to a third network element, where the first verification request message is used to request to verify whether the second network element belongs to the first NF indicated by the identifier of the first NF set. NF set, the first verification request message includes the identifier of the second network element and the identifier of the first NF set;
    所述第三网元接收来自第一网元的第一验证请求消息;The third network element receives a first verification request message from the first network element;
    所述第三网元根据所述第二网元的标识和所述第一NF集的标识确定所述第二网元是否属于所述第一NF集合;determining, by the third network element, whether the second network element belongs to the first NF set according to the identifier of the second network element and the identifier of the first NF set;
    所述第三网元向所述第一网元发送指示信息,所述指示信息用于指示所述第二网元是否属于所述第一NF集合;The third network element sends indication information to the first network element, where the indication information is used to indicate whether the second network element belongs to the first NF set;
    所述第一网元接收来自所述第三网元的所述指示信息;receiving, by the first network element, the indication information from the third network element;
    所述第一网元根据所述指示信息确定所述第二网元是否属于所述第一NF集合;determining, by the first network element, whether the second network element belongs to the first NF set according to the indication information;
    在所述第二网元不属于所述第一NF集的情况下,所述第一网元拒绝向所述第二网元提供所述第一服务。If the second network element does not belong to the first NF set, the first network element refuses to provide the first service to the second network element.
  18. 根据权利要求17所述的方法,其特征在于,所述第三网元根据所述第二网元的标识和所述第一NF集的标识确定所述第二网元是否属于所述第一NF集合,包括:The method according to claim 17, wherein the third network element determines whether the second network element belongs to the first NF set according to the identifier of the second network element and the identifier of the first NF set. NF collections, including:
    所述第三网元根据所述第二网元的标识和所述第二网元的配置信息确定所述第二网 元所属的NF集的标识;The third network element determines the identity of the NF set to which the second network element belongs according to the identity of the second network element and the configuration information of the second network element;
    在所述第二网元所属的NF集的标识与第一NF集的标识匹配的情况下,所述第三网元确定所述第二网元属于所述第一NF集合,否则所述第三网元确定所述第二网元不属于所述第一NF集合。When the identifier of the NF set to which the second network element belongs matches the identifier of the first NF set, the third network element determines that the second network element belongs to the first NF set, otherwise the second network element The three network elements determine that the second network element does not belong to the first NF set.
  19. 根据权利要求17所述的方法,其特征在于,所述第三网元根据所述第二网元的标识和所述第一NF集的标识确定所述第二网元是否属于所述第一NF集合,包括:The method according to claim 17, wherein the third network element determines whether the second network element belongs to the first NF set according to the identifier of the second network element and the identifier of the first NF set. NF collections, including:
    所述第三网元根据所述第一NF集的标识和所述第一NF集合的配置信息确定所述第一NF集合中的NF的标识;The third network element determines the identities of the NFs in the first NF set according to the identities of the first NF set and the configuration information of the first NF set;
    在所述第一NF集合中的NF的标识包括所述第二网元的标识的情况下,所述第三网元确定所述第二网元属于所述第一NF集合,否则所述第三网元确定所述第二网元不属于所述第一NF集合。If the identifier of the NF in the first NF set includes the identifier of the second network element, the third network element determines that the second network element belongs to the first NF set, otherwise the second network element The three network elements determine that the second network element does not belong to the first NF set.
  20. 一种授权验证的方法,其特征在于,包括:A method for authorization verification, characterized by comprising:
    第一网元接收与第二网元关联的服务请求消息,所述服务请求消息用于请求所述第一网元向所述第二网元提供第一服务,所述服务请求消息包括访问令牌,所述访问令牌包括第一网络功能NF集的标识,所述第一NF集的标识用于指示所述访问令牌适用的服务请求网元;The first network element receives a service request message associated with the second network element, the service request message is used to request the first network element to provide the first service to the second network element, and the service request message includes an access token A card, the access token includes an identifier of a first network function NF set, and the identifier of the first NF set is used to indicate a service requesting network element to which the access token is applicable;
    所述第一网元向第三网元发送第二验证请求消息,所述第二验证请求消息用于请求获取所述第二网元所属的NF集的标识,所述第二验证请求消息包括所述第二网元的标识;The first network element sends a second verification request message to the third network element, where the second verification request message is used to request to obtain the identifier of the NF set to which the second network element belongs, and the second verification request message includes an identifier of the second network element;
    所述第三网元接收来自第一网元的第二验证请求消息;The third network element receives a second verification request message from the first network element;
    响应于所述第二验证请求消息,所述第三网元向所述第一网元发送第二NF集的标识,所述第二NF集为所述第二网元所属的NF集;In response to the second verification request message, the third network element sends an identifier of a second NF set to the first network element, where the second NF set is the NF set to which the second network element belongs;
    所述第一网元接收来自所述第三网元的第二NF集的标识;receiving, by the first network element, an identification of a second NF set from the third network element;
    在所述第二NF集的标识和所述第一NF集的标识不相同的情况下,所述第一网元拒绝向所述第二网元提供所述第一服务。If the identifier of the second NF set is different from the identifier of the first NF set, the first network element refuses to provide the first service to the second network element.
  21. 一种授权验证的方法,其特征在于,包括:A method for authorization verification, characterized by comprising:
    第一网元接收与第二网元关联的服务请求消息,所述服务请求消息用于请求所述第一网元向所述第二网元提供第一服务,所述服务请求消息包括访问令牌,所述访问令牌包括第一网络功能NF集的标识,所述第一NF集的标识用于指示所述访问令牌适用的服务请求网元;The first network element receives a service request message associated with the second network element, the service request message is used to request the first network element to provide the first service to the second network element, and the service request message includes an access token A card, the access token includes an identifier of a first network function NF set, and the identifier of the first NF set is used to indicate a service requesting network element to which the access token is applicable;
    所述第一网元向第三网元发送第三验证请求消息,所述第三验证请求消息用于请求获取所述第一NF集的标识所指示的第一NF集合包括的NF的标识,所述第三验证请求消息包括所述第一NF集的标识;The first network element sends a third verification request message to a third network element, where the third verification request message is used to request to obtain the identifier of the NF included in the first NF set indicated by the identifier of the first NF set, The third verification request message includes an identification of the first NF set;
    所述第三网元接收来自所述第一网元的所述第三验证请求消息;receiving, by the third network element, the third verification request message from the first network element;
    响应于所述第三验证请求消息,所述第三网元向所述第一网元发送所述第一NF集合所包括的NF的标识;In response to the third verification request message, the third network element sends the identifiers of the NFs included in the first NF set to the first network element;
    所述第一网元接收来自所述第三网元的所述第一NF集合包括的NF的标识;receiving, by the first network element, identifiers of NFs included in the first set of NFs from the third network element;
    在所述第一NF集合包括的NF的标识不包括所述第二网元的标识的情况下,所述第一网元拒绝向所述第二网元提供所述第一服务。In a case where the identifier of the NF included in the first NF set does not include the identifier of the second network element, the first network element refuses to provide the first service to the second network element.
  22. 一种授权验证的装置,其特征在于,包括:A device for authorization verification, characterized in that it includes:
    收发单元,用于接收与第二网元关联的服务请求消息,所述服务请求消息用于请求所述第一网元提供第一服务,所述服务请求消息包括访问令牌,所述访问令牌包括第一网络功能NF集的标识,所述第一NF集的标识用于指示所述访问令牌适用的服务请求网元;A transceiver unit, configured to receive a service request message associated with the second network element, the service request message is used to request the first network element to provide the first service, the service request message includes an access token, and the access token The token includes an identifier of a first network function NF set, and the identifier of the first NF set is used to indicate a service requesting network element to which the access token is applicable;
    处理单元,用于根据所述第一NF集的标识,确定是否授权所述第二网元使用所述第一服务。A processing unit, configured to determine whether to authorize the second network element to use the first service according to the identifier of the first NF set.
  23. 根据权利要求14所述的装置,其特征在于,所述处理单元具体用于:The device according to claim 14, wherein the processing unit is specifically used for:
    确定所述第二网元是否属于所述第一NF集的标识所指示的第一NF集合;determining whether the second network element belongs to the first NF set indicated by the identifier of the first NF set;
    在所述第二网元不属于所述第一NF集合的情况下,拒绝向所述第二网元提供所述第一服务。If the second network element does not belong to the first NF set, refuse to provide the first service to the second network element.
  24. 根据权利要求14或15所述的装置,其特征在于,所述收发单元具体用于:The device according to claim 14 or 15, wherein the transceiver unit is specifically used for:
    向第三网元发送第一验证请求消息,所述第一验证请求消息用于请求验证所述第二网元是否属于所述第一NF集的标识所指示的第一NF集合,所述第一验证请求消息包括所述第二网元的标识和所述第一NF集的标识;sending a first verification request message to a third network element, where the first verification request message is used to request to verify whether the second network element belongs to the first NF set indicated by the identifier of the first NF set, and the first NF set a verification request message including the identity of the second network element and the identity of the first NF set;
    接收来自所述第三网元的指示信息;receiving indication information from the third network element;
    所述处理单元具体用于:The processing unit is specifically used for:
    根据所述指示信息确定所述第二网元是否属于所述第一NF集合;determining whether the second network element belongs to the first NF set according to the indication information;
    在所述第二网元不属于所述第一NF集的情况下,拒绝向所述第二网元提供所述第一服务。If the second network element does not belong to the first NF set, refuse to provide the first service to the second network element.
  25. 根据权利要求14或15所述的装置,其特征在于,所述收发单元具体用于:The device according to claim 14 or 15, wherein the transceiver unit is specifically used for:
    向第三网元发送第二验证请求消息,所述第二验证请求消息用于请求获取所述第二网元所属的NF集的标识,所述第二验证请求消息包括所述第二网元的标识;Sending a second verification request message to a third network element, where the second verification request message is used to request to obtain the identifier of the NF set to which the second network element belongs, where the second verification request message includes the logo;
    接收来自所述第三网元的第二NF集的标识;receiving an identification of a second NF set from the third network element;
    所述处理单元具体用于:The processing unit is specifically used for:
    在所述第二NF集的标识和所述第一NF集的标识不相同的情况下,拒绝向所述第二网元提供所述第一服务。If the identifier of the second NF set is different from the identifier of the first NF set, refusing to provide the first service to the second network element.
  26. 根据权利要求14或15所述的装置,其特征在于,所述收发单元具体用于:The device according to claim 14 or 15, wherein the transceiver unit is specifically used for:
    向第三网元发送第三验证请求消息,所述第三验证请求消息用于请求获取所述第一NF集的标识所指示的第一NF集合包括的NF的标识,所述第三验证请求消息包括所述第一NF集的标识;Sending a third verification request message to a third network element, where the third verification request message is used to request to obtain the identity of the NF included in the first NF set indicated by the identity of the first NF set, the third verification request the message includes an identification of said first set of NFs;
    接收来自所述第三网元的所述第一NF集合包括的NF的标识;receiving identities of NFs included in the first set of NFs from the third network element;
    所述处理单元具体用于:The processing unit is specifically used for:
    在所述第一NF集合包括的NF的标识不包括所述第二网元的标识的情况下,拒绝向所述第二网元提供所述第一服务。Refusing to provide the first service to the second network element when the identifiers of the NFs included in the first NF set do not include the identifier of the second network element.
  27. 根据权利要求16至18中任一项所述的装置,其特征在于,所述第三网元为网络存储功能网元。The device according to any one of claims 16 to 18, wherein the third network element is a network storage function network element.
  28. 根据权利要求15所述的装置,其特征在于,所述处理单元具体用于:The device according to claim 15, wherein the processing unit is specifically used for:
    根据配置信息和所述第二网元的标识,确定所述第二网元是否属于所述第一NF集合,所述配置信息包括所述第一NF集合中的NF的标识和/或所述第二网元所属的NF集的标识。According to the configuration information and the identifier of the second network element, determine whether the second network element belongs to the first NF set, the configuration information includes the identifier of the NF in the first NF set and/or the An identifier of the NF set to which the second network element belongs.
  29. 根据权利要求14至20中任一项所述的装置,其特征在于,所述收发单元还用于:The device according to any one of claims 14 to 20, wherein the transceiver unit is also used for:
    从所述第二网元的证书中获取所述第二网元的标识;或者,Obtain the identity of the second network element from the certificate of the second network element; or,
    从服务通信代理网元接收所述第二网元的客户端凭证声明CCA,其中,所述CCA中包括所述第二网元的标识;或者,Receive the client certificate statement CCA of the second network element from the service communication proxy network element, wherein the CCA includes the identifier of the second network element; or,
    从所述服务请求消息中获取所述第二网元的标识。Obtain the identifier of the second network element from the service request message.
  30. 根据权利要求14至21中任一项所述的装置,其特征在于,所述访问令牌还包括第四网元的标识,所述第四网元的标识用于指示所述访问令牌由所述第四网元请求获得的,且所述第四网元属于所述第一NF集的标识所指示的第一NF集合;The device according to any one of claims 14 to 21, wherein the access token further includes an identifier of a fourth network element, and the identifier of the fourth network element is used to indicate that the access token is issued by The fourth network element requests to obtain, and the fourth network element belongs to the first NF set indicated by the identifier of the first NF set;
    所述处理单元还用于:The processing unit is also used for:
    确定所述第二网元的标识与所述第四网元的标识不同。It is determined that the identifier of the second network element is different from the identifier of the fourth network element.
  31. 根据权利要求14至22中任一项所述的装置,其特征在于,所述处理单元还用于:The device according to any one of claims 14 to 22, wherein the processing unit is further configured to:
    在确定所述第二网元属于所述第一NF集的标识所指示的第一NF集合的情形下,保存所述第二网元的标识和所述第一NF集的标识的关联关系。In a case where it is determined that the second network element belongs to the first NF set indicated by the identifier of the first NF set, storing an association relationship between the identifier of the second network element and the identifier of the first NF set.
  32. 根据权利要求14至23中任一项所述的装置,其特征在于,所述访问令牌还包括其他验证条件,所述处理单元还用于:The device according to any one of claims 14 to 23, wherein the access token further includes other verification conditions, and the processing unit is further configured to:
    根据所述其他验证条件,确定是否授权所述第二网元使用所述第一服务,其中,所述其他验证条件包括以下一个或者多个:Determine whether to authorize the second network element to use the first service according to the other verification conditions, where the other verification conditions include one or more of the following:
    服务提供者的NF实例标识、服务提供者的NF类型、服务提供者的单网络切片选择辅助信息、服务提供者的网络切片实例标识、服务提供者所属的NF集的标识、所述第一服务的服务名、所述访问令牌的有效时间。The NF instance identifier of the service provider, the NF type of the service provider, the single network slice selection auxiliary information of the service provider, the network slice instance identifier of the service provider, the identifier of the NF set to which the service provider belongs, the first service The service name of the , the valid time of the access token.
  33. 根据权利要求24所述的装置,其特征在于,所述处理单元具体用于:The device according to claim 24, wherein the processing unit is specifically used for:
    当所述第二网元属于所述第一NF集的标识所指示的第一NF集合,且所述其他验证条件验证通过时,授权所述第二网元使用所述第一服务。Authorize the second network element to use the first service when the second network element belongs to the first NF set indicated by the identifier of the first NF set and the other verification conditions pass the verification.
  34. 根据权利要求24所述的装置,其特征在于,所述处理单元具体用于:The device according to claim 24, wherein the processing unit is specifically used for:
    当所述第二网元不属于所述第一NF集的标识所指示的第一NF集,和/或所述其他验证条件中的任意一项验证不通过时,拒绝向所述第二网元提供服务。When the second network element does not belong to the first NF set indicated by the identity of the first NF set, and/or any one of the other verification conditions fails to pass the verification, reject the request to the second network element yuan to provide services.
  35. 一种通信装置,其特征在于,包括:A communication device, characterized by comprising:
    收发单元,用于来自第一网元的第一验证请求消息,所述第一验证请求消息包括所述第二网元的标识和所述第一NF集的标识,所述第一验证请求消息用于请求验证所述第二网元是否属于所述第一NF集的标识所指示的第一NF集合;A transceiver unit, configured to send a first verification request message from a first network element, where the first verification request message includes the identifier of the second network element and the identifier of the first NF set, and the first verification request message Used to request to verify whether the second network element belongs to the first NF set indicated by the identifier of the first NF set;
    处理单元,用于根据所述第二网元的标识和所述第一NF集的标识确定所述第二网元是否属于所述第一NF集合;a processing unit, configured to determine whether the second network element belongs to the first NF set according to the identifier of the second network element and the identifier of the first NF set;
    所述收发单元,还用于向所述第一网元发送指示信息,所述指示信息用于指示所述第二网元是否属于所述第一NF集合。The transceiving unit is further configured to send indication information to the first network element, where the indication information is used to indicate whether the second network element belongs to the first NF set.
  36. 根据权利要求35所述的装置,其特征在于,所述处理单元,具体用于:The device according to claim 35, wherein the processing unit is specifically used for:
    根据所述第二网元的标识和所述第二网元的配置信息确定所述第二网元所属的NF集的标识;determining the identity of the NF set to which the second network element belongs according to the identity of the second network element and the configuration information of the second network element;
    在所述第二网元所属的NF集的标识与第一NF集的标识匹配的情况下,确定所述第二网元属于所述第一NF集合,否则所述第三网元确定所述第二网元不属于所述第一NF 集合。If the identifier of the NF set to which the second network element belongs matches the identifier of the first NF set, it is determined that the second network element belongs to the first NF set; otherwise, the third network element determines that the The second network element does not belong to the first NF set.
  37. 根据权利要求35所述的装置,其特征在于,所述处理单元,具体用于:The device according to claim 35, wherein the processing unit is specifically used for:
    根据所述第一NF集的标识和所述第一NF集合的配置信息确定所述第一NF集合中的NF的标识;determining the identities of the NFs in the first NF set according to the identities of the first NF set and the configuration information of the first NF set;
    在所述第一NF集合中的NF的标识包括所述第二网元的标识的情况下,确定所述第二网元属于所述第一NF集合,否则所述第三网元确定所述第二网元不属于所述第一NF集合。If the identifier of the NF in the first NF set includes the identifier of the second network element, determine that the second network element belongs to the first NF set; otherwise, the third network element determines that the The second network element does not belong to the first NF set.
  38. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,当所述计算机程序在计算机上运行时,使得计算机执行如权利要求1至13中任一项所述的方法,或者执行如权利要求14至16中任一项所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, and when the computer program is run on a computer, the computer executes the computer program described in any one of claims 1 to 13. method, or perform a method as claimed in any one of claims 14 to 16.
  39. 一种计算机程序产品,其特征在于,包括计算机程序指令,所述计算机程序指令在计算机上运行时,使得计算机执行如权利要求1至13中任一项所述的方法,或者执行如权利要求14至16中任一项所述的方法。A computer program product, characterized in that it includes computer program instructions, and when the computer program instructions run on a computer, the computer executes the method according to any one of claims 1 to 13, or executes the method according to claim 14. The method described in any one of to 16.
  40. 一种通信装置,其特征在于,包括至少一个处理器,所述至少一个处理器用于执行存储在存储器中的计算机程序或指令,以执行如权利要求1至13中任一项所述的方法,或者执行如权利要求14至16中任一项所述的方法。A communication device, characterized in that it comprises at least one processor, and the at least one processor is configured to execute computer programs or instructions stored in a memory to perform the method according to any one of claims 1 to 13, Or perform the method as described in any one of claims 14-16.
PCT/CN2022/110535 2021-08-06 2022-08-05 Authorization verification method and apparatus WO2023011630A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110904483.8A CN115706997A (en) 2021-08-06 2021-08-06 Authorization verification method and device
CN202110904483.8 2021-08-06

Publications (1)

Publication Number Publication Date
WO2023011630A1 true WO2023011630A1 (en) 2023-02-09

Family

ID=85154839

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/110535 WO2023011630A1 (en) 2021-08-06 2022-08-05 Authorization verification method and apparatus

Country Status (2)

Country Link
CN (1) CN115706997A (en)
WO (1) WO2023011630A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116629864B (en) * 2023-04-27 2024-04-16 北京熠智科技有限公司 API service charging method, platform and storage medium under privacy computing scene

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102164055A (en) * 2011-02-23 2011-08-24 华为技术有限公司 Detection processing method and device for signaling connection control part (SCCP) loop
CN111865598A (en) * 2019-04-28 2020-10-30 华为技术有限公司 Identity verification method and related device for network function service
CN111935756A (en) * 2019-05-13 2020-11-13 华为技术有限公司 Data transmission method, device and equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102164055A (en) * 2011-02-23 2011-08-24 华为技术有限公司 Detection processing method and device for signaling connection control part (SCCP) loop
CN111865598A (en) * 2019-04-28 2020-10-30 华为技术有限公司 Identity verification method and related device for network function service
CN111935756A (en) * 2019-05-13 2020-11-13 华为技术有限公司 Data transmission method, device and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
HUAWEI, HISILICON: "New solution for service access authorization within a NF Set", 3GPP DRAFT; S3-191674, 3RD GENERATION PARTNERSHIP PROJECT (3GPP), MOBILE COMPETENCE CENTRE ; 650, ROUTE DES LUCIOLES ; F-06921 SOPHIA-ANTIPOLIS CEDEX ; FRANCE, vol. SA WG3, no. Reno (US); 20190506 - 20190510, 9 May 2019 (2019-05-09), Mobile Competence Centre ; 650, route des Lucioles ; F-06921 Sophia-Antipolis Cedex ; France , XP051736533 *

Also Published As

Publication number Publication date
CN115706997A (en) 2023-02-17

Similar Documents

Publication Publication Date Title
US20220337995A1 (en) Apparatus and method for providing subscription data to non-subscriber registered terminal in wireless communication system
CN112566149B (en) Method for configuring service, communication device and communication system
CN110786034A (en) Privacy considerations for network slice selection
WO2021136211A1 (en) Method and device for determining authorization result
CN113498217A (en) Communication method and communication device
US20230087407A1 (en) Authentication and authorization method and apparatus
WO2022247812A1 (en) Authentication method, communication device, and system
CN113676904B (en) Slice authentication method and device
WO2022199451A1 (en) Session switching method and apparatus
WO2023011630A1 (en) Authorization verification method and apparatus
CN116723507B (en) Terminal security method and device for edge network
WO2023246942A1 (en) Communication method and apparatus
WO2023016160A1 (en) Session establishment method and related apparatus
CN114640988B (en) Information processing method and device based on implicit indication encryption
CN116528234B (en) Virtual machine security and credibility verification method and device
WO2023213191A1 (en) Security protection method and communication apparatus
WO2024067619A1 (en) Communication method and communication apparatus
WO2024032226A1 (en) Communication method and communication apparatus
WO2023147767A1 (en) Method and apparatus for verifying network
WO2023169206A1 (en) Authorization verification method and device
WO2024037215A1 (en) Communication method and apparatus
WO2023142097A1 (en) User equipment-to-network relay security for proximity based services
WO2024032218A1 (en) Communication method and communication apparatus
US20240129710A1 (en) Methods and apparatus for subscription authorization enhancement
US20230354028A1 (en) Method, system, and apparatus for generating key for inter-device communication

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: 22852341

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE