[go: up one dir, main page]

CN116782228A - Authorization verification methods and devices - Google Patents

Authorization verification methods and devices Download PDF

Info

Publication number
CN116782228A
CN116782228A CN202210237627.3A CN202210237627A CN116782228A CN 116782228 A CN116782228 A CN 116782228A CN 202210237627 A CN202210237627 A CN 202210237627A CN 116782228 A CN116782228 A CN 116782228A
Authority
CN
China
Prior art keywords
service
network
information
public mobile
mobile communication
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202210237627.3A
Other languages
Chinese (zh)
Inventor
李飞
何承东
张博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202210237627.3A priority Critical patent/CN116782228A/en
Priority to PCT/CN2023/077414 priority patent/WO2023169206A1/en
Publication of CN116782228A publication Critical patent/CN116782228A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/60Context-dependent security
    • H04W12/69Identity-dependent

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请实施例提供了一种授权验证的方法,该方法包括:第一网元接收来自第二网络功能NF的服务请求消息,该第二NF位于第二陆地公用移动通信网络PLMN,该服务请求消息用于请求位于第一PLMN的第一NF向该第二NF提供第一服务,该服务请求消息包括访问令牌、请求的目的和该第二PLMN的标识符,该访问令牌包括PLMN标识符和互联目的;该第一网元执行该第二NF使用该第一服务的授权,在该执行授权之前,确定该第二PLMN的标识符与该访问令牌中的PLMN标识符相同,以及该请求的目的与该互联目的相同。基于该方案,可以提高访问控制的安全性,进而保证服务消费者在互联场景中合法地获取服务。

The embodiment of the present application provides a method for authorization verification. The method includes: the first network element receives a service request message from the second network function NF. The second NF is located in the second terrestrial public mobile communication network PLMN. The service request message The message is used to request the first NF located in the first PLMN to provide the first service to the second NF. The service request message includes an access token, the purpose of the request and the identifier of the second PLMN. The access token includes the PLMN identifier. and interconnection purposes; the first network element performs the authorization of the second NF to use the first service, and before performing the authorization, determines that the identifier of the second PLMN is the same as the PLMN identifier in the access token, and The purpose of the request is the same as the purpose of the interconnection. Based on this solution, the security of access control can be improved, thereby ensuring that service consumers can obtain services legally in Internet scenarios.

Description

授权验证的方法和装置Authorization verification methods and devices

技术领域Technical field

本申请实施例涉及通信技术领域,尤其涉及一种授权验证的方法及装置。The embodiments of the present application relate to the field of communication technology, and in particular, to an authorization verification method and device.

背景技术Background technique

第五代(5th generation,5G)服务化系统架构中,基于服务化接口通信的双方分别称为服务消费者(service consumer)和服务提供者(service producer)。其中,请求服务的一方称为服务消费者(也可以称为服务请求网元),提供服务的一方称为服务提供者(也可以称为服务提供网元)。网络功能(network function,NF)服务消费者向NF服务提供者请求服务时,NF服务提供者需要对NF服务消费者请求的服务进行授权检查In the fifth generation (5G) service-oriented system architecture, the two parties communicating based on the service-oriented interface are called service consumers and service producers respectively. Among them, the party requesting services is called a service consumer (also called a service requesting network element), and the party providing services is called a service provider (also called a service providing network element). When a network function (NF) service consumer requests services from an NF service provider, the NF service provider needs to perform authorization checks on the services requested by the NF service consumer.

在互联场景中,不同运营商网络之间并不是直接相连的,在与其他运营商的网络连接处使用安全边缘保护代理(security edge protection proxies,SEPP),以维护自身网络的安全性。例如,当运营商A的NF服务消费者向运营商B的NF服务提供者请求服务时,SEPP会验证运营商A和运营商B是否能够进行通信,但是关于访问控制的安全性有待进一步提高。In the interconnection scenario, the networks of different operators are not directly connected. Security edge protection proxies (SEPP) are used at the network connections with other operators to maintain the security of their own networks. For example, when the NF service consumer of operator A requests services from the NF service provider of operator B, SEPP will verify whether operator A and operator B can communicate, but the security of access control needs to be further improved.

发明内容Contents of the invention

本申请实施例提供一种授权验证的方法和装置,可以提高访问控制的安全性,保证NF服务消费者在互联场景中合法地获取服务。The embodiments of this application provide an authorization verification method and device, which can improve the security of access control and ensure that NF service consumers can obtain services legally in Internet scenarios.

第一方面,提供了一种授权验证的方法,该方法包括:第一网元接收来自第二网络功能(network function,NF)的服务请求消息,所述第二NF位于第二陆地公用移动通信网络(public land mobile network,PLMN),所述服务请求消息用于请求位于第一PLMN的第一NF向所述第二NF提供第一服务,所述服务请求消息包括访问令牌、请求的目的(purposeof request)和所述第二PLMN的标识符,所述访问令牌包括PLMN标识符和互联目的(interconnect purpose);所述第一网元执行所述第二NF使用所述第一服务的授权,在所述执行授权之前,确定所述第二PLMN的标识符与所述访问令牌中的PLMN标识符相同,以及所述请求的目的与所述互联目的相同。In a first aspect, an authorization verification method is provided. The method includes: a first network element receiving a service request message from a second network function (NF), the second NF is located in a second land public mobile communication Network (public land mobile network, PLMN), the service request message is used to request the first NF located in the first PLMN to provide the first service to the second NF. The service request message includes an access token and the purpose of the request. (purpose of request) and the identifier of the second PLMN, the access token includes the PLMN identifier and interconnect purpose; the first network element executes the second NF using the first service Authorization, before performing the authorization, it is determined that the identifier of the second PLMN is the same as the PLMN identifier in the access token, and the purpose of the request is the same as the interconnection purpose.

其中,该第二NF可以是一种服务请求网元,该第一网元可以是位于第一PLMN的第一SEPP,也可以是位于第二PLMN的第二SEPP,还可以是一种服务提供网元。The second NF may be a service requesting network element, and the first network element may be a first SEPP located in the first PLMN, a second SEPP located in the second PLMN, or a service providing network element. network element.

基于上述方案,NF服务消费者向NF服务提供者请求第一服务的过程中,第一网元可以根据服务请求消息中携带的访问令牌中的PLMN的标识符和互联目的对NF服务消费者进行授权验证,即验证NF服务消费者是否被授权使用请求的服务。具体的,访问令牌中的PLMN标识符所指示的网络中的NF服务消费者能够以互联目的使用NF服务提供者的服务,其他网络中的NF服务消费者不能够以互联目的使用NF服务提供者的服务,进而保证NF服务消费者在互联场景中合法地获取服务。Based on the above solution, when the NF service consumer requests the first service from the NF service provider, the first network element can request the NF service consumer based on the PLMN identifier and interconnection purpose in the access token carried in the service request message. Perform authorization verification, that is, verify whether the NF service consumer is authorized to use the requested service. Specifically, NF service consumers in the network indicated by the PLMN identifier in the access token can use the services of the NF service provider for interconnection purposes, while NF service consumers in other networks cannot use the NF service provider for interconnection purposes. service, thereby ensuring that NF service consumers can obtain services legally in the Internet scenario.

同时,通过确定服务请求消息中的请求的目的与访问令牌中的互联目的相同,保证该访问令牌用于互联场景中,从而可以防止访问令牌的滥用。At the same time, by determining that the purpose of the request in the service request message is the same as the interconnection purpose in the access token, it is ensured that the access token is used in interconnection scenarios, thereby preventing the abuse of the access token.

另外,本申请提供的方案可以进行更细粒度的访问控制,例如,在一些情况下,两个PLMN之间可以进行通信,但是某个NF服务提供者不能在互联场景下为NF服务消费者提供服务,第一SEPP(或第二SEPP)可以拒绝该NF服务消费者请求的服务。也就是说,按照传统的方案,由于两个PLMN之间可以进行通信,NF服务消费者的服务请求消息应该被转发至NF服务提供者,但是本申请的方案还可以基于访问令牌中的PLMN标识符和互联目的对NF服务消费者进行授权验证,如果验证不通过,就可以拒绝转发该服务请求消息或者直接拒绝NF服务消费者的服务请求。In addition, the solution provided by this application can perform more fine-grained access control. For example, in some cases, communication can be carried out between two PLMNs, but a certain NF service provider cannot provide NF service consumers in an interconnection scenario. Service, the first SEPP (or second SEPP) can deny the service requested by the NF service consumer. That is to say, according to the traditional solution, since communication can be carried out between two PLMNs, the service request message of the NF service consumer should be forwarded to the NF service provider. However, the solution of this application can also be based on the PLMN in the access token. The identifier and interconnection purpose perform authorization verification on the NF service consumer. If the verification fails, the service request message can be refused to be forwarded or the service request of the NF service consumer can be directly rejected.

该第一网元执行该第二NF使用第一服务的授权的具体表现形式可以是:当第一网元为第二NF时,在授权所述第二NF使用该第一服务的情况下,所述第二NF向该第一NF提供所述第一服务;或者,当第一网元为位于第一PLMN的第一SEPP或位于第二PLMN的第二SEPP时,第一网元转发该服务请求消息。The specific expression of the authorization of the first network element to perform the second NF to use the first service may be: when the first network element is the second NF, in the case of authorizing the second NF to use the first service, The second NF provides the first service to the first NF; or, when the first network element is the first SEPP located in the first PLMN or the second SEPP located in the second PLMN, the first network element forwards the Service request message.

该服务请求消息与第二NF相关联。例如,在一种可能的场景下,第一网元可以从第二NF直接接收该服务请求消息;在另一种可能的场景下,第一网元可以从第二SEPP元接收该服务请求消息,其中,该第二SEPP可以是从第二NF直接接收该服务请求消息;在又一种可能的场景下,第一网元可以从第一SEPP接收该服务请求消息,其中,该第一SEPP可以是从第二SEPP接收到的该服务请求消息,该第二SEPP可以是从第二NF直接接收该服务请求消息。The service request message is associated with the second NF. For example, in one possible scenario, the first network element can directly receive the service request message from the second NF; in another possible scenario, the first network element can receive the service request message from the second SEPP element. , wherein the second SEPP may directly receive the service request message from the second NF; in yet another possible scenario, the first network element may receive the service request message from the first SEPP, where the first SEPP The service request message may be received from the second SEPP, and the second SEPP may directly receive the service request message from the second NF.

应理解,该访问令牌中的信息已经被授权,第一网元可以基于访问令牌内的信息验证该服务请求消息,执行该第二NF使用第一服务的授权或拒绝该第二NF使用第一服务。It should be understood that the information in the access token has been authorized, and the first network element can verify the service request message based on the information in the access token, perform authorization for the second NF to use the first service, or deny use of the second NF. First service.

应理解,该访问令牌受到了安全保护,例如完整性保护,从而可以避免恶意的NF服务消费者对该访问令牌内的信息进行篡改。It should be understood that the access token is subject to security protection, such as integrity protection, thereby preventing malicious NF service consumers from tampering with the information in the access token.

应理解,可以对访问令牌包括的全部信息进行验证,当访问令牌中的全部信息均验证通过时,可以授权服务请求网元使用服务提供网元的第一服务。It should be understood that all information included in the access token can be verified. When all information in the access token is verified successfully, the service requesting network element can be authorized to use the service to provide the first service of the network element.

结合第一方面,在一种可能的实现方式中,所述服务请求消息进一步包括第二NF的信息,所述访问令牌进一步包括NF的信息;在所述执行授权之前,进一步包括:所述第一网元确定所述第二NF的信息与所述NF的信息相同。Combined with the first aspect, in a possible implementation, the service request message further includes information of the second NF, and the access token further includes information of the NF; before the execution authorization, further includes: The first network element determines that the information of the second NF is the same as the information of the NF.

访问令牌中的NF的信息可以指示该访问令牌在互联场景下适用的服务请求网元(NF服务消费者)的信息,例如,NF类型、NF实例ID等。访问令牌适用的服务请求网元具体可以是指适用的服务请求网元可能使用该访问令牌以获取服务,或者说不是所述适用的服务请求网元范围内的网元都不可以使用该访问令牌以获取服务。The NF information in the access token can indicate the information of the service requesting network element (NF service consumer) to which the access token is applicable in the interconnection scenario, for example, NF type, NF instance ID, etc. The service requesting network element to which the access token is applicable may specifically mean that the applicable service requesting network element may use the access token to obtain services, or that no network element within the scope of the applicable service requesting network element may use the access token. Access token to obtain services.

基于上述技术方案,第二NF向第一NF请求第一服务的过程中,第一网元可以根据服务请求消息中携带的访问令牌中的PLMN的标识符、互联目的和NF的信息,对第二NF使用第一服务进行授权,保证第二NF为该访问令牌在互联场景中适用的服务请求网元,从而可以防止访问令牌的滥用,进而保证NF服务消费者在互联场景中合法地获取服务。Based on the above technical solution, during the process when the second NF requests the first service from the first NF, the first network element can perform the request based on the PLMN identifier, interconnection purpose and NF information in the access token carried in the service request message. The second NF uses the first service for authorization to ensure that the second NF requests the network element for the service applicable to the access token in the interconnection scenario, thereby preventing the abuse of the access token and ensuring that the NF service consumer is legal in the interconnection scenario. to obtain services.

结合第一方面,在一种可能的实现方式中,所述服务请求消息进一步包括所述第一服务的信息,所述访问令牌包括服务的信息;在所述执行授权之前,进一步包括:所述第一网元确定所述第一服务的信息与所述服务的信息相同。In conjunction with the first aspect, in a possible implementation, the service request message further includes information about the first service, and the access token includes information about the service; before the execution authorization, further includes: The first network element determines that the information of the first service is the same as the information of the service.

访问令牌中的服务的信息可以指示该访问令牌在互联场景下适用的服务,可以理解,当服务请求消息请求该适用的服务时,可以使用该访问令牌以获取服务。或者,当服务请求消息所请求的服务不属于该适用的服务时,不可以使用该访问令牌以获取服务。The service information in the access token can indicate the applicable service of the access token in the Internet scenario. It can be understood that when the service request message requests the applicable service, the access token can be used to obtain the service. Alternatively, when the service requested by the service request message does not belong to the applicable service, the access token may not be used to obtain the service.

基于上述技术方案,第二NF向第一NF请求第一服务的过程中,第一网元可以根据服务请求消息中携带的访问令牌中的PLMN的标识符、互联目的、NF的信息和服务的信息,对第二NF使用第一服务进行授权验证,进一步保证第二NF请求的服务为在互联场景下适用的服务,进而可以保证NF服务消费者在互联场景中合法地获取服务。Based on the above technical solution, when the second NF requests the first service from the first NF, the first network element can use the PLMN identifier, interconnection purpose, NF information and services in the access token carried in the service request message. Information, the second NF uses the first service for authorization verification, further ensuring that the service requested by the second NF is a service applicable in the interconnection scenario, and thus ensuring that the NF service consumer can obtain the service legally in the interconnection scenario.

结合第一方面,在一种可能的实现方式中,所述第一网元拒绝所述第二NF使用所述第一服务,在所述拒绝之前,确定所述第二PLMN的标识符与所述访问令牌中的PLMN标识符不相同,和/或所述请求的目的与所述互联目的不相同。In conjunction with the first aspect, in a possible implementation manner, the first network element refuses the second NF to use the first service, and before the refusal, determines that the identifier of the second PLMN is the same as the identifier of the second PLMN. The PLMN identifier in the access token is different, and/or the purpose of the request is different from the interconnection purpose.

基于上述技术方案,第二NF向第一NF请求第一服务的过程中,第一网元可以根据服务请求消息中携带的访问令牌中的PLMN的标识符、互联目的,拒绝第二NF使用第一服务,从而可以防止恶意的NF服务消费者在互联场景中不合法地获取服务。Based on the above technical solution, when the second NF requests the first service from the first NF, the first network element can refuse the use of the second NF based on the PLMN identifier and interconnection purpose in the access token carried in the service request message. First service, thus preventing malicious NF service consumers from illegally obtaining services in Internet scenarios.

结合第一方面,在一种可能的实现方式中,所述服务请求消息进一步包括第二NF的信息,所述访问令牌进一步包括NF的信息;所述方法进一步包括:所述第一网元拒绝所述第二NF使用所述第一服务,在所述拒绝之前,确定所述第二PLMN的标识符与所述访问令牌中的PLMN标识符不相同,和/或所述请求的目的与所述互联目的不相同,和/或所述第二NF的信息与所述NF的信息不相同。With reference to the first aspect, in a possible implementation, the service request message further includes information of the second NF, and the access token further includes information of the NF; the method further includes: the first network element denying the second NF the use of the first service, prior to the denial, determining that the identifier of the second PLMN is not the same as the PLMN identifier in the access token, and/or the purpose of the request The purpose of the interconnection is different, and/or the information of the second NF is different from the information of the NF.

基于上述技术方案,第二NF向第一NF请求第一服务的过程中,第一网元可以根据服务请求消息中携带的访问令牌中的PLMN的标识符、互联目的和NF的信息,对第二NF使用第一服务进行授权验证,从而可以防止恶意的NF服务消费者在互联场景中不合法地获取服务。Based on the above technical solution, during the process when the second NF requests the first service from the first NF, the first network element can perform the request based on the PLMN identifier, interconnection purpose and NF information in the access token carried in the service request message. The second NF uses the first service for authorization verification, thereby preventing malicious NF service consumers from illegally obtaining services in the Internet scenario.

结合第一方面,在一种可能的实现方式中,所述服务请求消息进一步包括第二NF的信息以及所述第一服务的信息,所述访问令牌进一步包括NF的信息以及服务的信息;所述方法进一步包括:所述第一网元拒绝所述第二NF使用所述第一服务,在所述拒绝之前,确定所述第二PLMN的标识符与所述访问令牌中的PLMN标识符不相同,和/或所述请求的目的与所述互联目的不相同,和/或所述第二NF的信息与所述NF的信息不相同,和/或所述第一服务的信息与所述服务的信息不相同。In conjunction with the first aspect, in a possible implementation, the service request message further includes information about the second NF and information about the first service, and the access token further includes information about the NF and information about the service; The method further includes: the first network element rejects the second NF to use the first service, and before the rejection, determines the identifier of the second PLMN and the PLMN identifier in the access token. The identifiers are different, and/or the purpose of the request is different from the interconnection purpose, and/or the information of the second NF is different from the information of the NF, and/or the information of the first service is different from the information of the first service. The information for the services described is not the same.

基于上述技术方案,第二NF向第一NF请求第一服务的过程中,第一网元可以根据服务请求消息中携带的访问令牌中的PLMN的标识符、互联目的、NF的信息和服务的信息,对第二NF使用第一服务进行授权,从而可以防止恶意的NF服务消费者在互联场景中不合法地获取服务。Based on the above technical solution, when the second NF requests the first service from the first NF, the first network element can use the PLMN identifier, interconnection purpose, NF information and services in the access token carried in the service request message. information to authorize the second NF to use the first service, thereby preventing malicious NF service consumers from illegally obtaining services in the Internet scenario.

结合第一方面,在一种可能的实现方式中,所述第一网元为:所述第一NF,所述第一PLMN的SEPP,或者,所述第二PLMN的SEPP。With reference to the first aspect, in a possible implementation manner, the first network element is: the first NF, the SEPP of the first PLMN, or the SEPP of the second PLMN.

第二方面,提供了一种发送访问令牌的方法,该方法包括:位于第一PLMN的第一网络存储功能(NF repository function,NRF)接收位于所述第一PLMN的第一NF的注册请求,所述注册请求包括互联目的下允许访问的PLMN列表,所述PLMN列表包括第二PLMN;所述第一NRF完成对所述第一NF的注册;所述第一NRF接收来自第二NF的第一请求消息,所述第二NF位于所述第二PLMN,所述第一请求消息用于请求访问令牌,所述访问令牌用于访问位于所述第一PLMN的第一NF的第一服务,所述第一请求消息包括所述第二PLMN的标识符和所述互联目的;响应于所述第一请求消息,所述第一NRF生成所述访问令牌,所述访问令牌包括所述第二PLMN的标识符和所述互联目的;所述第一NRF向所述第二NF发送所述访问令牌。In a second aspect, a method of sending an access token is provided. The method includes: a first network storage function (NF repository function, NRF) located in a first PLMN receiving a registration request from a first NF located in the first PLMN. , the registration request includes a list of PLMNs that are allowed to be accessed for interconnection purposes, and the PLMN list includes the second PLMN; the first NRF completes the registration of the first NF; the first NRF receives the The first request message, the second NF is located in the second PLMN, the first request message is used to request an access token, the access token is used to access the first NF located in the first PLMN. A service, the first request message includes the identifier of the second PLMN and the interconnection purpose; in response to the first request message, the first NRF generates the access token, the access token including the identifier of the second PLMN and the interconnection purpose; the first NRF sends the access token to the second NF.

该第一NF可以是NF服务提供者,该第二NF可以是NF服务消费者。第一NF在为第二NF提供服务之前,在向第一NRF注册的过程中,针对互联场景,携带允许访问的PLMN的标识符。第二NF可以向第一NRF请求访问令牌,如果第二NF所在的PLMN的标识符属于该允许访问的PLMN的标识符,则第一NRF生成携带该第二PLMN的标识符以及互联目的的访问令牌,并发送给第二NF。The first NF may be an NF service provider and the second NF may be an NF service consumer. Before the first NF provides services to the second NF, during the registration process with the first NRF, for the interconnection scenario, it carries the identifier of the PLMN that is allowed to access. The second NF may request an access token from the first NRF. If the identifier of the PLMN where the second NF is located belongs to the identifier of the PLMN that is allowed to access, the first NRF generates a token carrying the identifier of the second PLMN and the purpose of the interconnection. Access token and sent to second NF.

基于上述技术方案,第二NF向第一NRF请求访问令牌的过程中,可以根据第一NF在注册请求中携带的互联目的下允许访问的PLMN的标识符对第二NF进行授权。具体地,在确定第二PLMN的标识符属于该互联目的下允许访问的PLMN的标识符的情况下,第一NRF可以向第二NF发送访问令牌,该访问令牌可以用于在互联场景下访问第一NF的服务,从而可以保证NF服务消费者在互联场景中合法地获取服务。Based on the above technical solution, when the second NF requests an access token from the first NRF, the second NF can be authorized based on the identifier of the PLMN that is allowed to be accessed for the purpose of interconnection carried by the first NF in the registration request. Specifically, when it is determined that the identifier of the second PLMN belongs to the identifier of the PLMN that is allowed to be accessed under the interconnection purpose, the first NRF may send an access token to the second NF, and the access token may be used in the interconnection scenario. Next, access the service of the first NF, thereby ensuring that NF service consumers can obtain services legally in the Internet scenario.

结合第二方面,在一种可能的实现方式中,所述注册请求进一步包括:所述互联目的下允许访问所述第一NF的NF的信息;所述第一请求消息进一步包括:所述第二NF的信息;响应于所述第一请求消息,所述第一NRF生成所述访问令牌,包括:所述第一NRF确定所述互联目的下允许访问所述第一NF的NF的信息包括所述第二NF的信息;所述第一NRF生成所述访问令牌,所述访问令牌还包括所述第二NF的信息;或者,所述注册请求进一步包括:所述互联目的下允许访问所述第一NF的NF的信息,以及所述互联目的下允许被访问的服务的信息;所述第一请求消息进一步包括:所述第二NF的信息以及所述第一服务的信息;响应于所述第一请求消息,所述第一NRF生成所述访问令牌,包括:所述第一NRF确定所述互联目的下允许访问所述第一NF的NF的信息包括所述第二NF的信息,以及所述互联目的下允许被访问的服务的信息包括所述第一服务的信息;所述第一NRF生成所述访问令牌,所述访问令牌还包括所述第二NF的信息以及所述第一服务的信息。Combined with the second aspect, in a possible implementation, the registration request further includes: information about the NF that is allowed to access the first NF for the purpose of interconnection; the first request message further includes: the third Information of two NFs; in response to the first request message, the first NRF generates the access token, including: the first NRF determines the information of the NF that is allowed to access the first NF under the interconnection purpose. including the information of the second NF; the first NRF generates the access token, and the access token also includes the information of the second NF; or the registration request further includes: for the purpose of interconnection The information of the NF that is allowed to access the first NF, and the information of the services that are allowed to be accessed under the interconnection purpose; the first request message further includes: the information of the second NF and the information of the first service ; In response to the first request message, the first NRF generates the access token, including: the first NRF determines that the information of the NF that is allowed to access the first NF under the interconnection purpose includes the first The information of the two NFs and the information of the services allowed to be accessed under the interconnection purpose include the information of the first service; the first NRF generates the access token, and the access token also includes the second NF information and the first service information.

基于上述技术方案,第二NF向第一NRF请求访问令牌的过程中,可以根据第一NF在注册请求中携带的互联目的下允许访问的PLMN的标识符和允许访问第一NF的NF的信息对第二NF进行授权。具体地,在确定第二PLMN的标识符属于该互联目的下允许访问的PLMN的标识符以及第二NF的信息与该允许访问第一NF的信息相同的情况下,第一NRF可以向第二NF发送访问令牌,该访问令牌可以用于在互联场景下访问第一NF的服务,从而可以保证NF服务消费者在互联场景中合法地获取服务。Based on the above technical solution, when the second NF requests an access token from the first NRF, the identifier of the PLMN allowed to be accessed under the interconnection purpose carried by the first NF in the registration request and the identifier of the NF allowed to access the first NF can be used. The information authorizes the second NF. Specifically, when it is determined that the identifier of the second PLMN belongs to the identifier of the PLMN that is allowed to be accessed under the interconnection purpose and the information of the second NF is the same as the information that is allowed to access the first NF, the first NRF may send a request to the second PLMN. The NF sends an access token, which can be used to access the service of the first NF in the interconnection scenario, thereby ensuring that the NF service consumer can obtain services legally in the interconnection scenario.

或者,可以根据第一NF在注册请求中携带的互联目的下允许访问的PLMN的标识符、允许访问第一NF的NF的信息和允许被访问的服务的信息对第二NF进行授权。具体地,在确定第二PLMN的标识符属于该互联目的下允许访问的PLMN的标识符、第二NF的信息与该允许访问第一NF的信息相同、以及第一服务与该允许被访问的服务的信息相同的情况下,第一NRF可以向第二NF发送访问令牌,该访问令牌可以用于在互联场景下访问第一NF的服务,从而可以保证NF服务消费者在互联场景中合法地获取服务。Alternatively, the second NF may be authorized based on the identifier of the PLMN that is allowed to be accessed for interconnection purposes carried by the first NF in the registration request, the information of the NF that is allowed to access the first NF, and the information of the service that is allowed to be accessed. Specifically, after it is determined that the identifier of the second PLMN belongs to the identifier of the PLMN that is allowed to be accessed under the interconnection purpose, the information of the second NF is the same as the information of the first NF that is allowed to be accessed, and the first service is the same as the information that is allowed to be accessed. When the service information is the same, the first NRF can send an access token to the second NF. This access token can be used to access the service of the first NF in the interconnection scenario, thus ensuring that the NF service consumer is in the interconnection scenario. Obtain services legally.

第三方面,提供了一种服务授权方法,该方法包括:安全边缘保护代理SEPP接收来自第二NF的服务请求消息,所述第二NF位于第二PLMN,所述服务请求消息用于请求位于第一PLMN的第一NF向所述第二NF提供第一服务;所述SEPP根据配置的参数执行所述第二NF使用所述第一服务的授权,所述配置的参数包括互联目的下允许访问所述第一NF的NF的信息,在所述执行授权之前,确定所述互联目的下允许访问所述第一NF的NF的信息包括所述第二NF的信息。In a third aspect, a service authorization method is provided. The method includes: the security edge protection proxy SEPP receives a service request message from the second NF, the second NF is located in the second PLMN, and the service request message is used to request that the service authorization message is located in the second PLMN. The first NF of the first PLMN provides the first service to the second NF; the SEPP performs the authorization of the second NF to use the first service according to configured parameters, and the configured parameters include permission for interconnection purposes. To access the information of the NF of the first NF, before the execution authorization, it is determined that the information of the NF that is allowed to access the first NF under the interconnection purpose includes the information of the second NF.

应理解,该SEPP可以是位于第一PLMN的第一SEPP,也可以是位于第二PLMN的第二SEPP。例如,图6所示实施例中的第一SEPP或第二SEPP。It should be understood that the SEPP may be a first SEPP located in the first PLMN or a second SEPP located in the second PLMN. For example, the first SEPP or the second SEPP in the embodiment shown in FIG. 6 .

基于上述方案,NF服务消费者可以向服务提供者发送服务请求消息,由SEPP配置参数列表,并对服务请求消息进行服务授权。这样,对SEPP配置的参数进行修改就可以支持互联场景的服务授权,并支持更细粒度的服务访问控制。在授权第二NF使用第一服务之前,SEPP需要确定第二NF的信息属于该互联目的下允许访问所述第一NF的NF的信息,从而可以防止恶意的NF服务消费者在互联场景中不合法地获取服务。Based on the above solution, the NF service consumer can send a service request message to the service provider, and SEPP configures the parameter list and performs service authorization on the service request message. In this way, modifying SEPP configuration parameters can support service authorization in interconnection scenarios and support more fine-grained service access control. Before authorizing the second NF to use the first service, SEPP needs to determine that the information of the second NF belongs to the information of the NF that is allowed to access the first NF under the interconnection purpose, thereby preventing malicious NF service consumers from not using the first service in the interconnection scenario. Obtain services legally.

可选地,该配置的参数可以是预先配置的。Optionally, the configured parameters may be pre-configured.

结合第三方面,在一种可能的实现方式中,所述SEPP位于所述第一PLMN,所述配置的参数还包括互联目的下允许访问所述第一PLMN的PLMN的列表,在所述执行授权之前,还包括:确定所述互联目的下允许访问所述第一PLMN的PLMN的列表包括所述第二PLMN;或者,所述SEPP位于所述第二PLMN,所述配置的参数还包括互联目的下允许所述第二PLMN访问的PLMN的列表,在所述执行授权之前,还包括:确定所述互联目的下允许所述第二PLMN访问的PLMN的列表包括所述第一PLMN。Combined with the third aspect, in a possible implementation, the SEPP is located in the first PLMN, and the configured parameters also include a list of PLMNs that are allowed to access the first PLMN for interconnection purposes. When the execution Before authorization, it also includes: determining that the list of PLMNs allowed to access the first PLMN under the interconnection purpose includes the second PLMN; or, the SEPP is located in the second PLMN, and the configured parameters also include interconnection The list of PLMNs allowed to be accessed by the second PLMN under the purpose, before performing the authorization, further includes: determining that the list of PLMNs allowed to be accessed by the second PLMN under the purpose of interconnection includes the first PLMN.

结合第三方面,在一种可能的实现方式中,所述配置的参数还包括所述互联目的下允许被访问的服务的信息,在所述执行授权之前,还包括:确定所述互联目的下允许被访问的服务的信息包括所述服务请求消息中携带的第一服务的信息。Combined with the third aspect, in a possible implementation manner, the configured parameters also include information about services that are allowed to be accessed for the interconnection purpose. Before the authorization is performed, the method further includes: determining the interconnection purpose. The information of the service allowed to be accessed includes the information of the first service carried in the service request message.

结合第三方面,在一种可能的实现方式中,其特征在于,所述方法进一步包括:所述SEPP拒绝所述第二NF使用所述第一服务,在所述拒绝之前,根据所述配置的参数确定所述互联目的下允许访问所述第一NF的NF的信息不包括所述第二NF的信息。Combined with the third aspect, in a possible implementation, the method further includes: the SEPP rejects the second NF to use the first service, and before the rejection, according to the configuration The parameter determines that the information of the NF allowed to access the first NF under the interconnection purpose does not include the information of the second NF.

结合第三方面,在一种可能的实现方式中,所述安全边缘保护代理网元位于所述第一PLMN,所述配置的参数还包括互联目的下允许访问所述第一PLMN的PLMN的列表,所述方法进一步包括:所述安全边缘保护代理网元拒绝所述第二网络功能使用所述第一服务,在所述拒绝之前,确定所述互联目的下允许访问所述第一PLMN的PLMN的列表不包括所述第二PLMN;或者,所述SEPP位于所述第二PLMN,所述配置的参数还包括互联目的下允许所述第二PLMN访问的PLMN的列表,所述安全边缘保护代理网元拒绝所述第二网络功能使用所述第一服务,在所述拒绝之前,还包括:确定所述互联目的下允许所述第二PLMN访问的PLMN的列表不包括所述第一PLMN。Combined with the third aspect, in a possible implementation, the security edge protection proxy network element is located in the first PLMN, and the configured parameters further include a list of PLMNs that are allowed to access the first PLMN for interconnection purposes. , the method further includes: the security edge protection agent network element rejects the second network function to use the first service, and before the rejection, determines the PLMN that is allowed to access the first PLMN under the interconnection purpose The list does not include the second PLMN; or, the SEPP is located in the second PLMN, and the configured parameters also include a list of PLMNs that are allowed to be accessed by the second PLMN for interconnection purposes, and the security edge protection agent The network element refuses the second network function to use the first service. Before the refusal, the network element further includes: determining that the list of PLMNs allowed to be accessed by the second PLMN under the interconnection purpose does not include the first PLMN.

结合第三方面,在一种可能的实现方式中,其特征在于,所述配置的参数还包括所述互联目的下允许被访问的服务的信息,所述方法进一步包括:所述SEPP拒绝所述第二NF使用所述第一服务,在所述拒绝之前,确定所述允许被访问的服务的信息不包括所述第一服务的信息。Combined with the third aspect, in a possible implementation manner, it is characterized in that the configured parameters also include information about services that are allowed to be accessed for the purpose of interconnection, and the method further includes: the SEPP rejects the The second NF uses the first service, and before the rejection, determines that the information of the service allowed to be accessed does not include the information of the first service.

第四方面,提供了一种授权验证的装置,该装置包括:收发单元,用于接收来自第二NF的服务请求消息,所述第二NF位于第二PLMN,所述服务请求消息用于请求位于第一PLMN的第一NF向所述第二NF提供第一服务,所述服务请求消息包括访问令牌、请求的目的和所述第二PLMN的标识符,所述访问令牌包括PLMN标识符和互联目的;处理单元,用于执行所述第二NF使用所述第一服务的授权,在所述执行授权之前,确定所述第二PLMN的标识符与所述访问令牌中的PLMN标识符相同,以及所述请求的目的与所述互联目的相同。In a fourth aspect, an authorization verification device is provided. The device includes: a transceiver unit configured to receive a service request message from a second NF located in a second PLMN. The service request message is used to request The first NF located in the first PLMN provides the first service to the second NF. The service request message includes an access token, the purpose of the request and the identifier of the second PLMN. The access token includes the PLMN identification. and interconnection purposes; a processing unit configured to perform authorization for the second NF to use the first service, and before performing the authorization, determine the identifier of the second PLMN and the PLMN in the access token The identifier is the same, and the purpose of the request is the same as the purpose of the interconnection.

第五方面,提供了一种发送令牌的装置,该装置包括:收发单元,用于接收位于所述第一PLMN的第一NF的注册请求,所述注册请求包括互联目的下允许访问的PLMN列表,所述PLMN列表包括第二PLMN;完成对所述第一NF的注册;接收来自第二NF的第一请求消息,所述第二NF位于所述第二PLMN,所述第一请求消息用于请求访问令牌,所述访问令牌用于访问位于所述第一PLMN的第一NF的第一服务,所述第一请求消息包括所述第二PLMN的标识符和所述互联目的;处理单元,用于响应于所述第一请求消息,生成所述访问令牌,所述访问令牌包括所述第二PLMN的标识符和所述互联目的;所述收发单元还用于:向所述第二NF发送所述访问令牌。In a fifth aspect, a device for sending a token is provided. The device includes: a transceiver unit configured to receive a registration request from a first NF located in the first PLMN, where the registration request includes a PLMN that is allowed to be accessed for interconnection purposes. list, the PLMN list includes a second PLMN; complete registration of the first NF; receive a first request message from the second NF, the second NF is located in the second PLMN, the first request message Used to request an access token, the access token is used to access the first service of the first NF located in the first PLMN, the first request message includes the identifier of the second PLMN and the interconnection purpose ; A processing unit, configured to generate the access token in response to the first request message, the access token including the identifier of the second PLMN and the interconnection purpose; the transceiver unit is also used to: Send the access token to the second NF.

第六方面,提供了一种服务授权的装置,该装置包括:收发单元,用于接收来自第二NF的服务请求消息,所述第二NF位于第二PLMN,所述服务请求消息用于请求位于第一PLMN的第一NF向所述第二NF提供第一服务;处理单元,用于执行所述第二NF使用所述第一服务的授权,配置的参数包括互联目的下允许访问所述第一NF的NF的信息,在所述执行授权之前,根据所述配置的参数确定所述互联目的下允许访问所述第一NF的NF的信息包括所述第二NF的信息。In a sixth aspect, a device for service authorization is provided. The device includes: a transceiver unit configured to receive a service request message from a second NF, the second NF is located in the second PLMN, and the service request message is used to request The first NF located in the first PLMN provides the first service to the second NF; the processing unit is used to perform the authorization of the second NF to use the first service, and the configured parameters include allowing access to the first service for interconnection purposes. The information of the NF of the first NF. Before the execution authorization, it is determined based on the configured parameters that the information of the NF that is allowed to access the first NF for the interconnection purpose includes the information of the second NF.

应理解,上述几种装置对应的具体实现方式以及有益效果在上述方法实施例中已经详细说明,具体可参考上述方法实施例,为了简洁,在此不再赘述。It should be understood that the specific implementation manners and beneficial effects corresponding to the above-mentioned several devices have been described in detail in the above-mentioned method embodiments. For details, reference can be made to the above-mentioned method embodiments. For the sake of brevity, they will not be described again here.

第七方面,提供了一种授权验证的方法,该方法包括:第一网元接收来自第二NF的服务请求消息,所述第二NF位于第二PLMN,所述服务请求消息用于请求位于第一PLMN的第一NF向所述第二NF提供第一服务,所述服务请求消息包括访问令牌、请求的目的和所述第二PLMN的标识符,所述访问令牌包括PLMN标识符和互联目的;In a seventh aspect, an authorization verification method is provided. The method includes: the first network element receives a service request message from a second NF located in the second PLMN, and the service request message is used to request that the service request message is located in the second PLMN. The first NF of the first PLMN provides the first service to the second NF, the service request message includes an access token, the purpose of the request and the identifier of the second PLMN, the access token includes the PLMN identifier and interconnection purposes;

基于上述方案,NF服务消费者向NF服务提供者请求服务的过程中,第一网元可以根据服务请求消息中携带的访问令牌中的PLMN的标识符和互联目的对NF服务消费者进行授权验证,即验证NF服务消费者是否被授权使用请求的服务。具体的,访问令牌中的PLMN标识符所指示的网络中的NF服务消费者能够以互联目的使用NF服务提供者的服务,其他网络中的NF服务消费者不能够以互联目的使用NF服务提供者的服务。Based on the above solution, when the NF service consumer requests services from the NF service provider, the first network element can authorize the NF service consumer based on the PLMN identifier and interconnection purpose in the access token carried in the service request message. Verification, that is, verifying whether the NF service consumer is authorized to use the requested service. Specifically, NF service consumers in the network indicated by the PLMN identifier in the access token can use the services of the NF service provider for interconnection purposes, while NF service consumers in other networks cannot use the NF service provider for interconnection purposes. service.

同时,通过确定服务请求消息中的请求的目的与访问令牌中的互联目的相同,保证该访问令牌用于互联场景中,从而可以防止访问令牌的滥用。At the same time, by determining that the purpose of the request in the service request message is the same as the interconnection purpose in the access token, it is ensured that the access token is used in interconnection scenarios, thereby preventing the abuse of the access token.

另外,本申请提供的方案可以进行更细粒度的访问控制,例如,在一些情况下,两个PLMN之间可以进行通信,但是某个NF服务提供者不能在互联场景下为NF服务消费者提供服务,第一SEPP(或第二SEPP)可以拒绝该NF服务消费者请求的服务。也就是说,按照传统的方案,由于两个PLMN之间可以进行通信,NF服务消费者的服务请求消息应该被转发至NF服务提供者,但是本申请的方案还可以基于访问令牌中的PLMN标识符和互联目的对NF服务消费者进行授权验证,如果验证不通过,就可以拒绝转发该服务请求消息或者直接拒绝NF服务消费者的服务请求。In addition, the solution provided by this application can perform more fine-grained access control. For example, in some cases, communication can be carried out between two PLMNs, but a certain NF service provider cannot provide NF service consumers in an interconnection scenario. Service, the first SEPP (or second SEPP) can deny the service requested by the NF service consumer. That is to say, according to the traditional solution, since communication can be carried out between two PLMNs, the service request message of the NF service consumer should be forwarded to the NF service provider. However, the solution of this application can also be based on the PLMN in the access token. The identifier and interconnection purpose perform authorization verification on the NF service consumer. If the verification fails, the service request message can be refused to be forwarded or the service request of the NF service consumer can be directly rejected.

在所述第二PLMN的标识符与所述PLMN标识符不相同的情况下,或者在所述请求的目的与所述互联目的不相同的情况下,所述第一网元拒绝所述第二NF使用所述第一服务。In the case that the identifier of the second PLMN is different from the PLMN identifier, or in the case that the purpose of the request is different from the interconnection purpose, the first network element rejects the second NF uses the first service.

结合第七方面,在一种可能的实现方式下,所述服务请求消息进一步包括第二NF的信息,所述访问令牌进一步包括NF的信息,所述NF的信息指示所述访问令牌适用的服务请求网元,所述方法还包括:在所述第二NF的信息与所述NF的信息不相同的情况下,所述第一网元拒绝所述第二NF使用所述第一服务。Combined with the seventh aspect, in a possible implementation, the service request message further includes information of the second NF, the access token further includes information of the NF, and the information of the NF indicates that the access token is suitable for The service requesting network element, the method further includes: when the information of the second NF is different from the information of the NF, the first network element refuses the second NF to use the first service .

基于上述技术方案,第二NF向第一NF请求第一服务的过程中,第一网元可以根据服务请求消息中携带的访问令牌中的PLMN的标识符、互联目的和NF的信息,对第二NF使用第一服务进行授权,保证第二NF为在互联场景中适用的服务请求网元,从而可以防止访问令牌的滥用,进而防止恶意的服务消费者在互联场景中不合法地获取服务。Based on the above technical solution, during the process when the second NF requests the first service from the first NF, the first network element can perform the request based on the PLMN identifier, interconnection purpose and NF information in the access token carried in the service request message. The second NF uses the first service for authorization to ensure that the second NF requests network elements for services applicable in the Internet scenario, thereby preventing the abuse of access tokens and preventing malicious service consumers from illegally obtaining them in the Internet scenario. Serve.

结合第七方面,在一中可能的实现方式下,所述服务请求消息进一步包括第一服务的信息,所述访问令牌进一步包括服务的信息,所述服务的信息指示所述访问令牌适用的服务,所述方法还包括:在所述第一服务的信息与所述服务的信息不相同的情况下,所述第一网元拒绝所述第二NF使用所述第一服务。Combined with the seventh aspect, in one possible implementation manner, the service request message further includes information about the first service, the access token further includes information about the service, and the information about the service indicates that the access token is suitable for service, the method further includes: when the information of the first service is different from the information of the service, the first network element refuses the second NF to use the first service.

基于上述技术方案,第二NF向第一NF请求第一服务的过程中,第一网元可以根据服务请求消息中携带的访问令牌中的PLMN的标识符、互联目的、NF的信息和服务的信息,对第二NF使用第一服务进行授权验证,保证第二NF请求的服务为在互联场景下适用的服务,从而可以防止访问令牌的滥用,进而防止恶意的服务消费者在互联场景中不合法地获取服务。Based on the above technical solution, when the second NF requests the first service from the first NF, the first network element can use the PLMN identifier, interconnection purpose, NF information and services in the access token carried in the service request message. information, perform authorization verification on the second NF using the first service, and ensure that the service requested by the second NF is a service applicable in the Internet scenario, thereby preventing the abuse of access tokens and preventing malicious service consumers from using the Internet scenario. obtain services illegally.

第八方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,当所述计算机程序在计算机上运行时,使得计算机执行第一方面任一项所述的方法,或者使得计算机执行第二方面所述的方法被执行,或者使得计算机执行第三方面任一项所述的方法。In an eighth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program. When the computer program is run on a computer, it causes the computer to perform the method described in any one of the first aspects. , or causing the computer to execute the method described in the second aspect, or causing the computer to execute the method described in any one of the third aspects.

第九方面,提供了一种计算机程序产品,该计算机程序产品包括计算机程序指令,所述计算机程序指令在计算机上运行时,使得计算机执行第一方面中任一项所述的方法,或者使得计算机执行第二方面中任一项所述的方法被执行,或者使得计算机执行第三方面中任一项所述的方法。In a ninth aspect, a computer program product is provided. The computer program product includes computer program instructions. When the computer program instructions are run on a computer, they cause the computer to perform the method described in any one of the first aspects, or cause the computer to The method described in any one of the second aspects is performed, or the computer is caused to perform the method described in any one of the third aspects.

第十方面,提供了一种通信装置,该装置包括至少一个处理器,所述至少一个处理器用于执行存储在存储器中的计算机程序或指令,以执行第一方面中任一项所述的方法,或者以执行第二方面中任一项所述的方法,或者以执行第三方面中任一项所述的方法。In a tenth aspect, a communication device is provided. The device includes at least one processor, the at least one processor is configured to execute a computer program or instructions stored in a memory to perform the method according to any one of the first aspects. , or to perform the method described in any one of the second aspects, or to perform the method described in any one of the third aspects.

第十一方面,提供一种通信系统,包括第四方面所示的授权验证的装置、第五方面所示的发送令牌的装置以及第六方面所示的服务授权的装置中的至少两种装置。An eleventh aspect provides a communication system, including at least two of the authorization verification device shown in the fourth aspect, the token sending device shown in the fifth aspect, and the service authorization device shown in the sixth aspect. device.

附图说明Description of drawings

图1是适用于本申请实施例的网络结构的示意图。Figure 1 is a schematic diagram of a network structure suitable for embodiments of the present application.

图2示出了一种互联场景下的通信模式的示意图。Figure 2 shows a schematic diagram of a communication mode in an interconnection scenario.

图3示出了本申请实施例提供的一种授权验证的方法的示例性流程图。Figure 3 shows an exemplary flow chart of an authorization verification method provided by an embodiment of the present application.

图4示出了本申请实施例提供的一种发送访问令牌的方法的示例性流程图。Figure 4 shows an exemplary flowchart of a method for sending an access token provided by an embodiment of the present application.

图5示出了本申请实施例提供的一种注册方法的示例性流程图。Figure 5 shows an exemplary flow chart of a registration method provided by an embodiment of the present application.

图6示出了本申请实施例提供的一种发送访问令牌的方法的示例性流程图。Figure 6 shows an exemplary flowchart of a method for sending an access token provided by an embodiment of the present application.

图7示出了本申请实施例提供的一种授权验证的方法的示例性流程图。Figure 7 shows an exemplary flow chart of an authorization verification method provided by an embodiment of the present application.

图8示出了本申请实施例提供的一种服务授权的方法的示例性流程图。Figure 8 shows an exemplary flow chart of a service authorization method provided by an embodiment of the present application.

图9是本申请实施例提供的授权验证的装置的示意性框图。Figure 9 is a schematic block diagram of an authorization verification device provided by an embodiment of the present application.

图10是本申请实施例提供的授权验证的设备的结构示意图。Figure 10 is a schematic structural diagram of an authorization verification device provided by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.

本申请实施例的技术方案可以应用于各种通信系统,例如:长期演进(long termevolution,LTE)系统、LTE频分双工(frequency division duplex,FDD)系统、LTE时分双工(time division duplex,TDD)系统、通用移动通信系统(universal mobiletelecommunication system,UMTS)、全球互联微波接入(worldwide interoperabilityfor microwave access,WiMAX)通信系统、5G系统或新无线(new radio,NR)、第六代(6thgeneration,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 solutions of the embodiments of the present application can be applied to various communication systems, such as: long term evolution (long termevolution, LTE) system, LTE frequency division duplex (FDD) system, LTE time division duplex (time division duplex, TDD) system, universal mobile telecommunication system (UMTS), global interoperability for microwave access (WiMAX) communication system, 5G system or new radio (NR), sixth generation (6thgeneration, 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 (SA) 5G mobile communication system. The communication system can also be a public land mobile network (PLMN) network, a device-to-device (D2D) communication system, a machine to machine (M2M) communication system, or the Internet of Things (Internet of Things, IoT) communication system or other communication system.

为便于理解本申请实施例,首先结合图1详细说明适用于本申请实施例的网络架构。In order to facilitate understanding of the embodiment of the present application, the network architecture applicable to the embodiment of the present application is first 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)。Figure 1 is a schematic diagram of a network structure suitable for the method provided by the embodiment of the present application. As shown in Figure 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 box in Figure 1 are network elements that communicate based on service-oriented interfaces, that is, the communication between network elements uses service-oriented interfaces. The network architecture may include an access network (AN) and a core network (CN), and may also include user equipment (UE).

其中,核心网负责维护移动网络的签约数据,为UE提供会话管理、移动性管理、策略管理以及安全认证等功能。核心网可以包括如下网元:用户面功能(user planefunction,UPF)、认证服务功能(authentication server function,AUSF)、接入和移动性管理功能(access and mobility management function,AMF)、会话管理功能(sessionmanagement function,SMF)、网络切片选择功能(network slice selection function,NSSF)、网络开放功能(network exposure function,NEF)、网络功能存储功能(NFrepository 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 UEs. The core network may include the following network elements: user plane function (UPF), authentication server function (AUSF), access and mobility management function (AMF), session management function ( session management function (SMF), network slice selection function (NSSF), network exposure function (NEF), network function storage function (NFrepository function (NRF)), policy control function (PCF) ), unified data management (UDM) and application function (AF).

下面对图1中示出的各网元做简单介绍:The following is a brief introduction to each network element shown in Figure 1:

1、用户设备(user equipment,UE):还可以称终端设备,终端设备可以是一种向用户提供语音/数据连通性的设备,例如,具有无线连接功能的手持式设备、车载设备等。1. User equipment (UE): It can also be called a terminal device. The terminal device can be a device that provides voice/data connectivity to users, such as a handheld device with wireless connection function, a vehicle-mounted device, etc.

应理解,终端设备可以是任何可以接入网络的设备。终端设备与接入网设备之间可以采用某种空口技术相互通信。It should be understood that the terminal device can be any device that can access the network. Terminal equipment and access network equipment can communicate with each other using some air interface technology.

2、接入网(access network,AN):接入网可以为特定区域的授权用户提供入网功能,包含无线接入网(radio access network,RAN)设备和AN设备。RAN设备主要是3GPP网络无线网络设备,AN设备可以是non-3GPP定义的接入网设备。2. Access network (AN): The access network can provide network access functions for authorized users in a specific area, including radio access network (RAN) equipment and AN equipment. RAN equipment is mainly 3GPP network wireless network equipment, and AN equipment can be access network equipment defined by non-3GPP.

接入网可以为小区提供服务。终端设备可以通过接入网设备分配的传输资源(例如,频域资源,或者说,频谱资源)与小区通信。The access network can provide services to the community. The terminal device can communicate with the cell through 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. AMF can also be used to implement other functions in the mobility management entity (mobility management entity, MME) besides 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 Internet Protocol (IP) address allocation and management, selection of endpoints for manageable user plane functions, policy control, or charging function interfaces, and downlink data notification. In the embodiment of this application, the main user of SMF is responsible for session management in the mobile network, such as session establishment, modification, release, etc. Specific functions may include, for example, allocating IP addresses to terminal devices, selecting UPFs that provide packet forwarding functions, etc.

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 (DN) and transmit it to the terminal device through the access network device. UPF network elements can also receive user data from terminal equipment through access network equipment and forward it to the data network. The transmission resources and scheduling functions in the UPF network element that provide services for terminal equipment 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. It can be a private network, such as a local area network; it can also be an external network that is not controlled by the operator, such as the Internet; it can also be an operator Co-deployed proprietary networks, such as those providing IP multimedia subsystem (IMS). The UE can access the DN through the established protocol data unit (PDU) session.

7、认证服务网元(authentication server function,AUSF):主要用于用户的安全认证等。7. Authentication server function (AUSF): mainly used for user security authentication, etc.

8、网络开放功能(network exposure function,NEF)网元:主要用于支持能力和事件的开放,如用于安全地向外部开放由3GPP网络功能提供的业务和能力等。8. Network exposure function (NEF) network element: mainly used to support the opening of capabilities and events, such as for safely opening 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): Mainly provides service registration, discovery and authorization, and maintains available network function (NF) instance information, which can realize on-demand configuration of network functions and services and NF interconnections between. Among them, service registration means that the NF network element needs to register with the NRF network element before providing services. Service discovery means that when an NF network element needs other NF network elements to provide services for it, it must first perform service discovery through the NRF network element to discover the desired NF network element that provides services to it. For example, when NF network element 1 needs NF network element 2 to provide services for it, it must first perform service discovery through the NRF network element to discover NF network element 2.

10、PCF网元:用于指导网络行为的统一策略框架,为控制平面功能网元(例如AMF,SMF网元等)提供策略规则信息,负责获取与策略决策相关的用户签约信息等。10. PCF network element: A unified policy framework used to guide network behavior, providing policy rule information for control plane functional network elements (such as AMF, SMF network elements, etc.), and responsible for obtaining user subscription information related to policy decisions.

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 (AF) network element: mainly supports interaction with the 3GPP core network to provide services, such as affecting data routing decisions, interacting with the policy control function (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-oriented interface signaling. Operators can deploy SCP as needed. SCP network elements can provide routing and forwarding services for the sender of serviced interface signaling. The sender of serviced 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 message forwarding services for the NF network element. When 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.

14、安全边缘保护代理(security edge protection proxy,SEPP)是5G漫游安全架构的重要组成部分,用于实现用户漫游,实现与其他运营商之间的通信互通,负责运营商之间控制平面接口上的消息过滤和策略管理,主要作为运营商核心网控制面之间的边界网关。14. Security edge protection proxy (SEPP) is an important part of the 5G roaming security architecture. It is used to realize user roaming and communication with other operators. It is responsible for the control plane interface between operators. Message filtering and policy management, mainly serving as the border gateway between the operator's core network control plane.

应理解,上述应用于本申请实施例的网络架构仅是举例说明的从服务化架构的角度描述的网络架构,适用本申请实施例的网络架构并不局限于此,任何能够实现上述各个网元的功能的网络架构都适用于本申请实施例。It should be understood that the above-mentioned network architecture applied to the embodiments of the present application is only an example of a network architecture described from the perspective of a service-oriented architecture. The network architecture applicable to the embodiments of the present application is not limited to this. Any network element that can implement the above-mentioned network elements The functional network architecture is applicable to the embodiment of this application.

还应理解,图1中所示的AMF、SMF、UPF、网络切片选择功能网元(network sliceselection function,NSSF)、NEF、AUSF、NRF、PCF、UDM可以理解为核心网中用于实现不同功能的网元,例如可以按需组合成网络切片。这些核心网网元可以各自独立的设备,也可以集成于同一设备中实现不同的功能,本申请对于上述网元的具体形态不作限定。It should also be understood that the AMF, SMF, UPF, network slice selection function (NSSF), NEF, AUSF, NRF, PCF, and UDM shown in Figure 1 can be understood as being used in the core network to implement different functions. Network elements can, for example, be combined into network slices on demand. These core network elements can be independent devices, or can 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 nomenclature is only defined to facilitate the differentiation of different functions and should not constitute any limitation on this application. This application does not rule out the possibility of using other naming in 5G networks and other future networks. For example, in a 6G network, some or all of the above network elements may use the terminology used in 5G, or may adopt other names. The interface names between each network element in Figure 1 are just an example. In specific implementations, the names of the interfaces may be other names, and this application does not specifically limit this. In addition, the names of the messages (or signaling) transmitted between the various network elements are only examples and do not constitute any limitation on the function of the messages themselves.

为了便于理解本申请实施例提供的方案,首先对服务化网元之间的通信模式进行简单说明。In order to facilitate understanding of the solutions provided by the embodiments of this application, first a brief description of the communication mode between service-oriented network elements is provided.

5G服务化的系统架构中,基于服务化接口通信的双方分别称为服务消费者(service consumer)和服务提供者(service producer)。其中请求服务的一方为serviceconsumer,提供服务的一方叫service producer。服务消费者也可以称为消费者、消费网元、用户、请求端或请求者或服务消费网元等。服务提供者也可以称为提供网元、服务提供网元、提供者、生产者或响应者等,本申请不作限定。In the 5G service-oriented system architecture, the two parties communicating based on the service-oriented interface are called service consumers and service producers respectively. The party requesting services is serviceconsumer, and the party providing services is called 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 is not limited in this application.

为了便于理解本申请实施例提供的方案,首先对互联场景下的服务化网元之间的通信模式进行简单说明。In order to facilitate understanding of the solutions provided by the embodiments of this application, first a brief explanation of the communication mode between service-oriented network elements in the interconnection scenario is provided.

图2示出了一种互联场景下的通信模式的示意图。在图2所示的通信模式中,第一SEPP和NF服务提供者处于第一PLMN,第二SEPP和NF服务消费者处于第二PLMN。当NF服务消费者向NF服务提供者发送服务请求消息时,需要通过第一SEPP和第二SEPP进行转发。第一SEPP或第二SEPP可以验证第一PLMN和第二PLMN之间是否可以进行通信,从而判断该服务请求消息是否可以通过。Figure 2 shows a schematic diagram of a communication mode in an interconnection scenario. In the communication mode shown in Figure 2, the first SEPP and NF service provider are in the first PLMN, and the second SEPP and NF service consumer are in the second PLMN. When the NF service consumer sends a service request message to the NF service provider, it needs to be forwarded through the first SEPP and the second SEPP. The first SEPP or the second SEPP can verify whether communication between the first PLMN and the second PLMN is possible, thereby determining whether the service request message can pass.

在本申请实施例中,互联场景是指服务消费者和服务提供者分别在各自的网络接入,但服务消费者需要访问服务提供者提供的服务。In the embodiment of this application, the interconnection scenario refers to that the service consumer and the service provider access each other in their respective networks, but the service consumer needs to access the services provided by the service provider.

示例性的,中国移动的UE1和中国电信的UE2之间发送短信,且UE1和UE2均在各自的网络接入。在这种情况下,中国移动的核心网需要与中国电信的核心网进行交互,以将短信进行转发,例如中国移动的短消息网关(short message service gateway mobileswitching center,SMS-GMSC)访问中国电信的UDM,此时我们称中国移动的SMS-GMSC和中国电信的UDM之间的服务访问是互联访问,该场景为互联场景。For example, text messages are sent between UE1 of China Mobile and UE2 of China Telecom, and both UE1 and UE2 are connected to their respective networks. In this case, China Mobile's core network needs to interact with China Telecom's core network to forward text messages. For example, China Mobile's short message service gateway mobile switching center (SMS-GMSC) accesses China Telecom's UDM, at this time we call the service access between China Mobile's SMS-GMSC and China Telecom's UDM an interconnection access, and this scenario is an interconnection scenario.

在该通信模式中,虽然SEPP可以验证两个PLMN之间是否可以进行通信,但是不能验证该NF服务消费者是否可以使用NF服务提供者提供的服务。例如,在一些情况下,某个NF服务提供者设定为不能在互联场景中为服务消费者提供服务,但是仍可以接收到其他网络中发送的服务请求消息,此时该服务提供者可能存在被非法访问的风险。In this communication mode, although SEPP can verify whether communication can be carried out between two PLMNs, it cannot verify whether the NF service consumer can use the services provided by the NF service provider. For example, in some cases, a certain NF service provider is set so that it cannot provide services to service consumers in the Internet scenario, but can still receive service request messages sent in other networks. At this time, the service provider may exist Risk of illegal access.

图3是本申请实施例提供的授权验证的方法300的示意性流程图。方法300包括:Figure 3 is a schematic flow chart of the authorization verification method 300 provided by the embodiment of the present application. Method 300 includes:

S301,第一网元接收来自第二网络功能NF的服务请求消息。S301. The first network element receives a service request message from the second network function NF.

该服务请求消息用于请求第一NF向第二NF提供第一服务,该服务请求消息包括访问令牌、请求的目的和第二PLMN的标识符,该访问令牌包括PLMN标识符和互联目的。其中,第一NF位于第一PLMN,第二NF位于第二PLMN。The service request message is used to request the first NF to provide the first service to the second NF. The service request message includes an access token, the purpose of the request and the identifier of the second PLMN. The access token includes the PLMN identifier and the interconnection purpose. . Wherein, the first NF is located in the first PLMN, and the second NF is located in the second PLMN.

其中,该第二NF可以是一种服务请求网元(服务消费者),该第一网元可以是位于第一PLMN的第一安全边缘保护代理网元(第一SEPP),也可以是位于第二PLMN的第二安全边缘保护代理网元(第二SEPP),还可以是一种服务提供网元(服务提供者)。The second NF may be a service requesting network element (service consumer), and the first network element may be a first security edge protection proxy network element (first SEPP) located in the first PLMN, or it may be a first network element located in the first PLMN. The second security edge protection proxy network element (second SEPP) of the second PLMN may also be a service providing network element (service provider).

该服务请求消息与第二NF相关联。例如,在一种可能的场景下,第一网元可以从第二NF直接接收该服务请求消息;在另一种可能的场景下,第一网元可以从第二安全边缘保护代理网元接收该服务请求消息,其中,该第二安全边缘保护代理网元可以是从第二NF直接接收该服务请求消息;在又一种可能的场景下,第一网元可以从第一安全边缘保护代理网元接收该服务请求消息,其中,该第一安全边缘保护代理网元可以是从第二安全边缘保护代理网元接收到的该服务请求消息,该第二安全边缘保护代理网元可以是从第二NF直接接收该服务请求消息。The service request message is associated with the second NF. For example, in one possible scenario, the first network element may directly receive the service request message from the second NF; in another possible scenario, the first network element may receive the service request message from the second security edge protection proxy network element. The service request message, wherein the second security edge protection agent network element may directly receive the service request message from the second NF; in another possible scenario, the first network element may receive the service request message from the first security edge protection agent The network element receives the service request message, wherein the first security edge protection agent network element may receive the service request message from a second security edge protection agent network element, and the second security edge protection agent network element may be from The second NF directly receives the service request message.

可选地,第一网元可以从服务通信代理网元接收该服务请求消息,其中,该服务通信代理网元可以是直接从第二网元接收到的该服务请求消息,也可以是通过其他一个或多个服务通信代理网元从第二NF接收到的该服务请求消息。也就是说,第一网元可以通过一个或者多个服务通信网元与第二NF进行通信。Optionally, the first network element may receive the service request message from the service communication agent network element, wherein the service communication agent network element may receive the service request message directly from the second network element, or may receive the service request message through other network elements. One or more service communication proxy network elements receive the service request message from the second NF. That is to say, the first network element can communicate with the second NF through one or more service communication network elements.

S302,第一网元执行第二NF使用第一服务的授权。S302: The first network element performs authorization for the second NF to use the first service.

应理解,在第二NF请求使用第一NF的服务之前,可以向第一NF对应的分发访问令牌的网元(例如第一NRF,位于第一PLMN)请求访问令牌,以便于使用携带访问令牌的服务请求消息请求第一NF的服务。It should be understood that before the second NF requests to use the service of the first NF, the access token can be requested from the network element corresponding to the first NF that distributes the access token (for example, the first NRF, located in the first PLMN), so as to facilitate the use of portability. The access token service request message requests the service of the first NF.

应理解,服务请求消息中的访问令牌受到了安全保护,因此恶意的NF无法对访问令牌内的信息进行篡改。可以是由分发该访问令牌的网元对该访问令牌进行的安全保护。例如,第一NRF利用共享密钥对该访问令牌(或者是访问令牌内的参数)生成完整性保护参数(例如消息认证码MAC),第二NF在服务请求消息中携带该完整性保护参数。第一网元可以根据该完整性保护参数验证访问令牌内的信息是否被篡改。又例如,第一NRF利用私钥对安全令牌内的信息进行签名,在授权验证的过程中,通过对签名进行验证来确定访问令牌内的信息是否被篡改。It should be understood that the access token in the service request message is protected by security, so malicious NF cannot tamper with the information in the access token. It may be that the network element that distributes the access token provides security protection for the access token. For example, the first NRF uses the shared key to generate integrity protection parameters (such as message authentication code MAC) for the access token (or parameters within the access token), and the second NF carries the integrity protection in the service request message. parameter. The first network element can verify whether the information in the access token has been tampered with based on the integrity protection parameter. For another example, the first NRF uses the private key to sign the information in the security token, and during the authorization verification process, it verifies the signature to determine whether the information in the access token has been tampered with.

还应理解,该访问令牌中的信息已经被授权,第一网元可以基于访问令牌内的信息验证该服务请求消息,执行该第二NF使用第一服务的授权或拒绝该第二NF使用第一服务。It should also be understood that the information in the access token has been authorized, and the first network element can verify the service request message based on the information in the access token, perform authorization of the second NF to use the first service or reject the second NF. Use the first service.

该第一网元执行该第二NF使用第一服务的授权的具体表现形式可以是:在授权所述第二NF使用该第一服务的情况下,所述第二NF向该第一NF提供所述第一服务;或者,在授权所述第二NF使用该第一服务的情况下,第一安全边缘保护代理网元转发该服务请求消息;或者,在授权所述第二NF使用该第一服务的情况下,第二安全边缘保护代理网元转发该服务请求消息。The specific expression of the first network element's authorization to perform the second NF's use of the first service may be: in the case of authorizing the second NF to use the first service, the second NF provides the first NF with The first service; or, when authorizing the second NF to use the first service, the first security edge protection proxy network element forwards the service request message; or, when authorizing the second NF to use the first service, In the case of a service, the second security edge protection agent network element forwards the service request message.

在本申请实施例中,访问令牌包括PLMN标识符和互联目的,服务请求消息包括请求的目的和第二PLMN的标识符。在授权第二NF使用第一服务之前,确定第二PLMN的标识符与访问令牌中的PLMN标识符相同,以及确定该请求的目的与互联目的相同。In this embodiment of the present application, the access token includes the PLMN identifier and the interconnection purpose, and the service request message includes the requested purpose and the identifier of the second PLMN. Before authorizing the second NF to use the first service, it is determined that the identifier of the second PLMN is the same as the PLMN identifier in the access token, and that the purpose of the request is the same as the interconnection purpose.

也就是说,第一网元可以确定该访问令牌是在互联场景中使用的,并且确定该服务请求消息来源于访问令牌中的PLMN标识符指示的网络。That is to say, the first network element can determine that the access token is used in an interconnection scenario, and determine that the service request message originates from the network indicated by the PLMN identifier in the access token.

应理解,上述验证是授权第二NF使用第一服务的必要条件。也就是说,除了上述验证外,可能还需要进行其他的验证,当所有验证均通过时,授权第二NF使用第一服务。It should be understood that the above verification is a necessary condition for authorizing the second NF to use the first service. That is to say, in addition to the above verification, other verifications may be required. When all verifications pass, the second NF is authorized to use the first service.

应理解,应对访问令牌包括的全部信息进行验证,当访问令牌中的全部信息均验证通过时,授权服务请求网元使用服务提供网元的第一服务。It should be understood that all information included in the access token should be verified. When all information in the access token passes verification, the authorization service requests the network element to use the service to provide the first service of the network element.

可选地,访问令牌中还可以包括服务提供网元的NF的信息。也就是说,该访问令牌可以用于请求该服务提供网元的服务。这样,服务提供网元可以指定哪些网络中的服务请求网元可以使用自己的服务。Optionally, the access token may also include information about the NF of the service providing network element. That is to say, the access token can be used to request the service to provide network element services. In this way, the service providing network element can specify which service requesting network elements in the network can use its own service.

在一些实施例中,访问令牌进一步包括NF的信息,服务请求消息进一步包括第二NF的信息,此时,在授权第二NF使用第一服务之前,还需要确定第二NF的信息与访问令牌中的NF的信息相同。In some embodiments, the access token further includes the information of the NF, and the service request message further includes the information of the second NF. At this time, before authorizing the second NF to use the first service, it is also necessary to determine the information and access of the second NF. The information of NF in the token is the same.

访问令牌中的NF的信息指示该访问令牌适用的服务请求网元(服务消费者)的信息,例如,NF类型、NF实例ID等。The NF information in the access token indicates the information of the service requesting network element (service consumer) to which the access token is applicable, for example, NF type, NF instance ID, etc.

可以理解,访问令牌适用的服务请求网元具体可以是指适用的服务请求网元可以使用该访问令牌以获取服务,或者说不是所述适用的服务请求网元范围内的网元不可以使用该访问令牌以获取服务。It can be understood that the service requesting network element to which the access token is applicable may specifically mean that the applicable service requesting network element can use the access token to obtain services, or that network elements that are not within the scope of the applicable service requesting network element cannot Use the access token to obtain the service.

在一些实施例中,访问令牌进一步包括服务的信息,服务请求消息进一步包括第一服务的信息,此时,在授权第二NF使用第一服务之前,还需要确定服务请求消息所请求的第一服务的信息与访问令牌中的服务的信息相同。In some embodiments, the access token further includes service information, and the service request message further includes information about the first service. At this time, before authorizing the second NF to use the first service, it is also necessary to determine the third service requested by the service request message. The information for a service is the same as the information for the service in the access token.

也就是说,该服务请求消息可以请求访问令牌中的服务的信息指示的服务。That is, the service request message may request a service indicated by the service information in the access token.

该第二网元拒绝该第二NF使用第一服务的具体表现形式可以是:在拒绝第二NF使用第一服务的情况下,第一网元拒绝所述服务请求消息,以拒绝第二NF请求的所述第一服务。示例性的,该第一网元向该第二NF发送服务响应消息,该服务响应消息用于指示拒绝提供该第一服务,可选的,该服务响应消息中还包括拒绝的原因,例如,拒绝的原因可以是访问令牌验证不通过。The specific form of the second network element's refusal of the second NF to use the first service may be: in the case of refusing the second NF to use the first service, the first network element refuses the service request message to refuse the second NF The first service requested. Exemplarily, the first network element sends a service response message to the second NF. The service response message is used to indicate a refusal to provide the first service. Optionally, the service response message also includes a reason for the refusal, for example, The reason for rejection can be that the access token verification failed.

在一些实施例中,访问令牌包括PLMN标识符和互联目的,服务请求消息包括请求的目的和第二PLMN的标识符。第一网元拒绝第二NF使用第一服务,在拒绝第二NF使用第一服务之前,确定第二PLMN的标识符与访问令牌中的PLMN标识符不相同,和/或确定该请求的目的与互联目的不相同。In some embodiments, the access token includes the PLMN identifier and the interconnection purpose, and the service request message includes the requested purpose and the identifier of the second PLMN. The first network element refuses the second NF to use the first service, and before denying the second NF to use the first service, determines that the identifier of the second PLMN is not the same as the PLMN identifier in the access token, and/or determines that the requested The purpose is not the same as the interconnection purpose.

在一些实施例中,访问令牌进一步包括NF的信息,服务请求消息进一步包括第二NF的信息,第一网元拒绝第二NF使用第一服务,在拒绝第二NF使用第一服务之前,确定第二NF的信息与访问令牌中的NF的信息不相同。In some embodiments, the access token further includes the information of the NF, the service request message further includes the information of the second NF, the first network element refuses the second NF to use the first service, and before denying the second NF to use the first service, Determine that the information of the second NF is not the same as the information of the NF in the access token.

在一些实施例中,访问令牌进一步包括服务的信息,服务请求消息进一步包括第一服务的信息,第一网元拒绝第二NF使用第一服务,在拒绝第二NF使用第一服务之前,确定服务请求消息所请求的第一服务的信息与访问令牌中的服务的信息相同。In some embodiments, the access token further includes service information, the service request message further includes information of the first service, the first network element refuses the second NF to use the first service, and before denying the second NF to use the first service, It is determined that the information of the first service requested by the service request message is the same as the information of the service in the access token.

应理解,如果服务请求消息中任意一个信息与访问令牌中的信息不相同(例如,第一服务的信息和访问令牌中的服务的信息不相同),第一网元拒绝第二NF使用第一服务。It should be understood that if any information in the service request message is different from the information in the access token (for example, the information about the first service is different from the information about the service in the access token), the first network element refuses to use the second NF. First service.

下面介绍一种发送访问令牌的方法400,如图4所示,该方法400包括:A method 400 for sending an access token is introduced below. As shown in Figure 4, the method 400 includes:

S410,第一NF向第一NRF发送注册请求,相应的,第一NRF接收来自第一NF的注册请求。S410: The first NF sends a registration request to the first NRF. Correspondingly, the first NRF receives the registration request from the first NF.

需要说明的是,第一NF和第一NRF位于第一PLMN,第二NF位于第二PLMN。It should be noted that the first NF and the first NRF are located in the first PLMN, and the second NF is located in the second PLMN.

具体地,注册请求中包括互联目的下允许访问的PLMN列表,该允许访问的PLMN列表包括第二PLMN。Specifically, the registration request includes a list of PLMNs that are allowed to be accessed for interconnection purposes, and the list of PLMNs that are allowed to be accessed includes the second PLMN.

也就是说,当第一NF注册到第一NRF时,可以对在互联目的下访问第一NF的NF所处的网络进行限制。例如,该互联目的下允许访问的PLMN列表中包括第二PLMN,表示第二PLMN中的NF能够以互联目的访问第一NF。That is to say, when the first NF registers with the first NRF, the network where the NF accesses the first NF for interconnection purposes is located may be restricted. For example, the list of PLMNs allowed to be accessed for the interconnection purpose includes the second PLMN, which means that the NF in the second PLMN can access the first NF for the interconnection purpose.

在一些实施例中,该注册请求进一步包括互联目的下允许访问所述第一网络功能的网络功能的信息。In some embodiments, the registration request further includes information on network functions that allow access to the first network function for interconnection purposes.

也就是说,当第一NF注册到第一NRF时,可以对在互联目的下访问第一NF的NF进行限制。That is, when the first NF registers with the first NRF, restrictions may be imposed on the NFs that access the first NF for interconnection purposes.

在一些实施例中,该注册请求进一步包括互联目的下允许访问所述第一网络功能的网络功能的信息,以及互联目的下允许被访问的服务的信息。In some embodiments, the registration request further includes information about network functions that are allowed to access the first network function for interconnection purposes, and information about services that are allowed to be accessed for interconnection purposes.

也就是说,当第一NF注册到第一NRF时,可以对在互联目的下访问第一NF的NF以及被访问的服务进行限制。That is to say, when the first NF registers with the first NRF, restrictions can be placed on the NFs and accessed services that access the first NF for interconnection purposes.

S420,第一NRF完成对第一NF的注册。S420, the first NRF completes the registration of the first NF.

具体地,第一NRF在接收到第一NF的注册请求后,存储注册请求中的互联目的下允许访问的PLMN列表。Specifically, after receiving the registration request from the first NF, the first NRF stores the list of PLMNs that are allowed to be accessed for the purpose of interconnection in the registration request.

在一些实施例中,第一NRF存储注册请求中的互联目的下允许访问所述第一网络功能的网络功能的信息。In some embodiments, the first NRF stores information in the registration request about network functions that allow access to the first network function for interconnection purposes.

在一些实施例中,第一NRF存储注册请求中的互联目的下允许访问所述第一网络功能的网络功能的信息,以及互联目的下允许被访问的服务的信息。In some embodiments, the first NRF stores information about network functions that are allowed to access the first network function for interconnection purposes in the registration request, and information about services that are allowed to be accessed for interconnection purposes.

应理解,第一NRF完成对第一NF的注册后,第一NRF可以依据存储的互联目的下允许访问的PLMN列表,和/或互联目的下允许访问所述第一网络功能的网络功能的信息,和/或互联目的下允许被访问的服务的信息,对服务请求网元进行授权。It should be understood that after the first NRF completes the registration of the first NF, the first NRF can rely on the stored list of PLMNs that are allowed to be accessed for the purpose of interconnection, and/or the information of the network functions that are allowed to access the first network function for the purpose of interconnection. , and/or information about services that are allowed to be accessed for interconnection purposes, to authorize the service requesting network element.

可选地,第一NRF向第一NF发送注册完成消息。Optionally, the first NRF sends a registration completion message to the first NF.

可选地,第一NRF向第一NF发送注册失败消息。Optionally, the first NRF sends a registration failure message to the first NF.

S430,第二NF向第一NRF发送第一请求消息。S430. The second NF sends the first request message to the first NRF.

该第一请求消息用于请求访问令牌,该访问令牌用于访问第一NF的第一服务,该第一请求消息包括第二PLMN的标识符和互联目的。The first request message is used to request an access token. The access token is used to access the first service of the first NF. The first request message includes an identifier of the second PLMN and an interconnection purpose.

应理解,当第二NF向第一NRF发送第一请求消息以请求访问令牌时,需要携带第二NF所处的网络的标识符以及互联目的,表示将在互联目的下请求第一NF的服务。It should be understood that when the second NF sends the first request message to the first NRF to request an access token, it needs to carry the identifier of the network where the second NF is located and the interconnection purpose, indicating that it will request the first NF under the interconnection purpose. Serve.

在一些实施例中,第一请求消息进一步包括第二NF的信息。In some embodiments, the first request message further includes information of the second NF.

应理解,当第二NF向第一NRF发送第一请求消息以请求访问令牌时,还需要携带第二NF的信息,表示该第二NF将在互联目的下请求第一NF的服务。It should be understood that when the second NF sends the first request message to the first NRF to request an access token, it also needs to carry the information of the second NF, indicating that the second NF will request the service of the first NF for the purpose of interconnection.

在一些实施例中,第一请求消息进一步包括第二NF的信息以及第一服务的信息。In some embodiments, the first request message further includes information of the second NF and information of the first service.

应理解,当第二NF向第一NRF发送第一请求消息以请求访问令牌时,还需要携带第二NF的信息和第一服务的信息,表示该第二NF将在互联目的下请求第一NF的第一服务。It should be understood that when the second NF sends the first request message to the first NRF to request an access token, it also needs to carry the information of the second NF and the information of the first service, indicating that the second NF will request the third NRF for interconnection purposes. A NF's first service.

S440,响应于第一请求消息,第一NRF生成访问令牌。S440, in response to the first request message, the first NRF generates an access token.

该访问令牌包括第二PLMN的标识符和互联目的。The access token includes the identifier of the second PLMN and the purpose of the interconnection.

应理解,如果第一NRF确定可以授权以互联目的访问第一NF的服务,则将第一请求消息中的第二PLMN的标识符和互联目的写入访问令牌。It should be understood that if the first NRF determines that access to the service of the first NF for interconnection purposes can be authorized, the identifier of the second PLMN and the interconnection purpose in the first request message are written into the access token.

在一些实施例中,第一NRF确定所述互联目的下允许访问所述第一NF的NF的信息包括所述第二NF的信息,第一NRF生成访问令牌,该访问令牌进一步包括第二NF的信息。In some embodiments, the first NRF determines that the information of the NF that is allowed to access the first NF for the purpose of interconnection includes the information of the second NF, and the first NRF generates an access token, and the access token further includes: 2. NF information.

应理解,如果第一NRF确定可以授权第二NF以互联目的访问第一NF的服务,则将第一请求消息中的第二NF的信息写入访问令牌。It should be understood that if the first NRF determines that the second NF can be authorized to access the service of the first NF for interconnection purposes, the information of the second NF in the first request message is written into the access token.

在一些实施例中,所述第一NRF确定所述互联目的下允许访问所述第一NF的NF的信息包括所述第二NF的信息,以及所述互联目的下允许被访问的服务的信息包括所述第一服务的信息,第一NRF生成访问令牌,该访问令牌进一步包括第二NF的信息以及第一服务的信息。In some embodiments, the first NRF determines that the information of the NF that is allowed to access the first NF under the interconnection purpose includes the information of the second NF, and the information about the services that are allowed to be accessed under the interconnection purpose. Including the information of the first service, the first NRF generates an access token, which further includes the information of the second NF and the information of the first service.

应理解,如果第一NRF确定可以授权第二NF以互联目的访问第一NF的第一服务,则将第二NF的信息以及第一服务的信息写入访问令牌。It should be understood that if the first NRF determines that the second NF can be authorized to access the first service of the first NF for interconnection purposes, the information of the second NF and the information of the first service are written into the access token.

S450,第一NRF向第二NF发送访问令牌,相应的,第二NF接收来自第一NRF发送的访问令牌。S450: The first NRF sends the access token to the second NF. Correspondingly, the second NF receives the access token sent from the first NRF.

下面结合图5介绍一种注册方法500,该方法500是在NF注册到NRF的流程中执行的。从图5中可以看出,方法500包括:The following describes a registration method 500 in conjunction with Figure 5. This method 500 is executed during the process of NF registering to NRF. As can be seen in Figure 5, method 500 includes:

S510,NF服务提供者向第一NRF发送NF注册消息。S510: The NF service provider sends an NF registration message to the first NRF.

在服务化的系统架构中,NF需要在NRF进行注册登记后可以为其他NF提供服务。当NF需要其他NF为其提供服务时,可以先通过NRF执行服务发现,以发现所期望的为其提供服务的NF。In the service-oriented system architecture, NF needs to be registered with NRF to provide services for other NFs. When an NF needs other NFs to provide services for it, it can first perform service discovery through NRF to discover the desired NF that provides services for it.

当NF向NRF执行注册登记时,该NF注册消息可以携带NF配置文件(NF profile)。NFprofile可以指示该NF可以为哪些PLMN中的NF提供服务,或者可以指示该NF可以为哪些NF提供服务,或者可以指示该NF可以提供哪些服务。When NF performs registration with NRF, the NF registration message can carry the NF profile (NF profile). The NFprofile may indicate which NFs in which PLMNs the NF can provide services for, or may indicate which NFs the NF may provide services for, or may indicate which services the NF may provide.

需要说明的是,该NF服务提供者可以是任意的NF,该第一NRF为该NF服务提供者所在网络中的NRF。这里为方便理解,以NF服务提供者和第一NRF为例进行说明。It should be noted that the NF service provider can be any NF, and the first NRF is the NRF in the network where the NF service provider is located. To facilitate understanding, the NF service provider and the first NRF are used as examples for explanation.

例如,该NFprofile可以包括互联目的下允许访问的PLMN列表(allowedinterconnect PLMN),该互联目的下允许访问的PLMN列表包括一个或多个PLMN。该列表中的PLMN可以在互联场景下访问该NF。For example, the NFprofile may include a list of PLMNs that are allowed to be accessed for interconnection purposes (allowedinterconnect PLMNs). The list of PLMNs that are allowed to be accessed for interconnection purposes includes one or more PLMNs. PLMNs in this list can access the NF in the interconnection scenario.

示例性的,NF服务提供者在注册消息中携带了互联目的下允许访问的PLMN列表(PLMN1,PLMN2),那么处于PLMN1或PLMN2的服务消费者可以以互联目的使用该NF服务提供者提供的服务。如果NF服务消费者处于其他PLMN,则该NF服务消费者不可以使用该NF服务提供者提供的服务。For example, the NF service provider carries a list of PLMNs (PLMN1, PLMN2) that are allowed to be accessed for interconnection purposes in the registration message. Then the service consumer in PLMN1 or PLMN2 can use the services provided by the NF service provider for interconnection purposes. . If the NF service consumer is located in another PLMN, the NF service consumer cannot use the services provided by the NF service provider.

示例性的,第一NF向第一NRF发送注册消息,并在注册消息中携带了互联目的下允许访问的PLMN列表(PLMN1,PLMN2),如果第二NF位于PLMN1或PLMN2,则第二NF可以以互联目的使用第一NF提供的服务,如果第二NF位于其他PLMN,例如PLMN3,则第二NF不可以使用第一NF提供的服务。For example, the first NF sends a registration message to the first NRF, and the registration message carries the list of PLMNs (PLMN1, PLMN2) that are allowed to be accessed for interconnection purposes. If the second NF is located in PLMN1 or PLMN2, the second NF can To use the services provided by the first NF for interconnection purposes, if the second NF is located in another PLMN, such as PLMN3, the second NF cannot use the services provided by the first NF.

可选地,该互联目的下允许访问的PLMN列表可以表示为“互联目的:允许访问的PLMN列表”。即指示该允许访问的PLMN列表是在互联目的下使用的。Optionally, the list of PLMNs allowed to be accessed under the interconnection purpose can be expressed as "Interconnection purpose: list of PLMNs allowed to be accessed". That is, it indicates that the list of PLMNs allowed to be accessed is used for interconnection purposes.

可选地,该NFprofile还可以包括互联目的下允许访问的NF类型(allowedinterconnect NF type),该允许访问的NF类型包括一个或多个NF类型。该允许访问的NF类型中的NF类型可以在互联目的下访问该NF。Optionally, the NF profile may also include an NF type that is allowed to be accessed for interconnection purposes (allowedinterconnect NF type), and the NF type that is allowed to access includes one or more NF types. NF types within the allowed NF types can access the NF for interconnection purposes.

可选地,该互联目的下允许访问的NF类型可以表示为“互联目的:允许访问的NFtype”。即指示该允许访问的NF type是在互联目的下使用的。Optionally, the NF type allowed to be accessed under the interconnection purpose can be expressed as "Interconnection purpose: NFtype allowed to be accessed". That is, it indicates that the NF type that allows access is used for interconnection purposes.

示例性的,NF服务提供者在注册消息中携带了allowed interconnectNF type:(NF type1,NF type 2),那么NFtype为NF type 1或NF type 2的NF服务消费者可以使用NF服务提供者提供的服务。如果NF服务消费者为其他NFtype,则该NF服务消费者不可以使用该NF服务提供者提供的服务。该allowed interconnectNF type可以理解为允许访问该NF服务提供者的NF type。For example, the NF service provider carries the allowed interconnectNF type in the registration message: (NF type 1, NF type 2), then the NF service consumer whose NF type is NF type 1 or NF type 2 can use the NF service provider. Serve. If the NF service consumer is of another NF type, the NF service consumer cannot use the services provided by the NF service provider. The allowed interconnectNF type can be understood as the NF type that allows access to the NF service provider.

示例性的,第一NF向第一NRF发送注册消息,并在注册消息中携带了allowedinterconnectNF type:(NF type 1,NF type 2),如果第二NF为NF type 1或NF type 2,则第二NF可以使用第一NF提供的服务,如果第二NF为其他NF type,例如NF type 3,则第二NF不可以使用第一NF提供的服务。For example, the first NF sends a registration message to the first NRF, and carries the allowedinterconnectNF type in the registration message: (NF type 1, NF type 2). If the second NF is NF type 1 or NF type 2, then the The second NF can use the services provided by the first NF. If the second NF is another NF type, such as NF type 3, the second NF cannot use the services provided by the first NF.

可选地,该NFprofile还可以包括互联目的下允许被访问的服务(allowedinterconnect service),该允许被访问的服务包括一个或多个服务。该允许被访问的服务可以在互联目的下被其他NF访问。Optionally, the NFprofile may also include services that are allowed to be accessed for interconnection purposes (allowedinterconnect service), and the services that are allowed to be accessed include one or more services. The service that is allowed to be accessed can be accessed by other NFs for interconnection purposes.

可选地,该互联目的下允许被访问的服务可以表示为“互联目的:允许被访问的服务”。即指示该允许被访问的服务是在互联目的下使用的。Optionally, the services that are allowed to be accessed under the interconnection purpose can be expressed as "Interconnection purpose: services that are allowed to be accessed". That is, it indicates that the service that is allowed to be accessed is used for Internet purposes.

示例性的,NF服务提供者在注册消息中携带了allowed interconnectservice:(service1,service 2),则NF服务消费者可以使用NF服务提供者提供的service 1或service 2。如果NF服务消费者请求使用NF服务提供者的其他service,例如service 3,则该NF服务提供者可以拒绝NF服务消费者使用service 3。该allowed interconnectservice可以理解为互联目的下允许被访问的服务。For example, the NF service provider carries allowed interconnectservice (service1, service 2) in the registration message, then the NF service consumer can use service 1 or service 2 provided by the NF service provider. If the NF service consumer requests to use other services of the NF service provider, such as service 3, the NF service provider can deny the NF service consumer the use of service 3. The allowed interconnectservice can be understood as a service that is allowed to be accessed for interconnection purposes.

示例性的,第一NF向第一NRF发送注册消息,并在注册消息中携带了allowedinterconnect service:(service 1,service 2),如果第二NF请求使用第一NF提供的service1或service 2,则第一NF可以授权第二NF使用service 1或service 2。如果第二NF请求使用第一NF提供的其他服务,例如service 3,则第一NF可以拒绝第二NF使用service3。For example, the first NF sends a registration message to the first NRF, and carries the allowedinterconnect service in the registration message: (service 1, service 2). If the second NF requests to use service 1 or service 2 provided by the first NF, then The first NF can authorize the second NF to use service 1 or service 2. If the second NF requests to use other services provided by the first NF, such as service 3, the first NF can deny the second NF the use of service 3.

S520,第一NRF存储NF服务提供者的NFprofile。S520, the first NRF stores the NF profile of the NF service provider.

第一NRF在接收到注册消息后,可以保存该NF服务提供者的NFprofile。在后续NF服务消费者向第一NRF请求访问令牌时,该NF profile可以用于验证是否授权该NF服务消费者请求的访问令牌。After receiving the registration message, the first NRF can save the NF profile of the NF service provider. When a subsequent NF service consumer requests an access token from the first NRF, this NF profile can be used to verify whether the access token requested by the NF service consumer is authorized.

S530,第一NRF向NF发送注册接受消息。S530: The first NRF sends a registration acceptance message to the NF.

下面结合图6介绍一种发送访问令牌的方法600。从图6中可以看出,方法600包括:The following describes a method 600 for sending an access token in conjunction with Figure 6 . As can be seen in Figure 6, method 600 includes:

S610,NF服务消费者向第二NRF发送访问令牌获取请求消息。S610: The NF service consumer sends an access token acquisition request message to the second NRF.

在服务化的系统架构中,NF服务消费者向NF服务提供者请求服务时,NF服务提供者需要对NF服务消费者请求的服务进行授权检查,即检查NF服务消费者是否被授权使用请求的服务,通过了授权检查,NF服务提供者可以向NF服务消费者提供相应的服务。In the service-oriented system architecture, when the NF service consumer requests services from the 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. After the service passes the authorization check, the NF service provider can provide corresponding services to the NF service consumer.

针对NF服务提供者对NF服务消费者请求的服务的授权验证,可以使用基于访问令牌(access token)的授权验证方案。在NF服务消费者向NF服务提供网元请求服务之前,NF服务消费者向授权服务网元发送访问令牌获取请求消息以请求获取访问令牌,为了方便,这里以NRF为授权服务网元为例进行说明。For the authorization verification of the services requested by the NF service consumer by the NF service provider, an authorization verification scheme based on the access token can be used. Before the NF service consumer requests services from the NF service provider network element, the NF service consumer sends an access token acquisition request message to the authorized service network element to request the access token. For convenience, here NRF is used as the authorized service network element. Example to illustrate.

需要说明的是,NF服务消费者是需要使用服务的NF,第二NRF为NF服务消费者所在网络的NRF,NF服务提供者是提供服务的NF,第一NRF为NF服务提供者所在网络的NRF。NF服务消费者和NF服务提供者可以互换身份,这取决于谁是提供服务的NF,谁是使用服务的NF。示例性的,NF服务消费者可以为其他NF提供服务,在这个过程中,该NF服务消费者可以被称为NF服务提供者。It should be noted that the NF service consumer is the NF that needs to use the service. The second NRF is the NRF of the network where the NF service consumer is located. The NF service provider is the NF that provides the service. The first NRF is the network where the NF service provider is located. NRF. NF service consumers and NF service providers can interchange identities, depending on who is the NF providing the service and who is the NF using the service. For example, a NF service consumer can provide services for other NFs. In this process, the NF service consumer can be called an NF service provider.

在互联场景下,访问令牌获取请求消息包括互联目的(interconnect purpose)和NF服务消费者所在网络的PLMN标识符(customerPLMNID,cPLMN ID)。In the interconnection scenario, the access token acquisition request message includes the interconnection purpose and the PLMN identifier (customerPLMNID, cPLMN ID) of the network where the NF service consumer is located.

可选地,访问令牌获取请求消息包括NF服务消费者的NFtype或期望的服务名称(expected service name)。Optionally, the access token acquisition request message includes the NFtype or expected service name of the NF service consumer.

S620,第二NRF向第一NRF转发访问令牌获取请求消息。S620: The second NRF forwards the access token acquisition request message to the first NRF.

S630,第一NRF验证NF服务消费者是否被授权。S630, the first NRF verifies whether the NF service consumer is authorized.

第一NRF对访问令牌获取请求消息中的信息进行验证。具体地,第一NRF验证访问令牌获取请求消息中携带的信息是否与NF profile中相应的信息匹配。The first NRF verifies the information in the access token acquisition request message. Specifically, the first NRF verifies whether the information carried in the access token acquisition request message matches the corresponding information in the NF profile.

需要说明的是,在S630之前,NF服务提供者已经注册到第一NRF中,并且在注册消息中携带NF profile。It should be noted that before S630, the NF service provider has been registered in the first NRF and carries the NF profile in the registration message.

可选地,第一NRF还可以预先配置NF服务提供者的NF profile。Optionally, the first NRF may also pre-configure the NF profile of the NF service provider.

应理解,针对网络中的每一个NF,NRF网元可以预先配置其对应的NF profile。It should be understood that for each NF in the network, the NRF network element can pre-configure its corresponding NF profile.

应理解,该NF profile包括该NF服务提供者的allowed interconnect PLMN。It should be understood that the NF profile includes the allowed interconnect PLMN of the NF service provider.

应理解,当NF profile包括allowed interconnect PLMN时,如果NF服务消费者所位于的PLMN在该allowed interconnect PLMN中,该NF服务消费者可以被授权。如果NF服务消费者所位于的PLMN不在该allowed interconnect PLMN中,该NF服务提供者拒绝授权该NF服务消费者。可以理解,allowed interconnect PLMN中的任意一个PLMN中的NF服务消费者都可以使用NF服务提供者提供的服务。It should be understood that when the NF profile includes an allowed interconnect PLMN, if the PLMN where the NF service consumer is located is in the allowed interconnect PLMN, the NF service consumer can be authorized. If the PLMN where the NF service consumer is located is not in the allowed interconnect PLMN, the NF service provider refuses to authorize the NF service consumer. It can be understood that the NF service consumer in any PLMN in the allowed interconnect PLMN can use the services provided by the NF service provider.

在本申请实施例中,第一NRF可以验证访问令牌获取请求消息中携带的cPLMN ID是否在allowed interconnect PLMN中。如果cPLMN ID在allowed interconnect PLMN中,则该请求消息可以被授权,如果cPLMN ID不在allowed interconnect PLMN中,则NF服务提供者拒绝授权。In this embodiment of the present application, the first NRF may verify whether the cPLMN ID carried in the access token acquisition request message is in the allowed interconnect PLMN. If the cPLMN ID is in the allowed interconnect PLMN, the request message can be authorized. If the cPLMN ID is not in the allowed interconnect PLMN, the NF service provider refuses authorization.

可选地,该NF profile还可以包括该NF服务提供者的allowed interconnect NFtype或allowed interconnect service。Optionally, the NF profile may also include the allowed interconnect NFtype or allowed interconnect service of the NF service provider.

应理解,当NF profile包括allowed interconnect NF type时,第一NRF需要验证访问令牌获取请求消息中携带的NF服务消费者的NF type是否在该allowed interconnectNF type中,如果NF服务消费者的NF type在allowed interconnect NF type中,则该请求消息可以被授权,如果NF服务消费者的NF type不在allowed interconnect NF type中,则NF服务提供者拒绝授权。It should be understood that when the NF profile includes the allowed interconnect NF type, the first NRF needs to verify whether the NF type of the NF service consumer carried in the access token acquisition request message is in the allowed interconnect NF type. If the NF type of the NF service consumer is In the allowed interconnect NF type, the request message can be authorized. If the NF type of the NF service consumer is not in the allowed interconnect NF type, the NF service provider refuses authorization.

应理解,当NF profile包括allowed interconnect service时,第一NRF需要验证访问令牌获取请求消息中携带的expected service name是否在该allowed interconnectservice中,如果NF服务消费者的expectedservice name在allowed interconnectservice中,则该请求消息可以被授权,如果NF服务消费者的expectedservice name不在allowed interconnect service中,则NF服务提供者拒绝授权。It should be understood that when the NF profile includes an allowed interconnect service, the first NRF needs to verify whether the expected service name carried in the access token acquisition request message is in the allowed interconnect service. If the expected service name of the NF service consumer is in the allowed interconnect service, then The request message can be authorized. If the expected service name of the NF service consumer is not in the allowed interconnect service, the NF service provider refuses authorization.

如果上述验证流程验证均通过,则第一NRF生成访问令牌(access token),该access token中包括interconnect purpose和cPLMN ID。If the above verification process passes, the first NRF generates an access token (access token), which includes the interconnect purpose and cPLMN ID.

应理解,访问令牌中的interconnect purpose和cPLMN ID可以表示该访问令牌可以用于NF服务消费者在互联目的下访问,并且该NF服务消费者位于cPLMN ID所指示的网络。It should be understood that the interconnect purpose and cPLMN ID in the access token may indicate that the access token can be used by the NF service consumer for access under the interconnection purpose, and the NF service consumer is located in the network indicated by the cPLMN ID.

可选地,该access token还可以包括NF服务消费者的NF type或服务名称(service name)。Optionally, the access token may also include the NF type or service name of the NF service consumer.

应理解,访问令牌中的NF type可以指示能够使用该访问令牌进行访问的NF服务消费者的NF type。It should be understood that the NF type in the access token may indicate the NF type of the NF service consumer that can be accessed using the access token.

应理解,访问令牌中的service name为访问令牌获取请求消息中携带的expectedservice name。也就是说,NF服务消费者期望使用NF服务提供者的什么服务,如果第一NRF授权NF服务消费者使用该服务,则将该服务的名称写入访问令牌,该访问令牌可以用于使用NF服务提供者的该服务。It should be understood that the service name in the access token is the expected service name carried in the access token acquisition request message. That is, what service does the NF service consumer expect to use from the NF service provider? If the first NRF authorizes the NF service consumer to use the service, the name of the service is written into the access token, which can be used for Use this service from the NF service provider.

可选地,该access token还可以包括NF服务消费者的NF实例ID。S240,第一NRF向第二NRF发送访问令牌获取响应消息,该响应消息中包括访问令牌。Optionally, the access token may also include the NF instance ID of the NF service consumer. S240: The first NRF sends an access token acquisition response message to the second NRF, where the response message includes the access token.

S650,第二NRF向NF服务消费者转发访问令牌获取响应消息,该响应消息中包括访问令牌。S650: The second NRF forwards the access token to the NF service consumer to obtain a response message, and the response message includes the access token.

应理解,S640和S650用于第一NRF向NF服务消费发送访问令牌获取响应消息。It should be understood that S640 and S650 are used for the first NRF to send an access token acquisition response message to the NF service consumer.

示例性地,如果访问令牌获取请求消息中的信息均验证通过,则第一NRF通过访问令牌获取响应消息向NF服务消费者发送生成的access token。该访问令牌获取响应消息中还可以包括其他的信息,例如NRF的签名信息、access token的到期时间等。For example, if the information in the access token acquisition request message is verified, the first NRF sends the generated access token to the NF service consumer through the access token acquisition response message. The access token acquisition response message may also include other information, such as NRF signature information, access token expiration time, etc.

对应地,NF服务消费者接收来自第一NRF的access token,并保存该accesstoken,在有效期内,用于后续在互联场景下访问NF服务提供者的服务使用。Correspondingly, the NF service consumer receives the access token from the first NRF and saves the access token. During the validity period, it is used for subsequent service usage of accessing the NF service provider in the Internet scenario.

如果S630中的授权验证没有通过,则第一NRF向NF服务消费者发送错误响应或者拒绝响应。If the authorization verification in S630 fails, the first NRF sends an error response or a rejection response to the NF service consumer.

可选地,如果S630中的授权验证没有通过,则第一NRF向NF服务消费者拒绝的原因,例如,NF服务消费者所位于的PLMN不合法或NF服务消费者的NF类型不合法等。Optionally, if the authorization verification in S630 fails, the reason why the first NRF rejects the NF service consumer is, for example, the PLMN where the NF service consumer is located is illegal or the NF type of the NF service consumer is illegal, etc.

下面结合图7介绍一种授权验证的方法700,该方法700是请求NF服务提供者的服务的流程。从图7中可以看出,方法700包括:An authorization verification method 700 is introduced below with reference to Figure 7. This method 700 is a process of requesting services from an NF service provider. As can be seen in Figure 7, method 700 includes:

S701,NF服务消费者向第二SEPP发送服务请求消息,该服务请求消息用于向NF服务提供者请求服务。该服务请求消息包括访问令牌。S701. The NF service consumer sends a service request message to the second SEPP. The service request message is used to request services from the NF service provider. The service request message includes the access token.

在本申请实施例中,该服务请求消息包括cPLMN ID、请求的目的(purpose ofrequest)和access token。In this embodiment of the present application, the service request message includes the cPLMN ID, the purpose of the request, and the access token.

可选地,服务请求消息还可以包括NF服务消费者的NFtypeOptionally, the service request message may also include the NFtype of the NF service consumer.

可选地,服务请求消息还可以包括expected servicename。Optionally, the service request message may also include expected servicename.

应理解,access token包括已经得到授权的信息,例如,PLMN标识符、interconnect purpose。It should be understood that the access token includes authorized information, such as PLMN identifier and interconnect purpose.

可选地,access token还可以包括NF type。Optionally, the access token can also include NF type.

可选地,access token还可以包括service name。Optionally, the access token can also include the service name.

应理解,该服务请求消息是发送给NF服务提供者的,在消息传输过程中,第二SEPP起到中转的作用。It should be understood that the service request message is sent to the NF service provider, and during the message transmission process, the second SEPP plays a relay role.

应理解,该访问令牌受到了安全保护,因此恶意的NF无法对访问令牌内的信息进行篡改。可以是由分发该访问令牌的网元(例如第一NRF)对该访问令牌进行的安全保护。例如,第一NRF利用共享密钥对该访问令牌(或者是访问令牌内的信息)生成完整性保护参数(例如消息认证码MAC),第二NF在服务请求消息中携带该完整性保护参数。第一网元可以根据该完整性保护参数验证访问令牌内的信息是否被篡改。又例如,第一NRF利用私钥对安全令牌内的信息进行签名,在授权的过程中,可以通过对签名进行验证来确定访问令牌内的信息是否被篡改。It should be understood that the access token is protected by security, so malicious NF cannot tamper with the information in the access token. It may be the security protection of the access token by the network element (for example, the first NRF) that distributes the access token. For example, the first NRF uses the shared key to generate integrity protection parameters (such as message authentication code MAC) for the access token (or the information in the access token), and the second NF carries the integrity protection in the service request message. parameter. The first network element can verify whether the information in the access token has been tampered with based on the integrity protection parameter. For another example, the first NRF uses the private key to sign the information in the security token. During the authorization process, the signature can be verified to determine whether the information in the access token has been tampered with.

S702,第二SEPP验证服务请求消息是否被授权。S702. The second SEPP verifies whether the service request message is authorized.

具体地,第二SEPP验证aceess token中的信息与服务请求消息中的信息是否相同。Specifically, the second SEPP verifies whether the information in the aceess token is the same as the information in the service request message.

第二SEPP验证服务请求消息中的request of purpose和access token中的interconnect purpose是否相同,并验证服务请求消息中的cPLMN ID和access token中的PLMN标识符是否相同。The second SEPP verifies whether the request of purpose in the service request message and the interconnect purpose in the access token are the same, and verifies whether the cPLMN ID in the service request message and the PLMN identifier in the access token are the same.

可选地,如果acees token中包括NFtype,则第二SEPP验证服务请求消息中的NF服务消费者的NFtype是否与acees token中的NF type是否相同。Optionally, if the aces token includes NFtype, the second SEPP verifies whether the NF type of the NF service consumer in the service request message is the same as the NF type in the aces token.

可选地,如果acees token中包括service name,则第二SEPP验证服务请求消息中的expectedservice是否与acees token中的service name是否相同。Optionally, if the service name is included in the aces token, the second SEPP verifies whether the expected service in the service request message is the same as the service name in the aces token.

此外,第二SEPP还可以access token中的到期时间与当前的时间比较以验证该access token是否过期。或者,第二SEPP还可以基于访问令牌中的完整性保护参数或者签名验证access token是否被篡改。In addition, the second SEPP can also compare the expiration time in the access token with the current time to verify whether the access token has expired. Alternatively, the second SEPP can also verify whether the access token has been tampered based on the integrity protection parameters or signatures in the access token.

在上述验证流程中,如果aceess token中的信息与服务请求消息中的信息相同,则验证通过。如果不相同,则验证不通过。如果上述流程均验证通过,则在S703中第二SEPP向第一SEPP转发该服务请求消息。In the above verification process, if the information in the aceess token is the same as the information in the service request message, the verification passes. If they are not the same, the verification fails. If the above processes are all verified, in S703, the second SEPP forwards the service request message to the first SEPP.

如果上述任意一个流程验证没有通过,则向NF服务消费者发送错误响应或者拒绝响应。If any of the above process verification fails, an error response or rejection response is sent to the NF service consumer.

S703,第二SEPP向第一SEPP转发服务请求消息。S703. The second SEPP forwards the service request message to the first SEPP.

S704,第一SEPP验证服务请求消息是否被授权。S704: The first SEPP verifies whether the service request message is authorized.

S704与S702类似,具体可参考S702的相关描述。S704 is similar to S702. For details, please refer to the relevant description of S702.

应理解,S704为可选的步骤,如果在S702中已经对服务请求消息进行验证,则S704可以不对服务请求消息进行上述验证。It should be understood that S704 is an optional step. If the service request message has been verified in S702, the above verification of the service request message may not be performed in S704.

如果上述流程均验证通过,则在S705中第一SEPP向NF服务提供者转发该服务请求消息。If the above processes are all verified, in S705, the first SEPP forwards the service request message to the NF service provider.

如果上述任意一个流程验证没有通过,则向NF服务消费者发送错误响应或者拒绝响应。If any of the above process verification fails, an error response or rejection response is sent to the NF service consumer.

S705,第一SEPP向NF服务提供者转发服务请求消息。S705: The first SEPP forwards the service request message to the NF service provider.

S706,NF服务提供者验证服务请求消息是否被授权。S706: The NF service provider verifies whether the service request message is authorized.

具体地,NF服务提供者验证aceess token中的信息与服务请求消息中的信息是否相同。Specifically, the NF service provider verifies whether the information in the aceess token is the same as the information in the service request message.

NF服务提供者验证服务请求消息中的request of purpose和access token中的interconnect purpose是否相同,并验证服务请求消息中的cPLMN ID和access token中的PLMN标识符是否相同。The NF service provider verifies whether the request of purpose in the service request message and the interconnect purpose in the access token are the same, and verifies whether the cPLMN ID in the service request message and the PLMN identifier in the access token are the same.

可选地,如果acees token中包括NF type,则NF服务提供者验证服务请求消息中的NF服务消费者的NF type是否与acees token中的NF type是否相同。Optionally, if the NF type is included in the aces token, the NF service provider verifies whether the NF type of the NF service consumer in the service request message is the same as the NF type in the aces token.

可选地,如果acees token中包括service name,则NF服务提供者验证服务请求消息中的expectedservice是否与acees token中的service name是否相同。Optionally, if the service name is included in the aces token, the NF service provider verifies whether the expected service in the service request message is the same as the service name in the aces token.

此外,NF服务提供者还可以access token中的到期时间与当前的时间比较以验证该access token是否过期。NF服务提供者还可以验证access token中的NF服务提供者的NF实例ID或NF type与自己的id或type是否相同。In addition, the NF service provider can also compare the expiration time in the access token with the current time to verify whether the access token has expired. The NF service provider can also verify whether the NF instance ID or NF type of the NF service provider in the access token is the same as its own id or type.

可选地,NF服务提供者还可以对access token进行完整性验证。Optionally, the NF service provider can also perform integrity verification on the access token.

示例性地,NF服务提供者从服务请求消息中获取access token,并对该accesstoken进行完整性验证。例如,该服务请求消息中携带了通过共享密钥对access token中的信息生成的MAC值(该共享密钥为NF服务提供者与NRF之间共享的密钥),则NF服务提供者使用共享密钥验证该MAC值;又例如,NRF对该access token进行了签名,则NF服务提供者使用NRF的公钥验证该签名。For example, the NF service provider obtains the access token from the service request message and performs integrity verification on the access token. For example, the service request message carries a MAC value generated by using a shared key pair with the information in the access token (the shared key is a key shared between the NF service provider and the NRF), then the NF service provider uses the shared key The key verifies the MAC value; for another example, if NRF signs the access token, the NF service provider uses NRF's public key to verify the signature.

如果上述流程均验证通过,则NF服务提供者可以执行NF服务消费者请求的服务,并在S707,向NF服务消费者发送服务响应消息。如果上述任意一个流程验证没有通过,则向NF服务消费者发送错误响应或者拒绝响应。If the above processes are all verified, the NF service provider can perform the service requested by the NF service consumer, and in S707, send a service response message to the NF service consumer. If any of the above process verification fails, an error response or rejection response is sent to the NF service consumer.

可选地,也可以在服务请求消息中不携带请求的目的,而是以accesstoken中的interconnect purpose为准进行验证。即验证accesstoken是否允许访问即可。Optionally, the service request message may not carry the request purpose, but the interconnect purpose in the accesstoken shall be used for verification. That is, verify whether the accesstoken allows access.

S707,NF服务提供者向NF服务消费者发送服务响应消息。S707, the NF service provider sends a service response message to the NF service consumer.

应理解,在S707中,该服务响应消息可以通过第一SEPP、第二SEPP进行转发。It should be understood that in S707, the service response message can be forwarded through the first SEPP and the second SEPP.

下面结合图8介绍一种服务授权方法800,该方法800是请求NF服务提供者的服务的流程。在方法800中,服务消费者可以向服务提供者发送服务请求消息,由SEPP配置参数列表,并对服务请求消息进行服务授权。这样,对SEPP配置的参数进行修改就可以支持互联场景的服务授权,并支持更细粒度的服务访问控制。The following describes a service authorization method 800 in conjunction with Figure 8. This method 800 is a process for requesting services from an NF service provider. In method 800, the service consumer can send a service request message to the service provider, configure the parameter list by SEPP, and perform service authorization on the service request message. In this way, modifying SEPP configuration parameters can support service authorization in interconnection scenarios and support more fine-grained service access control.

从图8中可以看出,方法800包括:As can be seen in Figure 8, method 800 includes:

S810,第二SEPP和/或第一SEPP配置参数列表。S810, the second SEPP and/or the first SEPP configuration parameter list.

需要说明的是,第一SEPP和NF服务提供者位于第一PLMN,第二SEPP和NF服务消费者位于第二PLMN。It should be noted that the first SEPP and NF service provider are located in the first PLMN, and the second SEPP and NF service consumer are located in the second PLMN.

以第一SEPP为例进行说明,第一SEPP可以配置互联目的下允许访问NF服务提供者的NF的信息。Taking the first SEPP as an example for explanation, the first SEPP can configure information that allows access to the NF of the NF service provider for interconnection purposes.

应理解,NF服务提供者可以有多个,每个NF服务提供者对应一个或多个NF的信息。该NF的信息可以是NF的类型,或者也可以是NF实例的ID。示例性的,第一NF服务提供者在互联目的下允许被NF type1或NFtype2的NF服务消费者访问。It should be understood that there can be multiple NF service providers, and each NF service provider corresponds to information of one or more NFs. The NF information may be the type of NF or the ID of the NF instance. For example, the first NF service provider allows access by NF type 1 or NF type 2 NF service consumers for interconnection purposes.

示例性的,第一SEPP配置的参数列表可以如表1所示。By way of example, the parameter list of the first SEPP configuration may be as shown in Table 1.

表1Table 1

应理解,上述表1中的参数列表可以按需选取,不一定需要全部进行配置。It should be understood that the parameter list in Table 1 above can be selected as needed and does not necessarily need to be configured in full.

应理解,表1中允许访问的NF的信息(服务消费者)指示哪些服务消费者可以访问服务提供者,可以理解为针对每一个服务提供者,配置允许访问该每一个服务提供者的服务消费者;表1中允许被访问的NF的信息(服务提供者)指示哪些服务提供者可以被访问。It should be understood that the information (service consumers) of the NFs allowed to access in Table 1 indicates which service consumers can access the service providers. It can be understood that for each service provider, configure the service consumers that are allowed to access each service provider. The information (service providers) of the NF that is allowed to be accessed in Table 1 indicates which service providers can be accessed.

以第二SEPP为例进行说明,第二SEPP配置的参数列表可以如表2所示。Taking the second SEPP as an example for explanation, the parameter list configured in the second SEPP can be as shown in Table 2.

表2Table 2

S820,NF服务消费者向第二SEPP发送服务请求消息。S820: The NF service consumer sends a service request message to the second SEPP.

NF服务消费者向第二SEPP发送服务请求消息,该服务请求消息用于请求NF服务提供者向NF服务消费者提供服务,该请求消息携带purpose of request和NF服务消费者的NF的信息。The NF service consumer sends a service request message to the second SEPP. The service request message is used to request the NF service provider to provide services to the NF service consumer. The request message carries the purpose of request and the NF information of the NF service consumer.

可选地,该服务请求消息携带第一PLMN的标识符。Optionally, the service request message carries the identifier of the first PLMN.

可选地,该服务请求消息携带第二PLMN的标识符。Optionally, the service request message carries the identifier of the second PLMN.

可选地,该服务请求消息携带NF服务提供者的NF的信息。Optionally, the service request message carries NF information of the NF service provider.

可选地,该服务请求消息携带expectedservice name。Optionally, the service request message carries expected service name.

S830,第二SEPP验证服务请求消息是否被授权。S830: The second SEPP verifies whether the service request message is authorized.

在互联目的下,即该请求消息中的purpose of request为interconnect purpose的情况下,第二SEPP可以根据配置的参数列表验证服务请求消息,也就是说,第二SEPP可以根据配置的参数执行NF服务消费者使用NF服务提供者的服务的授权。For the purpose of interconnection, that is, when the purpose of request in the request message is interconnect purpose, the second SEPP can verify the service request message according to the configured parameter list. That is to say, the second SEPP can execute the NF service according to the configured parameters. The consumer's authorization to use the services of the NF service provider.

如果第二SEPP配置了允许访问的NF的信息,则验证NF服务消费者的NF信息是否属于该允许访问的NF的信息。如果是,则验证通过。否,则验证不通过。If the second SEPP is configured with the information of the NF that is allowed to be accessed, it is verified whether the NF information of the NF service consumer belongs to the information of the NF that is allowed to be accessed. If yes, the verification passes. If not, the verification fails.

如果第二SEPP配置了允许第二PLMN访问的PLMN的信息,则验证第一PLMN是否属于该允许第二PLMN访问的PLMN的信息。如果是,则验证通过。否,则验证不通过。If the second SEPP configures the information of the PLMN that allows the second PLMN to access, verify whether the first PLMN belongs to the information of the PLMN that allows the second PLMN to access. If yes, the verification passes. If not, the verification fails.

如果第二SEPP配置了允许被访问的NF的信息,则验证NF服务提供者的NF信息是否属于该允许被访问的NF的信息。如果是,则验证通过。否,则验证不通过。If the second SEPP is configured with the information of the NF that is allowed to be accessed, it is verified whether the NF information of the NF service provider belongs to the information of the NF that is allowed to be accessed. If yes, the verification passes. If not, the verification fails.

如果第二SEPP配置了允许被访问的服务的信息,则验证expected service name是否属于该允许被访问的服务的信息。如果是,则验证通过。否,则验证不通过。If the second SEPP is configured with the information of the service that is allowed to be accessed, verify whether the expected service name belongs to the information of the service that is allowed to be accessed. If yes, the verification passes. If not, the verification fails.

如果上述验证流程均通过,在S840中将该服务请求消息转发给第一SEPP。If the above verification process passes, the service request message is forwarded to the first SEPP in S840.

S840,第二SEPP将服务请求消息转发给第一SEPP。S840: The second SEPP forwards the service request message to the first SEPP.

S850,第一SEPP验证服务请求消息是否被授权。S850: The first SEPP verifies whether the service request message is authorized.

如果该请求消息中的purpose of request为interconnect purpose。第一SEPP可以基于配置的参数列表验证服务请求消息:If the purpose of request in the request message is interconnect purpose. The first SEPP can validate the service request message based on the configured parameter list:

如果第一SEPP配置了允许访问的NF的信息,则验证NF服务消费者的NF信息是否属于该允许访问的NF的信息。如果是,则验证通过。否,则验证不通过。If the first SEPP configures the information of the NF that is allowed to be accessed, it is verified whether the NF information of the NF service consumer belongs to the information of the NF that is allowed to be accessed. If yes, the verification passes. If not, the verification fails.

如果第一SEPP配置了允许访问第一PLMN的PLMN的信息,则验证第二PLMN是否属于该允许访问第一PLMN的PLMN的信息。如果是,则验证通过。否,则验证不通过。If the first SEPP is configured with the information of a PLMN that is allowed to access the first PLMN, it is verified whether the second PLMN belongs to the information of the PLMN that is allowed to access the first PLMN. If yes, the verification passes. If not, the verification fails.

如果第一SEPP配置了允许被访问的NF的信息,则验证NF服务提供者的NF信息是否属于该允许被访问的NF的信息。如果是,则验证通过。否,则验证不通过。If the first SEPP configures the information of the NF that is allowed to be accessed, it is verified whether the NF information of the NF service provider belongs to the information of the NF that is allowed to be accessed. If yes, the verification passes. If not, the verification fails.

如果第一SEPP配置了允许被访问的服务的信息,则验证expected service name是否属于该允许被访问的服务的信息。如果是,则验证通过。否,则验证不通过。If the first SEPP is configured with information about services that are allowed to be accessed, verify whether the expected service name belongs to the information about services that are allowed to be accessed. If yes, the verification passes. If not, the verification fails.

如果上述验证流程均通过,在S860中将该服务请求消息转发给NF服务提供者。If the above verification process passes, the service request message is forwarded to the NF service provider in S860.

可选地,由第一SEPP和第二SEPP执行的验证流程可以由其中任意一个SEPP执行。Optionally, the verification process performed by the first SEPP and the second SEPP may be performed by any one of the SEPPs.

应理解,由第一SEPP和第二SEPP对服务请求消息进行的验证可以是初步的验证,也可以是完整的验证。在第一SEPP和第二SEPP进行验证后,NF服务提供者可以继续对该服务请求消息进行授权验证。It should be understood that the verification of the service request message by the first SEPP and the second SEPP may be preliminary verification or complete verification. After the first SEPP and the second SEPP verify, the NF service provider can continue to perform authorization verification on the service request message.

S860,第一SEPP将服务请求消息转发给NF服务提供者。S860: The first SEPP forwards the service request message to the NF service provider.

图9是本申请实施例提供的授权验证的装置的示意性框图。该装置900包括收发单元910和处理单元920。收发单元910可以实现相应的通信功能,处理单元920用于进行数据处理。收发单元910还可以称为通信接口或通信单元。Figure 9 is a schematic block diagram of an authorization verification device provided by an embodiment of the present application. The device 900 includes a transceiver unit 910 and a processing unit 920. The transceiver unit 910 can implement corresponding communication functions, and the processing unit 920 is used for data processing. The transceiver unit 910 may also be called a communication interface or a communication unit.

可选地,该装置900还可以包括存储单元,该存储单元可以用于存储指令和/或数据,处理单元920可以读取存储单元中的指令和/或数据,以使得通信装置实现前述方法实施例。Optionally, the device 900 may also include a storage unit, which may be used to store instructions and/or data, and the processing unit 920 may read the instructions and/or data in the storage unit, so that the communication device implements the foregoing method implementation. example.

该装置900可以用于执行上文方法实施例中第一网元(例如,NF服务提供者,或第一SEPP,或第二SEPP)所执行的动作,这时,该装置900可以为第一网元或者可配置于第一网元的部件,收发单元910用于执行上文方法实施例中第一网元侧的收发相关的操作,处理单元920用于执行上文方法实施例中第一网元的处理相关的操作。The device 900 may be used to perform the actions performed by the first network element (for example, the NF service provider, or the first SEPP, or the second SEPP) in the above method embodiment. In this case, the device 900 may be the first network element. A network element or a component that can be configured in the first network element. The transceiver unit 910 is configured to perform transceiver-related operations on the first network element side in the above method embodiment. The processing unit 920 is configured to perform the first transceiver operation in the above method embodiment. Operations related to network element processing.

或者,该装置900可以用于执行上文方法实施例中NRF(第一NRF或第二NRF)所执行的动作,这时,该装置900可以为NRF或者可配置于NRF的部件,收发单元910用于执行上文方法实施例中NRF的收发相关的操作,处理单元920用于执行上文方法实施例中NRF的处理相关的操作。Alternatively, the device 900 can be used to perform the actions performed by the NRF (first NRF or second NRF) in the above method embodiment. In this case, the device 900 can be an NRF or a component configurable in the NRF, the transceiver unit 910 The processing unit 920 is configured to perform operations related to the transmission and reception of the NRF in the above method embodiment, and the processing unit 920 is used to perform operations related to the processing of the NRF in the above method embodiment.

该装置900可实现对应于根据本申请实施例的方法300中的第一网元执行的步骤或流程;或者,可实现对应于根据本申请实施例的方法700中的第一SEPP、第二SEPP或NF服务提供者执行的步骤或流程。该装置900可以包括用于执行图3中的方法300或图7中的方法700执行的方法的单元。并且,该装置900中的各单元和上述其他操作和/或功能分别为了实现方法300或方法700的相应流程。The device 900 can implement steps or processes corresponding to the execution of the first network element in the method 300 according to the embodiment of the present application; or, it can implement steps or processes corresponding to the first SEPP and the second SEPP in the method 700 according to the embodiment of the present application. or the steps or processes performed by the NF service provider. The apparatus 900 may include units for performing the method 300 in FIG. 3 or the method performed by the method 700 in FIG. 7 . Moreover, each unit in the device 900 and the above-mentioned other operations and/or functions are respectively intended to implement the corresponding processes of the method 300 or the method 700.

其中,当该装置900用于执行图3中的方法300时,收发单元910可用于执行方法300中的步骤S301,处理单元920可用于执行方法500中的步骤S302。When the device 900 is used to execute the method 300 in FIG. 3 , the transceiver unit 910 can be used to execute step S301 in the method 300 , and the processing unit 920 can be used to execute step S302 in the method 500 .

当该装置900用于执行图7中的方法700时,收发单元910可用于执行方法700中的步骤S701、S703、S705、S707,处理单元920用于指示方法700中的S702、S704、S706。When the device 900 is used to execute the method 700 in FIG. 7 , the transceiver unit 910 can be used to execute steps S701, S703, S705, and S707 in the method 700, and the processing unit 920 is used to instruct S702, S704, and S706 in the method 700.

应理解,各单元执行上述相应步骤的具体过程在上述方法实施例中已经详细说明,为了简洁,在此不再赘述。It should be understood that the specific process of each unit performing the above corresponding steps has been described in detail in the above method embodiments, and will not be described again for the sake of brevity.

该装置900还可以实现对应于根据本申请实施例的方法800中的第一SEPP、第二SEPP执行的步骤或流程,该装置900可以包括用于执行图8中的方法800执行的方法的单元。并且,该装置900中的各单元和上述其他操作和/或功能分别为了实现方法800的相应流程。The device 900 can also implement steps or processes corresponding to the execution of the first SEPP and the second SEPP in the method 800 according to the embodiment of the present application, and the device 900 can include a unit for executing the method executed by the method 800 in Figure 8 . Moreover, each unit in the device 900 and the above-mentioned other operations and/or functions are respectively intended to implement the corresponding processes of the method 800.

当该装置900用于执行图8中的方法800时,收发单元910可用于执行方法800中的步骤S820、S840或S860,处理单元920可用于执行方法800中的步骤S830、S850。When the device 900 is used to perform the method 800 in FIG. 8 , the transceiving unit 910 can be used to perform steps S820, S840 or S860 in the method 800, and the processing unit 920 can be used to perform steps S830 and S850 in the method 800.

应理解,各单元执行上述相应步骤的具体过程在上述方法实施例中已经详细说明,为了简洁,在此不再赘述。It should be understood that the specific process of each unit performing the above corresponding steps has been described in detail in the above method embodiments, and will not be described again for the sake of brevity.

该装置900还可以实现对应于根据本申请实施例的方法400、方法500或方法600中的第一NRF或第二NRF执行的步骤或流程,该装置900可以包括用于执行图4中的方法400或图5中的方法500或图6中的方法600执行的方法的单元。并且,该装置900中的各单元和上述其他操作和/或功能分别为了实现方法400或方法500或方法600的相应流程。The device 900 may also implement steps or processes corresponding to the execution of the first NRF or the second NRF in the method 400, the method 500 or the method 600 according to the embodiment of the present application, and the device 900 may include a method for executing the method in Figure 4 400 or a unit of the method performed by method 500 in FIG. 5 or method 600 in FIG. 6 . Moreover, each unit in the device 900 and the above-mentioned other operations and/or functions are respectively intended to implement the corresponding processes of the method 400, the method 500, or the method 600.

当该装置900用于执行图4中的方法400时,收发单元910可用于执行方法400中的步骤S410或S430或S450,处理单元920可用于执行方法400中的步骤S420或S440。当该装置900用于执行图5中的方法500时,收发单元910可用于执行方法500中的步骤S510或S530,处理单元920可用于执行方法500中的步骤S520。当该装置900用于执行图6中的方法600时,收发单元910可用于执行方法600中的步骤S610、S620、S640或S650,处理单元920可用于执行方法600中的步骤S630。When the device 900 is used to perform the method 400 in FIG. 4 , the transceiving unit 910 can be used to perform step S410 or S430 or S450 in the method 400 , and the processing unit 920 can be used to perform step S420 or S440 in the method 400 . When the device 900 is used to perform the method 500 in FIG. 5 , the transceiver unit 910 can be used to perform step S510 or S530 in the method 500 , and the processing unit 920 can be used to perform step S520 in the method 500 . When the device 900 is used to perform the method 600 in FIG. 6 , the transceiving unit 910 can be used to perform steps S610, S620, S640 or S650 in the method 600, and the processing unit 920 can be used to perform step S630 in the method 600.

应理解,各单元执行上述相应步骤的具体过程在上述方法实施例中已经详细说明,为了简洁,在此不再赘述。It should be understood that the specific process of each unit performing the above corresponding steps has been described in detail in the above method embodiments, and will not be described again for the sake of brevity.

如图10所示,本申请实施例还提供一种设备1000。该设备1000包括处理器1010,处理器1010与存储器1020耦合,存储器1020用于存储计算机程序或指令和/或数据,处理器1010用于执行存储器1020存储的计算机程序或指令和/或数据,使得上文方法实施例中的方法被执行。As shown in Figure 10, an embodiment of the present application also provides a device 1000. The device 1000 includes a processor 1010 coupled to a memory 1020 for storing computer programs or instructions and/or data, and the processor 1010 is used for executing the computer programs or instructions and/or data stored in the memory 1020, such that The methods in the above method embodiments are executed.

可选地,该设备1000包括的处理器1010为一个或多个。Optionally, the device 1000 includes one or more processors 1010 .

可选地,如图10所示,该设备1000还可以包括存储器1020。Optionally, as shown in Figure 10, the device 1000 may also include a memory 1020.

可选地,该设备1000包括的存储器1020可以为一个或多个。Optionally, the device 1000 may include one or more memories 1020 .

可选地,该存储器1020可以与该处理器1010集成在一起,或者分离设置。Optionally, the memory 1020 can be integrated with the processor 1010 or provided separately.

可选地,如图10所示,该设备1000还可以包括收发器1030,收发器1030用于信号的接收和/或发送。例如,处理器1010用于控制收发器1030进行信号的接收和/或发送。Optionally, as shown in Figure 10, the device 1000 may also include a transceiver 1030, which is used for receiving and/or transmitting signals. For example, the processor 1010 is used to control the transceiver 1030 to receive and/or transmit signals.

作为一种方案,该设备1000用于实现上文方法实施例中由第一网元或者NF服务提供者或者安全边缘保护代理网元(第一SEPP或第二SEPP)执行的操作。As a solution, the device 1000 is used to implement the operations performed by the first network element or the NF service provider or the security edge protection proxy network element (the first SEPP or the second SEPP) in the above method embodiment.

例如,处理器1010用于实现上文方法实施例中由第一网元或者NF服务提供者或者安全边缘保护代理网元(第一SEPP或第二SEPP)执行的处理相关的操作,收发器1030用于实现上文方法实施例中由第一网元或者NF服务提供者或者安全边缘保护代理网元(第一SEPP或第二SEPP)执行的收发相关的操作。For example, the processor 1010 is used to implement processing-related operations performed by the first network element or the NF service provider or the security edge protection proxy network element (the first SEPP or the second SEPP) in the above method embodiment, and the transceiver 1030 It is used to implement the transceiver-related operations performed by the first network element or the NF service provider or the security edge protection proxy network element (the first SEPP or the second SEPP) in the above method embodiment.

作为又一种方案,该设备1000用于实现上文方法实施例中由第一NRF或第二NRF执行的操作。As yet another solution, the device 1000 is used to implement the operations performed by the first NRF or the second NRF in the above method embodiment.

例如,处理器1010用于实现上文方法实施例中由第一NRF或第二NRF执行的处理相关的操作,收发器1030用于实现上文方法实施例中由第一NRF或第二NRF执行的收发相关的操作。For example, the processor 1010 is used to implement processing-related operations performed by the first NRF or the second NRF in the above method embodiment, and the transceiver 1030 is used to implement the processing-related operations performed by the first NRF or the second NRF in the above method embodiment. Sending and receiving related operations.

应理解,各模块执行上述相应步骤的具体过程在上述方法实施例中已经详细说明,为了简洁,在此不再赘述。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 will not be described again for the sake of brevity.

本申请实施例还提供了一种处理装置,包括处理器和接口;该处理器用于执行上述任一方法实施例中的方法。Embodiments of the present application also provide a processing device, including a processor and an interface; the processor is configured to execute the method in any of the above method embodiments.

应理解,上述处理装置可以是一个或多个芯片。例如,该处理装置可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(applicationspecific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(networkprocessor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logicdevice,PLD)或其他集成芯片。It should be understood that the above-mentioned processing device may be one or more chips. For example, the processing device may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), or a A central processing unit (CPU) may also be a network processor (NP), a digital signal processor (DSP), or a microcontroller unit (MCU). ), or it can be a programmable logic device (PLD) or other integrated chip.

本申请实施例还提供一种计算机可读存储介质,其上存储有用于实现上述方法实施例中由第一网元(NF服务提供者、第一SEPP或第二SEPP)或者NRF(第一NRF或第二NRF)执行的方法的计算机指令。Embodiments of the present application also provide a computer-readable storage medium on which is stored the information provided by the first network element (NF service provider, first SEPP or second SEPP) or NRF (first NRF) for implementing the above method embodiment. or second NRF) computer instructions for performing a method.

例如,该计算机程序被计算机执行时,使得该计算机可以实现上述方法实施例中由第一网元(NF服务提供者、第一SEPP或第二SEPP)或者NRF(第一NRF或第二NRF)执行的方法。For example, when the computer program is executed by a computer, the computer can implement the first network element (NF service provider, first SEPP or second SEPP) or NRF (first NRF or second NRF) in the above method embodiment. method of execution.

本申请实施例还提供一种包含指令的计算机程序产品,该指令被计算机执行时使得该计算机实现上述方法实施例中由第一网元(NF服务提供者、第一SEPP或第二SEPP)执行的方法,或由NRF(第一NRF或第二NRF)执行的方法。Embodiments of the present application also provide a computer program product containing instructions. When the instructions are executed by a computer, the computer implements the method executed by the first network element (NF service provider, first SEPP or second SEPP) in the above embodiments. method, or a method performed by an NRF (first NRF or second NRF).

本申请实施例还提供一种通信系统,该通信系统包括上文实施例中的第一网元、第一SEPP、第二SEPP、第一NRF、第二NRF中的至少两个。An embodiment of the present application also provides a communication system, which includes at least two of the first network element, the first SEPP, the second SEPP, the first NRF, and the second NRF in the above embodiment.

所属领域的技术人员可以清楚地了解到,为描述方便和简洁,上述提供的任一种通信装置中相关内容的解释及有益效果均可参考上文提供的对应的方法实施例,此处不再赘述。Those skilled in the art can clearly understand that for the convenience and simplicity of description, the explanation and beneficial effects of the relevant content in any of the communication devices provided above can be referred to the corresponding method embodiments provided above, and will not be repeated here. Repeat.

本申请实施例并未对本申请实施例提供的方法的执行主体的具体结构进行特别限定,只要能够通过运行记录有本申请实施例提供的方法的代码的程序,以根据本申请实施例提供的方法进行通信即可。例如,本申请实施例提供的方法的执行主体可以是终端设备或网络设备,或者,是终端设备或网络设备中能够调用程序并执行程序的功能模块。The embodiments of this application do not specifically limit the specific structure of the execution body of the method provided by the embodiments of this application, as long as the program recorded in the code of the method provided by the embodiments of this application can be used according to the method provided by the embodiments of this application. Just communicate. For example, the execution subject 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 may be implemented as methods, apparatus, or articles 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 medium.

其中,计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质(或者说计算机可读介质)例如可以包括但不限于:磁性介质或磁存储器件(例如,软盘、硬盘(如移动硬盘)、磁带)、光介质(例如,光盘、压缩盘(compact disc,CD)、数字通用盘(digital versatiledisc,DVD)等)、智能卡和闪存器件(例如,可擦写可编程只读存储器(erasableprogrammable read-only memory,EPROM)、卡、棒或钥匙驱动器等)、或者半导体介质(例如固态硬盘(solid state disk,SSD)等、U盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)等各种可以存储程序代码的介质。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 data center integrated with one or more available media. Available media (or computer-readable media) may include, for example, but are not limited to: magnetic media or magnetic storage devices (such as floppy disks, hard disks (such as mobile hard disks), magnetic tapes), optical media (such as optical disks, compact discs) , CD), digital versatile disk (digital versatile disc (DVD), etc.), smart cards and flash memory devices (e.g., 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.) that can store program code medium.

本文描述的各种存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读介质。术语“机器可读介质”可以包括但不限于:无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。The various storage media described herein may 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 rateSDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(directrambus 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 non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically removable memory. Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory. Volatile memory may be random access memory (RAM). For example, RAM can be used as an external cache. As an example and not a 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 link dynamic random access memory (synchlink DRAM, SLDRAM) and direct Memory bus random access memory (directrambus 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 device, discrete gate or transistor logic device, or discrete hardware component, the memory (storage module) can 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 can 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 may be combined or may be Integrated into another system, or some features can be ignored, or not implemented. In addition, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the 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. The components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to implement the solution provided by this application.

另外,在本申请各个实施例中的各功能单元可以集成在一个单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application can be integrated into one unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。In the above embodiments, it may be implemented in whole or in part 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 computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device. For example, the computer may be a personal computer, a server, or a network device. Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g., computer instructions may be transmitted from a website, computer, server or data center via a wired link (e.g. Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means to transmit to another website site, computer, server or data center. Regarding the computer-readable storage medium, please refer to the above description.

以上该,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求和说明书的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily imagined by those skilled in the art within the technical scope disclosed in the present application are all should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims and the description.

Claims (33)

1.一种授权验证的方法,其特征在于,包括:1. An authorization verification method, characterized by including: 第一网元接收来自第二网络功能的服务请求消息,所述第二网络功能位于第二陆地公用移动通信网络,所述服务请求消息用于请求位于第一陆地公用移动通信网络的第一网络功能向所述第二网络功能提供第一服务,所述服务请求消息包括访问令牌、请求的目的和所述第二陆地公用移动通信网络的标识符,所述访问令牌包括陆地公用移动通信网络标识符和互联目的;The first network element receives a service request message from a second network function located in a second terrestrial public mobile communication network. The service request message is used to request a first network located in a first terrestrial public mobile communication network. Function provides a first service to said second network function, said service request message comprising an access token, a purpose of the request and an identifier of said second terrestrial public mobile communications network, said access token comprising terrestrial public mobile communications network Network identifiers and interconnection purposes; 所述第一网元执行所述第二网络功能使用所述第一服务的授权,在所述执行授权之前,确定所述第二陆地公用移动通信网络的标识符与所述访问令牌中的陆地公用移动通信网络标识符相同,以及所述请求的目的与所述互联目的相同。The first network element performs the authorization of the second network function to use the first service. Before performing the authorization, determine the identifier of the second land public mobile communication network and the number in the access token. The land public mobile communication network identifier is the same, and the purpose of the request is the same as the interconnection purpose. 2.根据权利要求1所述的方法,其特征在于,所述服务请求消息进一步包括第二网络功能的信息,所述访问令牌进一步包括网络功能的信息;2. The method of claim 1, wherein the service request message further includes information about a second network function, and the access token further includes information about a network function; 在所述执行授权之前,进一步包括:所述第一网元确定所述第二网络功能的信息与所述网络功能的信息相同。Before the authorization is executed, the method further includes: the first network element determining that the information of the second network function is the same as the information of the network function. 3.根据权利要求1或2所述的方法,其特征在于,所述服务请求消息进一步包括所述第一服务的信息,所述访问令牌包括服务的信息;3. The method according to claim 1 or 2, wherein the service request message further includes information about the first service, and the access token includes information about the service; 在所述执行授权之前,进一步包括:所述第一网元确定所述第一服务的信息与所述服务的信息相同。Before performing the authorization, the method further includes: the first network element determining that the information of the first service is the same as the information of the service. 4.根据权利要求1至3中任一项所述的方法,其特征在于,所述方法进一步包括:4. The method according to any one of claims 1 to 3, characterized in that the method further comprises: 所述第一网元拒绝所述第二网络功能使用所述第一服务,在所述拒绝之前,确定所述第二陆地公用移动通信网络的标识符与所述访问令牌中的陆地公用移动通信网络标识符不相同,和/或所述请求的目的与所述互联目的不相同。The first network element refuses the second network function to use the first service, and before the refusal, determines the identifier of the second land public mobile communication network and the land public mobile phone number in the access token. The communication network identifier is not the same, and/or the purpose of the request is not the same as the purpose of the interconnection. 5.根据权利要求1至3中任一项所述的方法,其特征在于,所述服务请求消息进一步包括第二网络功能的信息,所述访问令牌进一步包括网络功能的信息;5. The method according to any one of claims 1 to 3, wherein the service request message further includes information of a second network function, and the access token further includes information of a network function; 所述方法进一步包括:The method further includes: 所述第一网元拒绝所述第二网络功能使用所述第一服务,在所述拒绝之前,确定所述第二陆地公用移动通信网络的标识符与所述访问令牌中的陆地公用移动通信网络标识符不相同,和/或所述请求的目的与所述互联目的不相同,和/或所述第二网络功能的信息与所述网络功能的信息不相同。The first network element refuses the second network function to use the first service, and before the refusal, determines the identifier of the second land public mobile communication network and the land public mobile phone number in the access token. The communication network identifier is different, and/or the purpose of the request is different from the interconnection purpose, and/or the information of the second network function is different from the information of the network function. 6.根据权利要求1至3中任一项所述的方法,其特征在于,所述服务请求消息进一步包括第二网络功能的信息以及所述第一服务的信息,所述访问令牌进一步包括网络功能的信息以及服务的信息;6. The method according to any one of claims 1 to 3, wherein the service request message further includes information about a second network function and information about the first service, and the access token further includes Information about network functions and services; 所述方法进一步包括:The method further includes: 所述第一网元拒绝所述第二网络功能使用所述第一服务,在所述拒绝之前,确定所述第二陆地公用移动通信网络的标识符与所述访问令牌中的陆地公用移动通信网络标识符不相同,和/或所述请求的目的与所述互联目的不相同,和/或所述第二网络功能的信息与所述网络功能的信息不相同,和/或所述第一服务的信息与所述服务的信息不相同。The first network element refuses the second network function to use the first service, and before the refusal, determines the identifier of the second land public mobile communication network and the land public mobile phone number in the access token. The communication network identifier is different, and/or the purpose of the request is different from the interconnection purpose, and/or the information of the second network function is different from the information of the network function, and/or the third The information for a service is not the same as the information for the service in question. 7.根据权利要求1至6中任一项所述的方法,其特征在于,7. The method according to any one of claims 1 to 6, characterized in that, 所述第一网元为:所述第一网络功能,所述第一陆地公用移动通信网络中的安全边缘保护代理网元,或者,所述第二陆地公用移动通信网络中的安全边缘保护代理网元。The first network element is: the first network function, a security edge protection agent network element in the first land public mobile communication network, or a security edge protection agent in the second land public mobile communication network network element. 8.一种发送访问令牌的方法,其特征在于,包括:8. A method of sending an access token, characterized by including: 位于第一陆地公用移动通信网络的第一网络存储功能接收位于所述第一陆地公用移动通信网络的第一网络功能的注册请求,所述注册请求包括互联目的下允许访问的陆地公用移动通信网络列表,所述陆地公用移动通信网络列表包括第二陆地公用移动通信网络;A first network storage function located in a first terrestrial public mobile communication network receives a registration request from a first network function located in the first terrestrial public mobile communication network, where the registration request includes a terrestrial public mobile communication network that is allowed to be accessed for interconnection purposes. A list, the list of terrestrial public mobile communication networks includes a second terrestrial public mobile communication network; 所述第一网络存储功能完成对所述第一网络功能的注册;The first network storage function completes the registration of the first network function; 所述第一网络存储功能接收来自第二网络功能的第一请求消息,所述第二网络功能位于所述第二陆地公用移动通信网络,所述第一请求消息用于请求访问令牌,所述访问令牌用于访问位于所述第一陆地公用移动通信网络的第一网络功能的第一服务,所述第一请求消息包括所述第二陆地公用移动通信网络的标识符和所述互联目的;The first network storage function receives a first request message from a second network function located in the second land public mobile communication network, and the first request message is used to request an access token, so The access token is used to access a first service of a first network function located in the first terrestrial public mobile communication network, and the first request message includes an identifier of the second terrestrial public mobile communication network and the interconnection Purpose; 响应于所述第一请求消息,所述第一网络存储功能生成所述访问令牌,所述访问令牌包括所述第二陆地公用移动通信网络的标识符和所述互联目的;In response to the first request message, the first network storage function generates the access token, the access token including an identifier of the second terrestrial public mobile communications network and the interconnection purpose; 所述第一网络存储功能向所述第二网络功能发送所述访问令牌。The first network storage function sends the access token to the second network function. 9.根据权利要求8所述的方法,其特征在于,9. The method according to claim 8, characterized in that, 所述注册请求进一步包括:所述互联目的下允许访问所述第一网络功能的网络功能的信息;The registration request further includes: information about network functions that are allowed to access the first network function under the interconnection purpose; 所述第一请求消息进一步包括:所述第二网络功能的信息;The first request message further includes: information about the second network function; 响应于所述第一请求消息,所述第一网络存储功能生成所述访问令牌,包括:In response to the first request message, the first network storage function generates the access token, including: 所述第一网络存储功能确定所述互联目的下允许访问所述第一网络功能的网络功能的信息包括所述第二网络功能的信息;The first network storage function determines that the information of the network function that is allowed to access the first network function under the interconnection purpose includes the information of the second network function; 所述第一网络存储功能生成所述访问令牌,所述访问令牌还包括所述第二网络功能的信息;The first network storage function generates the access token, and the access token also includes information about the second network function; 或者,or, 所述注册请求进一步包括:所述互联目的下允许访问所述第一网络功能的网络功能的信息,以及所述互联目的下允许被访问的服务的信息;The registration request further includes: information about network functions that are allowed to access the first network function under the interconnection purpose, and information about services that are allowed to be accessed under the interconnection purpose; 所述第一请求消息进一步包括:所述第二网络功能的信息以及所述第一服务的信息;The first request message further includes: information about the second network function and information about the first service; 响应于所述第一请求消息,所述第一网络存储功能生成所述访问令牌,包括:In response to the first request message, the first network storage function generates the access token, including: 所述第一网络存储功能确定所述互联目的下允许访问所述第一网络功能的网络功能的信息包括所述第二网络功能的信息,以及所述互联目的下允许被访问的服务的信息包括所述第一服务的信息;The first network storage function determines that the information about the network functions that are allowed to access the first network function under the interconnection purpose includes the information about the second network function, and the information about the services that are allowed to be accessed under the interconnection purpose includes Information about the first service; 所述第一网络存储功能生成所述访问令牌,所述访问令牌还包括所述第二网络功能的信息以及所述第一服务的信息。The first network storage function generates the access token, and the access token further includes information about the second network function and information about the first service. 10.一种服务授权方法,其特征在于,包括:10. A service authorization method, characterized by including: 安全边缘保护代理网元接收来自第二网络功能的服务请求消息,所述第二网络功能位于第二陆地公用移动通信网络,所述服务请求消息用于请求位于第一陆地公用移动通信网络的第一网络功能向所述第二网络功能提供第一服务;The security edge protection agent network element receives a service request message from a second network function located in a second terrestrial public mobile communication network, and the service request message is used to request a third terrestrial public mobile communication network located in the first terrestrial public mobile communication network. A network function provides a first service to the second network function; 所述安全边缘保护代理网元根据配置的参数执行所述第二网络功能使用所述第一服务的授权,所述配置的参数包括互联目的下允许访问所述第一网络功能的网络功能的信息,在所述执行授权之前,确定所述互联目的下允许访问所述第一网络功能的网络功能的信息包括所述第二网络功能的信息。The secure edge protection agent network element performs the authorization of the second network function to use the first service according to configured parameters. The configured parameters include information about network functions that allow access to the first network function for interconnection purposes. , before the authorization is executed, it is determined that the information of the network function that is allowed to access the first network function under the interconnection purpose includes the information of the second network function. 11.根据权利要求10所述的方法,其特征在于,所述安全边缘保护代理网元位于所述第一陆地公用移动通信网络,所述配置的参数还包括互联目的下允许访问所述第一陆地公用移动通信网络的陆地公用移动通信网络的列表,11. The method according to claim 10, wherein the security edge protection agent network element is located in the first land public mobile communication network, and the configured parameters further include allowing access to the first land mobile communication network for interconnection purposes. List of terrestrial public mobile telecommunications networks, 在所述执行授权之前,还包括:确定所述互联目的下允许访问所述第一陆地公用移动通信网络的陆地公用移动通信网络的列表包括所述第二陆地公用移动通信网络;Before the authorization is performed, it further includes: determining that the list of land public mobile communication networks that are allowed to access the first land public mobile communication network for the interconnection purpose includes the second land public mobile communication network; 或者,所述安全边缘保护代理网元位于所述第二陆地公用移动通信网络,所述配置的参数还包括互联目的下允许所述第二陆地公用移动通信网络访问的陆地公用移动通信网络的列表,Alternatively, the security edge protection agent network element is located in the second terrestrial public mobile communication network, and the configured parameters further include a list of terrestrial public mobile communication networks that are allowed to be accessed by the second terrestrial public mobile communication network for interconnection purposes. , 在所述执行授权之前,还包括:确定所述互联目的下允许所述第二陆地公用移动通信网络访问的陆地公用移动通信网络的列表包括所述第一陆地公用移动通信网络。Before the authorization is performed, the method further includes: determining that the list of terrestrial public mobile communication networks that are allowed to be accessed by the second terrestrial public mobile communication network for the interconnection purpose includes the first terrestrial public mobile communication network. 12.根据权利要求10或11所述的方法,其特征在于,所述配置的参数还包括所述互联目的下允许被访问的服务的信息,12. The method according to claim 10 or 11, characterized in that the configured parameters also include information about services that are allowed to be accessed under the interconnection purpose, 在所述执行授权之前,还包括:确定所述互联目的下允许被访问的服务的信息包括所述服务请求消息中携带的第一服务的信息。Before the execution of the authorization, the method further includes: determining that the information of the services allowed to be accessed under the interconnection purpose includes the information of the first service carried in the service request message. 13.根据权利要求10至12中任一项所述的方法,其特征在于,所述方法进一步包括:13. The method according to any one of claims 10 to 12, characterized in that the method further comprises: 所述安全边缘保护代理网元拒绝所述第二网络功能使用所述第一服务,在所述拒绝之前,根据所述配置的参数确定所述互联目的下允许访问所述第一网络功能的网络功能的信息不包括所述第二网络功能的信息。The security edge protection agent network element refuses the second network function to use the first service. Before the refusal, determines the network that is allowed to access the first network function for the interconnection purpose according to the configured parameters. The function information does not include the information of the second network function. 14.根据权利要求10至12中任一项所述的方法,其特征在于,所述安全边缘保护代理网元位于所述第一陆地公用移动通信网络,所述配置的参数还包括互联目的下允许访问所述第一陆地公用移动通信网络的陆地公用移动通信网络的列表,14. The method according to any one of claims 10 to 12, characterized in that the security edge protection agent network element is located in the first land public mobile communication network, and the configured parameters further include interconnection purposes. a list of terrestrial public mobile communications networks that are allowed to access said first terrestrial public mobile communications network, 所述方法进一步包括:The method further includes: 所述安全边缘保护代理网元拒绝所述第二网络功能使用所述第一服务,在所述拒绝之前,确定所述互联目的下允许访问所述第一陆地公用移动通信网络的陆地公用移动通信网络的列表不包括所述第二陆地公用移动通信网络;The security edge protection agent network element refuses the second network function to use the first service. Before the refusal, it is determined that access to the land public mobile communication of the first land public mobile communication network is allowed for the interconnection purpose. The list of networks does not include the second terrestrial public mobile communications network; 或者,所述安全边缘保护代理网元位于所述第二陆地公用移动通信网络,所述配置的参数还包括互联目的下允许所述第二陆地公用移动通信网络访问的陆地公用移动通信网络的列表,Alternatively, the security edge protection agent network element is located in the second terrestrial public mobile communication network, and the configured parameters further include a list of terrestrial public mobile communication networks that are allowed to be accessed by the second terrestrial public mobile communication network for interconnection purposes. , 所述安全边缘保护代理网元拒绝所述第二网络功能使用所述第一服务,在所述拒绝之前,还包括:确定所述互联目的下允许所述第二陆地公用移动通信网络访问的陆地公用移动通信网络的列表不包括所述第一陆地公用移动通信网络。The security edge protection agent network element refuses the second network function to use the first service. Before the refusal, it further includes: determining the land that is allowed to be accessed by the second land public mobile communication network for the purpose of interconnection. The list of public mobile communication networks does not include the first terrestrial public mobile communication network. 15.根据权利要求10至12任一项所述的方法,其特征在于,所述配置的参数还包括所述互联目的下允许被访问的服务的信息,15. The method according to any one of claims 10 to 12, characterized in that the configured parameters also include information about services that are allowed to be accessed for the purpose of interconnection, 所述方法进一步包括:The method further includes: 所述安全边缘保护代理网元拒绝所述第二网络功能使用所述第一服务,在所述拒绝之前,确定所述允许被访问的服务的信息不包括所述第一服务的信息。The security edge protection proxy network element denies the second network function to use the first service, and before the rejection, it is determined that the information of the service allowed to be accessed does not include the information of the first service. 16.一种授权验证的装置,其特征在于,包括:16. An authorization verification device, characterized by including: 收发单元,用于接收来自第二网络功能的服务请求消息,所述第二网络功能位于第二陆地公用移动通信网络,所述服务请求消息用于请求位于第一陆地公用移动通信网络的第一网络功能向所述第二网络功能提供第一服务,所述服务请求消息包括访问令牌、请求的目的和所述第二陆地公用移动通信网络的标识符,所述访问令牌包括陆地公用移动通信网络标识符和互联目的;A transceiver unit configured to receive a service request message from a second network function located in a second terrestrial public mobile communication network, and the service request message is used to request a first terrestrial public mobile communication network located in the first terrestrial public mobile communication network. The network function provides a first service to the second network function, the service request message includes an access token, a purpose of the request and an identifier of the second land public mobile communication network, the access token includes a land public mobile communication network Communications network identifiers and interconnection purposes; 处理单元,用于执行所述第二网络功能使用所述第一服务的授权,在所述执行授权之前,确定所述第二陆地公用移动通信网络的标识符与所述访问令牌中的陆地公用移动通信网络标识符相同,以及所述请求的目的与所述互联目的相同。A processing unit configured to perform authorization of the second network function to use the first service, and before performing the authorization, determine the identifier of the second terrestrial public mobile communication network and the terrestrial value in the access token. The public mobile communication network identifier is the same, and the purpose of the request is the same as the interconnection purpose. 17.根据权利要求16所述的装置,其特征在于,所述服务请求消息进一步包括第二网络功能的信息,所述访问令牌进一步包括网络功能的信息;17. The device according to claim 16, wherein the service request message further includes information about a second network function, and the access token further includes information about a network function; 所述处理单元还用于:The processing unit is also used to: 在所述执行授权之前,确定所述第二网络功能的信息与所述网络功能的信息相同。Before the execution authorization, it is determined that the information of the second network function is the same as the information of the network function. 18.根据权利要求16或17所述的装置,其特征在于,所述服务请求消息进一步包括所述第一服务的信息,所述访问令牌包括服务的信息;18. The device according to claim 16 or 17, wherein the service request message further includes information about the first service, and the access token includes information about the service; 所述处理单元还用于:在所述执行授权之前,确定所述第一服务的信息与所述服务的信息相同。The processing unit is further configured to: before the execution authorization, determine that the information of the first service is the same as the information of the service. 19.根据权利要求16至18中任一项所述的装置,其特征在于,所述处理单元还用于:19. The device according to any one of claims 16 to 18, characterized in that the processing unit is also used for: 拒绝所述第二网络功能使用所述第一服务,在所述拒绝之前,确定所述第二陆地公用移动通信网络的标识符与所述访问令牌中的陆地公用移动通信网络标识符不相同,和/或所述请求的目的与所述互联目的不相同。Denying the second network function the use of the first service, before the rejection, it is determined that the identifier of the second terrestrial public mobile communications network is not the same as the terrestrial public mobile communications network identifier in the access token , and/or the purpose of the request is not the same as the purpose of the interconnection. 20.根据权利要求16至18中任一项所述的装置,其特征在于,所述服务请求消息进一步包括第二网络功能的信息,所述访问令牌进一步包括网络功能的信息;20. The device according to any one of claims 16 to 18, wherein the service request message further includes information of a second network function, and the access token further includes information of a network function; 所述处理单元还用于:The processing unit is also used to: 拒绝所述第二网络功能使用所述第一服务,在所述拒绝之前,确定所述第二陆地公用移动通信网络的标识符与所述访问令牌中的陆地公用移动通信网络标识符不相同,和/或所述请求的目的与所述互联目的不相同,和/或所述第二网络功能的信息与所述网络功能的信息不相同。Denying the second network function the use of the first service, before the rejection, it is determined that the identifier of the second terrestrial public mobile communications network is not the same as the terrestrial public mobile communications network identifier in the access token , and/or the purpose of the request is different from the interconnection purpose, and/or the information of the second network function is different from the information of the network function. 21.根据权利要求16至18中任一项所述的装置,其特征在于,所述服务请求消息进一步包括第二网络功能的信息以及所述第一服务的信息,所述访问令牌进一步包括网络功能的信息以及服务的信息;21. The device according to any one of claims 16 to 18, wherein the service request message further includes information about a second network function and information about the first service, and the access token further includes Information about network functions and services; 所述处理单元还用于:The processing unit is also used to: 拒绝所述第二网络功能使用所述第一服务,在所述拒绝之前,确定所述第二陆地公用移动通信网络的标识符与所述访问令牌中的陆地公用移动通信网络标识符不相同,和/或所述请求的目的与所述互联目的不相同,和/或所述第二网络功能的信息与所述网络功能的信息不相同,和/或所述第一服务的信息与所述服务的信息不相同。Denying the second network function the use of the first service, before the rejection, it is determined that the identifier of the second terrestrial public mobile communications network is not the same as the terrestrial public mobile communications network identifier in the access token , and/or the purpose of the request is different from the interconnection purpose, and/or the information about the second network function is different from the information about the network function, and/or the information about the first service is different from the information about the first service. The information for the above services is different. 22.根据权利要求16至21中任一项所述的装置,其特征在于,所述装置为:所述第一网络功能,所述第一陆地公用移动通信网络的安全边缘保护代理网元,或者,所述第二陆地公用移动通信网络的安全边缘保护代理网元。22. The device according to any one of claims 16 to 21, characterized in that the device is: the first network function, the security edge protection agent network element of the first land public mobile communication network, Alternatively, the security edge protection agent network element of the second land public mobile communication network. 23.一种发送令牌的装置,其特征在于,包括:23. A device for sending tokens, characterized in that it includes: 收发单元,用于接收位于所述第一陆地公用移动通信网络的第一网络功能的注册请求,所述注册请求包括互联目的下允许访问的陆地公用移动通信网络列表,所述陆地公用移动通信网络列表包括第二陆地公用移动通信网络;A transceiver unit configured to receive a registration request for a first network function located in the first terrestrial public mobile communication network, where the registration request includes a list of terrestrial public mobile communication networks that are allowed to be accessed for interconnection purposes, and the terrestrial public mobile communication network The list includes the second terrestrial public mobile communications network; 处理单元,用于完成对所述第一网络功能的注册;A processing unit, configured to complete registration of the first network function; 所述收发单元,还用于接收来自第二网络功能的第一请求消息,所述第二网络功能位于所述第二陆地公用移动通信网络,所述第一请求消息用于请求访问令牌,所述访问令牌用于访问位于所述第一陆地公用移动通信网络的第一网络功能的第一服务,所述第一请求消息包括所述第二陆地公用移动通信网络的标识符和所述互联目的;The transceiver unit is also configured to receive a first request message from a second network function, the second network function is located in the second land public mobile communication network, and the first request message is used to request an access token, The access token is used to access a first service of a first network function located in the first terrestrial public mobile communication network, and the first request message includes an identifier of the second terrestrial public mobile communication network and the Internet purpose; 所述处理单元,还用于响应于所述第一请求消息,生成所述访问令牌,所述访问令牌包括所述第二陆地公用移动通信网络的标识符和所述互联目的;The processing unit is further configured to generate the access token in response to the first request message, the access token including the identifier of the second land public mobile communication network and the interconnection purpose; 所述收发单元还用于:向所述第二网络功能发送所述访问令牌。The transceiver unit is also configured to: send the access token to the second network function. 24.根据权利要求23所述的装置,其特征在于,所述注册请求进一步包括:所述互联目的下允许访问所述第一网络功能的网络功能的信息;24. The device according to claim 23, wherein the registration request further includes: information about network functions that are allowed to access the first network function under the interconnection purpose; 所述第一请求消息进一步包括:所述第二网络功能的信息;The first request message further includes: information about the second network function; 所述处理单元具体用于:确定所述互联目的下允许访问所述第一网络功能的网络功能的信息包括所述第二网络功能的信息;The processing unit is specifically configured to: determine that the information of the network function that is allowed to access the first network function under the interconnection purpose includes the information of the second network function; 所述第一网络存储功能生成所述访问令牌,所述访问令牌还包括所述第二网络功能的信息;The first network storage function generates the access token, and the access token also includes information about the second network function; 或者,or, 所述注册请求进一步包括:所述互联目的下允许访问所述第一网络功能的网络功能的信息,以及所述互联目的下允许被访问的服务的信息;The registration request further includes: information about network functions that are allowed to access the first network function under the interconnection purpose, and information about services that are allowed to be accessed under the interconnection purpose; 所述第一请求消息进一步包括:所述第二网络功能的信息以及所述第一服务的信息;The first request message further includes: information about the second network function and information about the first service; 所述处理单元具体用于:确定所述网络功能的信息包括所述第二网络功能的信息,以及所述互联目的下允许被访问的服务的信息包括所述第一服务的信息;The processing unit is specifically configured to: determine that the information about the network function includes information about the second network function, and that the information about services allowed to be accessed under the interconnection purpose includes information about the first service; 生成所述访问令牌,所述访问令牌还包括所述第二网络功能的信息以及所述第一服务的信息。The access token is generated, and the access token further includes information about the second network function and information about the first service. 25.一种服务授权的装置,其特征在于,包括:25. A device for service authorization, characterized by including: 收发单元,用于接收来自第二网络功能的服务请求消息,所述第二网络功能位于第二陆地公用移动通信网络,所述服务请求消息用于请求位于第一陆地公用移动通信网络的第一网络功能向所述第二网络功能提供第一服务;A transceiver unit configured to receive a service request message from a second network function located in a second terrestrial public mobile communication network, and the service request message is used to request a first terrestrial public mobile communication network located in the first terrestrial public mobile communication network. The network function provides the first service to the second network function; 处理单元,用于执行所述第二网络功能使用所述第一服务的授权,配置的参数包括互联目的下允许访问所述第一网络功能的网络功能的信息,在所述执行授权之前,根据所述配置的参数确定所述互联目的下允许访问所述第一网络功能的网络功能的信息包括所述第二网络功能的信息。A processing unit configured to perform authorization for the second network function to use the first service. The configured parameters include information on network functions that are allowed to access the first network function for interconnection purposes. Before the authorization is performed, according to The configured parameters determine that the information of the network function that is allowed to access the first network function under the interconnection purpose includes the information of the second network function. 26.根据权利要求25所述的装置,其特征在于,所述装置位于所述第一陆地公用移动通信网络,所述配置的参数还包括互联目的下允许访问所述第一陆地公用移动通信网络的陆地公用移动通信网络的列表,26. The device according to claim 25, wherein the device is located in the first terrestrial public mobile communication network, and the configured parameters further include allowing access to the first terrestrial public mobile communication network for interconnection purposes. List of terrestrial public mobile communications networks, 所述处理单元还用于:在所述执行授权之前,根据所述配置的参数确定所述互联目的下允许访问所述第一陆地公用移动通信网络的陆地公用移动通信网络的列表包括所述第二陆地公用移动通信网络;The processing unit is further configured to: before performing the authorization, determine according to the configured parameters that a list of land public mobile communication networks that are allowed to access the first land public mobile communication network for the interconnection purpose includes the third land public mobile communication network. 2. Land public mobile communication network; 或者,or, 所述处理单元还用于:在所述执行授权之前,根据所述配置的参数确定所述互联目的下允许所述第二陆地公用移动通信网络访问的陆地公用移动通信网络的列表包括所述第一陆地公用移动通信网络,所述装置位于所述第二陆地公用移动通信网络,所述配置的参数还包括互联目的下允许所述第二陆地公用移动通信网络访问的陆地公用移动通信网络的列表。The processing unit is further configured to: before performing the authorization, determine according to the configured parameters that a list of land public mobile communication networks that are allowed to be accessed by the second land public mobile communication network for the interconnection purpose includes the third land public mobile communication network. A land public mobile communication network, the device is located in the second land public mobile communication network, and the configured parameters also include a list of land public mobile communication networks that are allowed to be accessed by the second land public mobile communication network for interconnection purposes. . 27.根据权利要求25或26所述的装置,其特征在于,所述配置的参数还包括所述互联目的下允许被访问的服务的信息,27. The device according to claim 25 or 26, wherein the configured parameters also include information about services that are allowed to be accessed for the purpose of interconnection, 所述处理单元还用于:在所述执行授权之前,根据所述配置的参数确定所述互联目的下允许被访问的服务的信息包括所述服务请求消息中携带的第一服务的信息。The processing unit is further configured to: before performing the authorization, determine according to the configured parameters that the information of the services allowed to be accessed under the interconnection purpose includes the information of the first service carried in the service request message. 28.根据权利要求25至27中任一项所述的装置,其特征在于,所述处理单元还用于:拒绝所述第二网络功能使用所述第一服务,在所述拒绝之前,根据所述配置的参数确定所述互联目的下允许访问所述第一网络功能的网络功能的信息不包括所述第二网络功能的信息。28. The device according to any one of claims 25 to 27, wherein the processing unit is further configured to: deny the second network function to use the first service, and before the denial, according to The configured parameters determine that the information of the network function that is allowed to access the first network function under the interconnection purpose does not include the information of the second network function. 29.根据权利要求25至27中任一项所述的装置,其特征在于,所述装置位于所述第一陆地公用移动通信网络,所述配置的参数还包括互联目的下允许访问所述第一陆地公用移动通信网络的陆地公用移动通信网络的列表,29. The device according to any one of claims 25 to 27, characterized in that the device is located in the first land public mobile communication network, and the configured parameters further include allowing access to the third land mobile communication network for interconnection purposes. a list of terrestrial public mobile telecommunications networks, 所述处理单元还用于:拒绝所述第二网络功能使用所述第一服务,在所述拒绝之前,根据所述配置的参数确定所述互联目的下允许访问所述第一陆地公用移动通信网络的陆地公用移动通信网络的列表不包括所述第二陆地公用移动通信网络;The processing unit is further configured to: deny the second network function to use the first service, and before the denial, determine according to the configured parameters to allow access to the first land public mobile communication for the interconnection purpose The list of terrestrial public mobile communication networks of the network does not include the second terrestrial public mobile communication network; 或者,所述装置位于所述第二陆地公用移动通信网络,所述配置的参数还包括互联目的下允许所述第二陆地公用移动通信网络访问的陆地公用移动通信网络的列表,Alternatively, the device is located in the second terrestrial public mobile communication network, and the configured parameters further include a list of terrestrial public mobile communication networks that are allowed to be accessed by the second terrestrial public mobile communication network for interconnection purposes, 所述处理单元还用于:拒绝所述第二网络功能使用所述第一服务,在所述拒绝之前,根据所述配置的参数确定所述互联目的下允许所述第二陆地公用移动通信网络访问的陆地公用移动通信网络的列表不包括所述第一陆地公用移动通信网络。The processing unit is further configured to: deny the second network function to use the first service, and before the denial, determine according to the configured parameters to allow the second land public mobile communication network for the interconnection purpose. The list of visited terrestrial public mobile communication networks does not include the first terrestrial public mobile communication network. 30.根据权利要求25至27中任一项所述的装置,其特征在于,所述配置的参数还包括所述互联目的下允许被访问的服务的信息,30. The device according to any one of claims 25 to 27, wherein the configured parameters also include information about services that are allowed to be accessed for the purpose of interconnection, 所述处理单元还用于:拒绝所述第二网络功能使用所述第一服务,在所述拒绝之前,根据所述配置的参数确定所述允许被访问的服务的信息不包括所述第一服务的信息。The processing unit is further configured to: deny the second network function to use the first service. Before the denial, determine according to the configured parameters that the information of the service allowed to be accessed does not include the first service. Service information. 31.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,当所述计算机程序在计算机上运行时,使得计算机执行如权利要求1至7中任一项所述的方法,或者使得计算机执行如权利要求8或9所述的方法,或者使得计算机执行如权利要求10至15中任一项所述的方法。31. 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, it causes the computer to execute any one of claims 1 to 7 The method either causes the computer to perform the method described in claim 8 or 9, or causes the computer to perform the method described in any one of claims 10 to 15. 32.一种计算机程序产品,其特征在于,包括计算机程序指令,所述计算机程序指令在计算机上运行时,使得计算机执行如权利要求1至7中任一项所述的方法,或者使得计算机执行如权利要求8或9所述的方法,或者使得计算机执行如权利要求10至15中任一项所述的方法。32. A computer program product, characterized in that it includes computer program instructions. When the computer program instructions are run on a computer, they cause the computer to perform the method according to any one of claims 1 to 7, or cause the computer to perform The method according to claim 8 or 9, or causing the computer to perform the method according to any one of claims 10 to 15. 33.一种通信装置,其特征在于,包括至少一个处理器,所述至少一个处理器用于执行存储在存储器中的计算机程序或指令,以执行如权利要求1至7中任一项所述的方法,或者以执行或如权利要求8或9所述的方法,或者以执行如权利要求10至15中任一项所述的方法。33. A communication device, characterized by comprising at least one processor configured to execute a computer program or instructions stored in a memory to perform the method of any one of claims 1 to 7 Method, either to perform a method as claimed in claim 8 or 9, or to perform a method as described in any one of claims 10 to 15.
CN202210237627.3A 2022-03-11 2022-03-11 Authorization verification methods and devices Pending CN116782228A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210237627.3A CN116782228A (en) 2022-03-11 2022-03-11 Authorization verification methods and devices
PCT/CN2023/077414 WO2023169206A1 (en) 2022-03-11 2023-02-21 Authorization verification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210237627.3A CN116782228A (en) 2022-03-11 2022-03-11 Authorization verification methods and devices

Publications (1)

Publication Number Publication Date
CN116782228A true CN116782228A (en) 2023-09-19

Family

ID=87937201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210237627.3A Pending CN116782228A (en) 2022-03-11 2022-03-11 Authorization verification methods and devices

Country Status (2)

Country Link
CN (1) CN116782228A (en)
WO (1) WO2023169206A1 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109688586B (en) * 2017-10-19 2021-12-07 中兴通讯股份有限公司 Network function authentication method and device and computer readable storage medium
CN113748699B (en) * 2019-04-27 2024-10-22 诺基亚技术有限公司 Service authorization for indirect communication in a communication system
US12058123B2 (en) * 2019-06-24 2024-08-06 Nokia Technologies Oy Apparatuses and methods relating to authorization of network functions
CN113438196B (en) * 2020-03-23 2022-10-25 华为技术有限公司 A service authorization method, device and system
CN112003912B (en) * 2020-08-13 2021-11-02 广州爱浦路网络技术有限公司 Method for authenticating NF through SEPP in 5G core network

Also Published As

Publication number Publication date
WO2023169206A1 (en) 2023-09-14

Similar Documents

Publication Publication Date Title
CN113994727B (en) Secure access control in a communication system
JP7035163B2 (en) Network security management methods and equipment
CN112335274B (en) For secure management of service access in communication systems
CN113748699A (en) Service authorization for indirect communication in a communication system
US20200374698A1 (en) Communication method and communications apparatus
US20100229229A1 (en) Method, system and apparatus for indirect access by communication device
CN113994633B (en) Authorization of a set of network functions in a communication system
WO2023011630A1 (en) Authorization verification method and apparatus
US11606303B1 (en) Device initiated quality of service
WO2022247812A1 (en) Authentication method, communication device, and system
EP4322480B1 (en) Secure identification of applications in communication network
CN113055342A (en) Information processing method and communication device
KR20210029648A (en) Apparatus and method for provisioning subscription data to non-subscription registered user equipment in wireless communication system
CN114009077B (en) Controlling access to restricted local operator services provided by user equipment
WO2023169206A1 (en) Authorization verification method and device
CN113498055B (en) Access control method and communication equipment
EP4561136A1 (en) Communication method and communication apparatus
CN119729487A (en) Communication method and device
CN100417296C (en) A control method for terminal access to 3G network
WO2025167832A1 (en) Communication method and communication apparatus
WO2025031038A1 (en) Communication method and apparatus
WO2025026205A1 (en) Service api calling method and apparatus
WO2024060894A1 (en) Communication method and apparatus
WO2024138441A1 (en) Wireless communication methods and apparatus
WO2024208302A1 (en) Information interaction method and apparatus, and device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination