[go: up one dir, main page]

JP7559344B2 - Authorization-based resource access control system, secure component, device, and authorization-based resource access control method - Google Patents

Authorization-based resource access control system, secure component, device, and authorization-based resource access control method Download PDF

Info

Publication number
JP7559344B2
JP7559344B2 JP2020072994A JP2020072994A JP7559344B2 JP 7559344 B2 JP7559344 B2 JP 7559344B2 JP 2020072994 A JP2020072994 A JP 2020072994A JP 2020072994 A JP2020072994 A JP 2020072994A JP 7559344 B2 JP7559344 B2 JP 7559344B2
Authority
JP
Japan
Prior art keywords
token
client
server
authorization
resource
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.)
Active
Application number
JP2020072994A
Other languages
Japanese (ja)
Other versions
JP2021170228A (en
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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing 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 Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2020072994A priority Critical patent/JP7559344B2/en
Publication of JP2021170228A publication Critical patent/JP2021170228A/en
Application granted granted Critical
Publication of JP7559344B2 publication Critical patent/JP7559344B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Storage Device Security (AREA)

Description

本発明は、認可に基づくリソースアクセス制御システム、セキュアなコンポーネント、デバイス及び認可に基づくリソースアクセス制御方法に関する。 The present invention relates to an authorization-based resource access control system, a secure component, a device, and an authorization-based resource access control method.

多くのWebサービスは、IETF(Internet Engineering Task Force)において、OAuth2.0として定められた標準規格に従っている。このようなWebサービスでは、特定サービス事業者における認証の実施を基礎として、他のサービスへのログインやサービス間でのAPI連携の認可を行うことが可能であり、サービス連携が円滑に行えるようになっている。認証はある主体が特定の主体であることを識別することであり、認可は認証を行った主体に対してアクセスなどの権限を付与することである。 Many web services follow the standard established by the IETF (Internet Engineering Task Force) as OAuth 2.0. With such web services, authentication by a specific service provider is the basis for authorization to log in to other services and API integration between services, allowing for smooth service integration. Authentication identifies an entity as a specific entity, and authorization grants access and other rights to the authenticated entity.

IoTシステムにおいても、Webサービスと同様に、認証(例えば、IoTデバイスの認証)と認可(例えば、IoTデバイスに対するAPI連携)のタイミングを分けて行われることが多い。また、IoTシステムでは、デバイス上で動作するアプリケーションのように、認証主体と認可主体が全てパブリックネットワーク上にあるとは限らない状況が存在する。このため、IoTシステムは、Webサービスのように、連携サービスが全てパブリックネットワーク上に存在する場合に比べて、セキュリティ的な課題がある。 In IoT systems, as in Web services, authentication (e.g., authentication of an IoT device) and authorization (e.g., API integration with an IoT device) are often performed at separate times. Also, in IoT systems, there are situations where the authenticators and authorizers are not necessarily all on a public network, as in applications running on a device. For this reason, IoT systems have security issues compared to cases where all integrated services are on a public network, such as Web services.

そこで、デバイス上で動作するアプリケーションに関して、OAuth2.0に従って、クライアント(クライアント端末上で動作するアプリケーション)が、予め記憶したシークレット(認可コード)を用いて認可サーバ(トークンエンドポイント)に対してアクセストークンの発行を要求し、認可サーバが発行したアクセストークンを受信し、そのアクセストークンを利用してリソースを取得するシステムが開示されている(特許文献1参照)。 Therefore, a system has been disclosed in which, in accordance with OAuth 2.0, a client (an application running on a client terminal) uses a pre-stored secret (authorization code) to request the issuance of an access token from an authorization server (token endpoint), receives the access token issued by the authorization server, and uses the access token to obtain resources, for an application running on a device (see Patent Document 1).

特開2018-84979号公報JP 2018-84979 A

しかし、特許文献1のようなシステムでは、クライアント端末上にアクセストークンを保持するため、アクセストークン漏洩に基づくセキュリティリスクが存在する。すなわち、Webサービスと異なり、IoTデバイス上のアプリケーションだけでOAuth2.0を利用する場合、IoTデバイス上にアクセストークンを保持せざるを得なくなるが、万一漏洩した場合、第三者に不正なリソースへのアクセスを許すおそれがある。また、IoTシステムは、長期間に亘って稼動するという特性上、一度ログインしたら継続してログインを続けることが多く、アクセストークンを無効にするための作業時間を設定することが難しい。また、頻繁なアクセストークンの更新は、IoTシステムが苦手とする通信トラフィックの増加や集中を招く。 However, in a system such as that described in Patent Document 1, since the access token is stored on the client terminal, there is a security risk due to the leaking of the access token. In other words, unlike Web services, when OAuth 2.0 is used only by applications on an IoT device, the access token must be stored on the IoT device, but if it is leaked, there is a risk that a third party may be allowed to access unauthorized resources. In addition, due to the nature of IoT systems being operational over long periods of time, once users log in, they often continue to be logged in, making it difficult to set a work time for invalidating the access token. Furthermore, frequent updates of access tokens lead to an increase and concentration of communication traffic, which is a weakness of IoT systems.

本発明は、斯かる事情に鑑みてなされたものであり、発行されたアクセストークンを長期間にわたって安全に保護することができる認可に基づくリソースアクセス制御システム、セキュアなコンポーネント、デバイス及び認可に基づくリソースアクセス制御方法を提供することを目的とする。 The present invention has been made in consideration of the above circumstances, and aims to provide an authorization-based resource access control system, a secure component, a device, and an authorization-based resource access control method that can safely protect issued access tokens for a long period of time.

本発明の実施の形態に係る認可に基づくリソースアクセス制御システムは、ユーザ認証結果に基づいてリソースに対するアクセスを認可する認可サーバと、前記認可サーバの認可結果に基づいてアクセスが制御されるリソースを有するリソースサーバと、クライアントが動作するデバイスとを備え、前記デバイスは、前記認可サーバがリソースに対するアクセスを認可した結果、前記クライアントが取得する、所定のサーバが発行するトークン情報を記憶するセキュアなコンポーネントを備え、前記クライアントは、前記セキュアなコンポーネントに記憶したトークン情報を前記リソースサーバへ送信し、前記リソースサーバは、前記トークン情報の検証結果に基づいて前記クライアントのリソースへのアクセスを制御する。 The authorization-based resource access control system according to an embodiment of the present invention includes an authorization server that authorizes access to resources based on a user authentication result, a resource server having resources whose access is controlled based on the authorization result of the authorization server, and a device on which a client operates. The device includes a secure component that stores token information issued by a specific server and acquired by the client as a result of the authorization server authorizing access to the resource. The client transmits the token information stored in the secure component to the resource server, and the resource server controls the client's access to the resource based on the verification result of the token information.

本発明の実施の形態に係るセキュアなコンポーネントは、クライアントが動作するデバイスに実装されるセキュアなコンポーネントであって、認可サーバが、ユーザ認証結果に基づいてリソースに対するアクセスを認可した結果、所定のサーバが発行するトークン情報を前記クライアントから取得して記憶し、前記認可サーバの認可結果に基づいてアクセスが制御されるリソースを有するリソースサーバへ記憶したトークン情報を送信するために、前記記憶したトークン情報を前記クライアントへ出力する。 A secure component according to an embodiment of the present invention is a secure component implemented in a device on which a client operates, which acquires and stores token information issued by a specific server from the client as a result of an authorization server authorizing access to a resource based on a user authentication result, and outputs the stored token information to the client in order to transmit the stored token information to a resource server having a resource whose access is controlled based on the authorization result of the authorization server.

本発明の実施の形態に係るデバイスは、前述のセキュアなコンポーネントを備え、クライアントが動作する。 A device according to an embodiment of the present invention includes the above-mentioned secure components and runs a client.

本発明の実施の形態に係る認可に基づくリソースアクセス制御方法は、ユーザ認証結果に基づいてリソースに対するアクセスを認可する認可サーバと、前記認可サーバの認可結果に基づいてアクセスが制御されるリソースを有するリソースサーバと、クライアントが動作するデバイスとを備えるシステムの認可に基づくリソースアクセス制御方法であって、前記デバイスは、前記認可サーバがリソースに対するアクセスを認可した結果、前記クライアントが取得する、所定のサーバが発行するトークン情報をセキュアなコンポーネントに記憶し、前記クライアントは、前記セキュアなコンポーネントに記憶したトークン情報を前記リソースサーバへ送信し、前記リソースサーバは、前記トークン情報の検証結果に基づいて前記クライアントのリソースへのアクセスを制御する。 The resource access control method based on authorization according to an embodiment of the present invention is a resource access control method based on authorization for a system including an authorization server that authorizes access to resources based on a user authentication result, a resource server having resources whose access is controlled based on the authorization result of the authorization server, and a device on which a client operates, in which the device stores token information issued by a specified server and acquired by the client as a result of the authorization server authorizing access to the resource in a secure component, the client transmits the token information stored in the secure component to the resource server, and the resource server controls the client's access to the resource based on the verification result of the token information.

本発明によれば、デバイスの長期稼働において、有効なトークンを保持し続けるリスク(漏洩等のセキュリティリスク)を低減しつつ、再認証やトークン更新に必要となる通信トラフィックを削減することができる。 The present invention makes it possible to reduce the risk of continuing to hold valid tokens (security risks such as leakage) during long-term operation of a device, while reducing the communication traffic required for re-authentication and token updates.

本実施の形態の認可に基づくリソースアクセス制御システムの構成の一例を示す模式図である。1 is a schematic diagram showing an example of a configuration of an authorization-based resource access control system according to an embodiment of the present invention; RFC8252に基づいてトークンの取得を行う場合のフローの一例を示す説明図である。FIG. 11 is an explanatory diagram showing an example of a flow when acquiring a token based on RFC8252. 認可に基づくリソースアクセス制御システムでのトークンの取得を行う場合のフローの一例を示す説明図である。FIG. 11 is an explanatory diagram showing an example of a flow when a token is obtained in an authorization-based resource access control system. トークンの内部検証の例を示す説明図である。FIG. 11 is an explanatory diagram showing an example of internal validation of a token. 改ざん検知コードの付与による保護の例を示す説明図である。FIG. 13 is an explanatory diagram showing an example of protection by adding a tamper detection code. トークンの暗号化による保護の例を示す説明図である。FIG. 11 is an explanatory diagram showing an example of protection by token encryption. クライアントアプリに対する認証の例を示す説明図である。FIG. 11 is an explanatory diagram showing an example of authentication for a client application. 秘匿通信路による外部管理の例を示す説明図である。FIG. 11 is an explanatory diagram showing an example of external management using a secure communication path.

以下、本発明をその実施の形態を示す図面に基づいて説明する。図1は本実施の形態の認可に基づくリソースアクセス制御システムの構成の一例を示す模式図である。認可に基づくリソースアクセス制御システムは、デバイスとしてのIoTデバイス100、認可サーバ200、トークンサーバ400を備える。認可に基づくリソースアクセス制御システムは、さらに、リソースサーバ300、セキュアなコンポーネント管理サーバ500を備えてもよい。図1の例では、認可サーバ200とトークンサーバ400とを別々のサーバとして構成しているが、認可サーバ200とトークンサーバ400とを1つのサーバとして統合してもよい。 The present invention will be described below with reference to the drawings showing an embodiment of the present invention. FIG. 1 is a schematic diagram showing an example of the configuration of an authorization-based resource access control system according to this embodiment. The authorization-based resource access control system includes an IoT device 100 as a device, an authorization server 200, and a token server 400. The authorization-based resource access control system may further include a resource server 300 and a secure component management server 500. In the example of FIG. 1, the authorization server 200 and the token server 400 are configured as separate servers, but the authorization server 200 and the token server 400 may be integrated into a single server.

IoTデバイス100は、実装対象となっているデバイスであり、例えば、RTOS(Real Time Operating System)やLinux(登録商標)等が動作する組み込みボードなどを含む。IoTデバイスは、例えば、OSを搭載して独立動作をすることができるデバイス(電子デバイスとも称する)であり、「モノのインターネット」(IoT)でいうところの「モノ」に該当するデバイスである。IoTデバイス100は、内部に不図示のSoC(System on Chip)、及びセキュアなコンポーネント50を有する。IoTデバイス100は、セキュアなコンポーネント50を内蔵しつつ、リソースを使用するクライアントアプリ(クライアントとも称する)20が動作するデバイスである。IoTデバイス100の詳細は後述する。 The IoT device 100 is a device to be implemented, and includes, for example, an embedded board on which an RTOS (Real Time Operating System) or Linux (registered trademark) runs. The IoT device is, for example, a device (also called an electronic device) that is equipped with an OS and can operate independently, and corresponds to a "thing" in the "Internet of Things" (IoT). The IoT device 100 has an SoC (System on Chip) (not shown) and a secure component 50 inside. The IoT device 100 is a device that has the secure component 50 built in and runs a client application (also called a client) 20 that uses resources. Details of the IoT device 100 will be described later.

デバイス管理者は、IoTデバイス100の管理者であり、IoTデバイス100に対するアクセス権を持つと同時に、リソースを提供する事業者に対してユーザ登録を行っており、リソースを提供する事業者に対する認証を行う主体(ユーザ)である(Resource Ownerに相当する)。デバイス管理者は、IoTデバイス100でクライアントアプリ20を実行することで、所望の機能を実現することを期待しているユーザである。認可サーバ200上でユーザ登録がされている。 The device administrator is the administrator of the IoT device 100, has access rights to the IoT device 100, and is the entity (user) that performs user registration with the business providing the resources and performs authentication with the business providing the resources (corresponding to the Resource Owner). The device administrator is a user who expects to realize the desired functions by executing the client application 20 on the IoT device 100. The user is registered on the authorization server 200.

認可サーバ200は、個々のユーザを認証した上で、当該ユーザの許可に基づき、リソースサーバ300が有するリソース301へのアクセスを認可するためのサーバである。認可サーバ200は、認可コード201を保持する。認可コード201は、デバイス管理者による認証、認可が行われた場合に動的に生成されるコードであり、基本的には1回限りの使い捨てのコードとすることができる。ここで、「認証」とは、あるユーザが特定のユーザであることを識別することであり、本実施の形態では、ユーザ名とパスワードで認証を行うこととしているが、認証方法は、これに限定されるものではない。また、「認可」は、認証を行ったユーザに対してアクセスなどの権限を付与することである。 The authorization server 200 is a server for authenticating individual users and then authorizing access to resources 301 held by the resource server 300 based on the permission of the user. The authorization server 200 holds an authorization code 201. The authorization code 201 is a code that is dynamically generated when authentication and authorization are performed by the device administrator, and can basically be a one-time disposable code. Here, "authentication" refers to identifying a certain user as a specific user, and in this embodiment, authentication is performed using a username and password, but the authentication method is not limited to this. Also, "authorization" refers to granting authority such as access to the authenticated user.

リソースサーバ300は、リソース301を保持するサーバである。リソース301は、クライアントアプリ20がアクセスを必要とするリソースであり、例えば、ファイル等のデータ、あるいは、データ以外として、例えば、API(例えば、ディープラーニング用APIなど)実行などの機能も含む。 The resource server 300 is a server that holds resources 301. The resources 301 are resources that the client application 20 needs to access, and include, for example, data such as files, or, other than data, functions such as API execution (e.g., API for deep learning, etc.).

トークンサーバ400は、認可サーバ200の認可に基づき、トークン(アクセストークンとも称する)を発行するためのサーバである。なお、本明細書では、トークン情報は、トークンを意味するが、トークンに関連する情報やトークンに付随する情報を含めてもよい。トークンサーバ400の詳細は後述する。 The token server 400 is a server for issuing tokens (also called access tokens) based on the authorization of the authorization server 200. In this specification, token information means a token, but may also include information related to the token or information accompanying the token. Details of the token server 400 will be described later.

セキュアなコンポーネント管理サーバ500は、セキュアなコンポーネント50の遠隔管理を目的とすることができる。セキュアなコンポーネント管理サーバ500は、IoTデバイス100内のセキュアなコンポーネント50と通信(例えば、秘匿通信路経由の通信)を行い、セキュアなコンポーネント50内部の機能や状態を更新することができる。 The secure component management server 500 can be intended for remote management of the secure component 50. The secure component management server 500 can communicate with the secure component 50 in the IoT device 100 (e.g., via a secret communication path) and update the functions and status inside the secure component 50.

図1に例示した各サーバをどの事業者が運営するかは個々のビジネスケースに応じて異なる。本実施の形態では、認可サーバ200とリソースサーバ300は、サービス事業者によって運営され、トークンサーバ400とセキュアなコンポーネント管理サーバ500は、セキュアなコンポーネント50の製造者によって運営されている形態として説明するが、これに限定されるものではない。 Which company operates each server illustrated in FIG. 1 varies depending on the individual business case. In this embodiment, the authorization server 200 and resource server 300 are operated by a service provider, and the token server 400 and secure component management server 500 are operated by the manufacturer of the secure component 50, but this is not limited to the above.

IoTデバイス100は、セキュアなコンポーネント50の他に、クライアントアプリ20、クライアントアプリ証明書21、ブラウザ10を備える。 In addition to the secure component 50, the IoT device 100 includes a client application 20, a client application certificate 21, and a browser 10.

クライアントアプリ20は、リソースを提供する事業者の認可を経て、リソースにアクセスすることで機能を実現するアプリケーションである。クライアントアプリ20は、リソースを提供する事業者とは別の主体(ベンダー等)によって開発されたアプリケーションである。 The client application 20 is an application that realizes functions by accessing resources after obtaining authorization from the business providing the resources. The client application 20 is an application developed by an entity (such as a vendor) other than the business providing the resources.

クライアントアプリ証明書21は、クライアントアプリ20に対するコードサイニング証明書である。コードサイニング証明書は、クライアントアプリ20にデジタル署名(例えば、クライアントアプリ20のハッシュ値に対して秘密鍵署名が施されている)を行う電子署名用の証明書であり、クライアントアプリ20の配布元を認証し、なりすましや内容の改ざんなどがされていないことを保証できる。 The client application certificate 21 is a code signing certificate for the client application 20. The code signing certificate is an electronic signature certificate that digitally signs the client application 20 (for example, a private key signature is applied to the hash value of the client application 20), and can authenticate the distributor of the client application 20 and guarantee that it has not been spoofed or its contents have not been tampered with.

ブラウザ10は、Webブラウザであり、クライアントアプリ20とは別のアプリケーションとして与えられる。 The browser 10 is a web browser and is provided as a separate application from the client application 20.

セキュアなコンポーネント50は、IoTデバイス100内に存在する、通常のプログラム実行環境とは論理的又は物理的に隔離された、ストレージ(メモリ)を持つセキュアな実行環境である。本実施の形態では、セキュアなコンポーネント50は、主にセキュアエレメント(SEとも称する)を想定する。セキュアエレメントは、耐タンパ性を有するセキュリティチップで構成することができる。これにより、後述のように、発行されたトークン情報を長期間に亘って安全に保護することができる。また、トークン情報を頻繁に更新する必要もなく、トークン情報を無効にするための作業時間を設定する必要もない。 The secure component 50 is a secure execution environment having storage (memory) that is logically or physically isolated from the normal program execution environment that exists within the IoT device 100. In this embodiment, the secure component 50 is mainly assumed to be a secure element (also referred to as SE). The secure element can be configured with a security chip that is tamper-resistant. This allows the issued token information to be safely protected for a long period of time, as described below. In addition, there is no need to frequently update the token information, nor is there a need to set an operation time for invalidating the token information.

セキュアなコンポーネント50は、トラステッド実行環境(TEEとも称する)でもよい。トラステッド実行環境は、SoC(System on Chip)上で、例えば、CPU仮想化支援技術(例えば、TrustZone(登録商標))と称される技術を用いることによって、SoC内で区分された領域(いわゆるTEE:Trusted Execution Environment)を指し、通常実行環境(REE:Rich Execution Environmentとも称する)よりもセキュアな領域である。 The secure component 50 may be a trusted execution environment (also called a TEE). The trusted execution environment refers to an area (so-called TEE: Trusted Execution Environment) partitioned within a system on a chip (SoC) by using, for example, a technology called CPU virtualization support technology (e.g., TrustZone (registered trademark)) on the SoC, and is an area that is more secure than a normal execution environment (also called REE: Rich Execution Environment).

クライアントアプリ20とセキュアなコンポーネント50との間の通信路は、セキュアなコンポーネント50の種類によって異なる。クライアントアプリ20とセキュアエレメントとの間の通信は、例えば、ISO7816/SPI/I2C等のシリアル通信路を用いることができ、クライアントアプリ20とTEEとの間の通信は、例えば、APII/Fを介して行うことができる。 The communication path between the client application 20 and the secure component 50 varies depending on the type of the secure component 50. The communication between the client application 20 and the secure element can use, for example, a serial communication path such as ISO7816/SPI/I2C, and the communication between the client application 20 and the TEE can be performed, for example, via APII/F.

セキュアなコンポーネント50は、SE(TEE)ID51、カウンタ52、トークン53、トークン生成機能60、トークン署名検証機能61、トークン暗号化機能62、トークンMAC付与機能63、クライアント検証機能64、秘匿通信路開設機能65、トークン署名検証鍵(公開鍵)71、トークン暗号化鍵72、トークンMAC鍵73、及びクライアント検証鍵(公開鍵)74を内蔵する。 The secure component 50 incorporates an SE (TEE) ID 51, a counter 52, a token 53, a token generation function 60, a token signature verification function 61, a token encryption function 62, a token MAC assignment function 63, a client verification function 64, a secret communication path opening function 65, a token signature verification key (public key) 71, a token encryption key 72, a token MAC key 73, and a client verification key (public key) 74.

SE(TEE)ID51は、セキュアなコンポーネント50を一意に識別するためのIDである。SE(TEE)ID51は、SEID51、又はTEEID51の意味である。 The SE(TEE) ID 51 is an ID for uniquely identifying the secure component 50. The SE(TEE) ID 51 stands for SEID 51 or TEEID 51.

カウンタ52は、セキュアなコンポーネント50がトークンを生成する際、生成回数を計数する。 The counter 52 counts the number of times the secure component 50 generates a token.

トークン53は、リソースサーバ300のリソース301に対する認可を受けていることを証明する秘密情報である。トークン53は、クライアントアプリ20経由でトークンサーバ400から受け取ることができる。トークン53のデータ構造、内容については、以降説明する個々の実施例によって異なる。 The token 53 is secret information that proves that the resource server 300 has been authorized to access the resource 301. The token 53 can be received from the token server 400 via the client application 20. The data structure and contents of the token 53 differ depending on the individual embodiments described below.

トークン生成機能60は、セキュアなコンポーネント50自身がトークンを生成する場合に実行する機能である。トークン生成機能60は、SE(TEE)ID51やカウンタ52の値をトークン(初期のトークンとも称する)に付加する等の処理を行って動的なトークンを生成する。 The token generation function 60 is a function executed when the secure component 50 itself generates a token. The token generation function 60 performs processing such as adding the value of the SE (TEE) ID 51 and the counter 52 to the token (also called the initial token) to generate a dynamic token.

トークン署名検証機能61は、クライアントアプリ20経由でトークンサーバ400から受け取ったトークンに署名が添付されている場合、署名の検証を行う機能である。 The token signature verification function 61 is a function that verifies the signature when a signature is attached to the token received from the token server 400 via the client application 20.

トークン暗号化機能62は、暗号化トークンを授受する際に暗号化を行う機能である。 The token encryption function 62 is a function that performs encryption when an encrypted token is exchanged.

トークンMAC付与機能63は、トークンにMAC(Message Authentication Code:メッセージ認証コード)を付与する際に実行する機能である。 The token MAC assignment function 63 is a function executed when assigning a MAC (Message Authentication Code) to a token.

クライアント検証機能64は、クライアントアプリ20との間でのトークン授受時にクライアント認証を行う際に実行する機能である。 The client verification function 64 is a function executed to perform client authentication when exchanging a token with the client application 20.

秘匿通信路開設機能65は、セキュアなコンポーネント管理サーバ500との間で秘匿通信路を開設する機能であり、例えば、TLS(Transport Layer Security)等の通信機能を想定している。 The secret communication path opening function 65 is a function that opens a secret communication path with the secure component management server 500, and is assumed to be a communication function such as TLS (Transport Layer Security).

トークン署名検証鍵(公開鍵)71は、受信したトークンに署名が添付されている場合、当該署名を検証するための鍵である。 The token signature verification key (public key) 71 is a key used to verify the signature if one is attached to the received token.

トークン暗号化鍵72は、暗号化トークンを送出する際にトークンの暗号化に用いる鍵である。 The token encryption key 72 is the key used to encrypt the token when sending the encrypted token.

トークンMAC鍵73は、トークンに付与するMACを計算するための鍵である。 The token MAC key 73 is a key used to calculate the MAC to be assigned to the token.

クライアント検証鍵(公開鍵)74は、クライアント認証を行う際にクライアント証明書を検証する鍵である。 The client verification key (public key) 74 is a key used to verify the client certificate when performing client authentication.

トークンサーバ400は、SE(TEE)ID401、カウンタ402、トークン403、トークン正当性確認機能410、トークン署名生成機能411、トークン復号機能412、トークンMAC検証機能413、トークン署名生成鍵(秘密鍵)420、トークン復号鍵421、及びトークンMAC検証鍵422を有する。 The token server 400 has an SE (TEE) ID 401, a counter 402, a token 403, a token validity confirmation function 410, a token signature generation function 411, a token decryption function 412, a token MAC verification function 413, a token signature generation key (secret key) 420, a token decryption key 421, and a token MAC verification key 422.

SE(TEE)ID401は、トークンサーバ400が出力するトークンの出力先のIoTデバイス100内のセキュアなコンポーネント50を一意に識別するためのIDである。SE(TEE)ID401は、SEID401又はTEEID401の意味である。 The SE(TEE) ID 401 is an ID for uniquely identifying the secure component 50 in the IoT device 100 to which the token output by the token server 400 is to be output. The SE(TEE) ID 401 means SEID 401 or TEE ID 401.

カウンタ402は、セキュアなコンポーネント50がトークンを生成する際、生成回数を計数するカウンタである。カウンタ402は、当該セキュアなコンポーネント50からのトークンの受信回数と同期している。 The counter 402 is a counter that counts the number of times a token is generated when the secure component 50 generates a token. The counter 402 is synchronized with the number of times a token is received from the secure component 50.

トークン403は、リソース301に対する認可を受けていることを証明する秘密情報である。トークン403は、クライアントアプリ20からの適切な認可コード提示に応じて動的に生成される。 The token 403 is secret information that proves that authorization has been granted for the resource 301. The token 403 is dynamically generated in response to the presentation of an appropriate authorization code from the client application 20.

トークン正当性確認機能410は、セキュアなコンポーネント50が生成した動的なトークンの正当性を確認する機能である。トークン正当性確認機能410は、SE(TEE)ID401やカウンタ402の値を参照してトークンの正当性を確認する。 The token validity confirmation function 410 is a function that confirms the validity of the dynamic token generated by the secure component 50. The token validity confirmation function 410 confirms the validity of the token by referring to the values of the SE (TEE) ID 401 and the counter 402.

トークン署名生成機能411は、トークンに対して署名を生成し、当該トークンに付与する機能である。 The token signature generation function 411 is a function that generates a signature for a token and assigns it to the token.

トークン復号機能412は、暗号化トークンを受信した際、暗号化トークンを復号する機能である。 The token decryption function 412 is a function that decrypts an encrypted token when it is received.

トークンMAC検証機能413は、トークンに付与されたMACを検証する機能である。 The token MAC verification function 413 is a function that verifies the MAC assigned to the token.

トークン署名生成鍵(秘密鍵)420は、トークンに対して署名を生成する鍵である。 The token signature generation key (private key) 420 is a key that generates a signature for the token.

トークン復号鍵421は、暗号化トークンを受信した際、暗号化トークンの復号に用いる鍵である。 The token decryption key 421 is a key used to decrypt an encrypted token when it is received.

トークンMAC検証鍵422は、トークンに付与されたMACを照合するために使用する鍵である。 The token MAC verification key 422 is a key used to verify the MAC assigned to the token.

セキュアなコンポーネント50が動的にトークンを生成する場合、トークンサーバ400は、トークンを生成可能なSE(TEE)ID401のリストと、当該SE(TEE)ID401がトークンを生成した回数を記録している。セキュアなコンポーネント50の製造者であれば、各個体のID管理を元々手掛けていることもあり、比較的容易に管理できるので、トークンサーバ400の運営は、セキュアなコンポーネント50の製造者又は当該製造者と協業関係にある事業者が行うことが好ましい。なお、トークンサーバ400を運営する事業者は、サービス事業者であってもよい。 When the secure component 50 dynamically generates a token, the token server 400 records a list of SE (TEE) IDs 401 that can generate tokens and the number of times that the SE (TEE) ID 401 has generated a token. The manufacturer of the secure component 50 is already in charge of managing the IDs of each individual component, making it relatively easy to manage, so it is preferable that the token server 400 be operated by the manufacturer of the secure component 50 or an operator that has a collaborative relationship with the manufacturer. The operator that operates the token server 400 may also be a service operator.

次に、本実施の形態の認可に基づくリソースアクセス制御システムの処理について説明する。デバイス(例えば、IoTデバイス100を含む)上で動作するアプリケーションがOAuth2.0を利用する場合については、IETF(Internet Engineering Task Force)は、RFC8252に基づく認可フローを定義している。従って、RFC8252は、NativeアプリケーションがOAuth2.0を使う際のベストプラクティスであると言える。OAuth2.0では、インプリシットグランドによる認可の手順を定めているが、インプリシットグランドは、RFC8252では非推奨となっているからである。そこで、まず、IoTデバイス100のクライアントアプリ20をNativeアプリケーションとみなし、RFC8252に基づく認可フローについて説明する。 Next, the processing of the resource access control system based on authorization in this embodiment will be described. When an application running on a device (including, for example, the IoT device 100) uses OAuth 2.0, the Internet Engineering Task Force (IETF) defines an authorization flow based on RFC 8252. Therefore, RFC 8252 can be said to be the best practice when a native application uses OAuth 2.0. This is because OAuth 2.0 specifies the procedure for authorization by implicit ground, but implicit ground is not recommended in RFC 8252. Therefore, first, the authorization flow based on RFC 8252 will be described assuming that the client application 20 of the IoT device 100 is a native application.

図2はRFC8252に基づいてトークンの取得を行う場合のフローの一例を示す説明図であり、図3は認可に基づくリソースアクセス制御システムでのトークンの取得を行う場合のフローの一例を示す説明図である。図2及び図3のいずれも、RFC8252に基づく認可のフローに従っている。図2で示す符号P1~P16は、図3で示す符号P1~P16に対応する。以下、符号P1~P16で示す処理について説明する。 Figure 2 is an explanatory diagram showing an example of the flow when acquiring a token based on RFC8252, and Figure 3 is an explanatory diagram showing an example of the flow when acquiring a token in an authorization-based resource access control system. Both Figures 2 and 3 follow the authorization flow based on RFC8252. The symbols P1 to P16 shown in Figure 2 correspond to the symbols P1 to P16 shown in Figure 3. The processes indicated by the symbols P1 to P16 are explained below.

P1(クライアントアプリの実行):デバイス管理者は、クライアントアプリ20を実行する。 P1 (executing client application): The device administrator executes the client application 20.

P2(ブラウザのオープン):クライアントアプリ20は、認可コードを返すためのリダイレクトURI(Uniform Resource Identifier)をリクエストに含め、認可サーバ200の認可ページをブラウザ10で開く。リダイレクトURIは、クライアントアプリ20が承認され、認可コードが付与されたとき、認可サーバ200が、ブラウザ10を別の場所へ遷移させる(リダイレクトする)場所である。ここでは、リダイレクトURIは、IoTデバイス100内でクライアントアプリ20自身を示すURIとする。 P2 (Open browser): The client application 20 includes in the request a redirect URI (Uniform Resource Identifier) for returning an authorization code, and opens the authorization page of the authorization server 200 in the browser 10. The redirect URI is a location to which the authorization server 200 transitions (redirects) the browser 10 to another location when the client application 20 is approved and an authorization code is granted. Here, the redirect URI is a URI that indicates the client application 20 itself within the IoT device 100.

P3(認可ページの転送):ブラウザ10は、認可コードを返すためのリダイレクトURIをリクエストに含め、認可サーバ200の認可ページを開く。 P3 (transfer of authorization page): The browser 10 includes in the request a redirect URI for returning the authorization code, and opens the authorization page of the authorization server 200.

P4(認証要求):認可サーバ200は、リクエストに含まれているリダイレクトURIが事前登録された正当な値であることを確認した上で、デバイス管理者に対するユーザ認証を要求する。ここでは、ユーザID及びパスワードの入力を要求する。なお、ユーザ認証は、ユーザID及びパスワードの入力に限定されるものではなく、例えば、生体情報を入力してもよい。 P4 (authentication request): The authorization server 200 verifies that the redirect URI included in the request is a valid value that has been preregistered, and then requests user authentication from the device administrator. Here, it requests the input of a user ID and password. Note that user authentication is not limited to the input of a user ID and password, and may involve the input of biometric information, for example.

P5(認証情報入力と認可):デバイス管理者は、認可サーバ200に対してユーザ認証情報を入力して認証を完了する。認証完了後、デバイス管理者は認可サーバ200に対し、クライアントアプリ20のリソースアクセスを許可する。認可サーバ200は、ユーザの認可を確認した上で、トークン生成用の認可コードを生成する。 P5 (Authentication Information Input and Authorization): The device administrator inputs user authentication information to the authorization server 200 to complete authentication. After completing authentication, the device administrator allows the authorization server 200 to allow the client application 20 to access resources. The authorization server 200 verifies the user's authorization and then generates an authorization code for token generation.

P6(認可コード付きリダイレクトの実行):認可サーバ200は、ブラウザ10に対し、リダイレクトURIを認可コードと共に返送し、リダイレクトを行う。 P6 (Perform redirection with authorization code): The authorization server 200 returns the redirection URI together with the authorization code to the browser 10 and performs the redirection.

P7(認可コードの取得):ブラウザ10は、リダイレクトURIを認可コードと共に開くと、当該URIへのリクエストは、クライアントアプリ20が受理することになる。ここで、クライアントアプリ20は、ブラウザ10から認可コードを取得する。 P7 (obtaining authorization code): When the browser 10 opens the redirect URI together with the authorization code, requests to that URI are accepted by the client application 20. Here, the client application 20 obtains the authorization code from the browser 10.

P8(認可コードの提示):クライアントアプリ20は、トークンサーバ400にアクセスし、認可コードを提示する。 P8 (presentation of authorization code): The client application 20 accesses the token server 400 and presents the authorization code.

P9(認可コードの確認):トークンサーバ400は、クライアントアプリ20から提示された認可コードが正当であるかを照合する。照合に失敗した場合、ここで処理を中断する。 P9 (Verify authorization code): The token server 400 checks whether the authorization code presented by the client application 20 is valid. If the check fails, the process is interrupted.

P10(トークンの取得):照合に成功した場合、トークンサーバ400は、新たにトークンを生成し、生成したトークンをクライアントアプリ20に返送する。 P10 (obtaining token): If the match is successful, the token server 400 generates a new token and returns the generated token to the client application 20.

P11(トークンの保存):クライアントアプリ20は、セキュアなコンポーネント50に対してトークンの書き込みを行う。 P11 (saving token): The client application 20 writes the token to the secure component 50.

P12(トークンの取得要求):クライアントアプリ20は、リソース301を使用する際に、セキュアなコンポーネント50に対してトークンの取得を要求する。 P12 (token acquisition request): When using the resource 301, the client application 20 requests the secure component 50 to acquire a token.

P13(トークンの取得):セキュアなコンポーネント50は、クライアントアプリ20に対して、保存しているトークンを返送する。 P13 (obtaining token): The secure component 50 returns the stored token to the client application 20.

P14(リソースへのアクセス(Withトークン)):クライアントアプリ20は、セキュアなコンポーネント50から取得したトークンを添付して、リソースサーバ300に対してリソース301へのアクセスを要求する。 P14 (Access to resource (with token)): The client application 20 attaches the token obtained from the secure component 50 and requests the resource server 300 to access the resource 301.

P15(トークンの確認):リソースサーバ300は、トークンサーバ400に対して、クライアントアプリ20から受領したトークンの正当性を確認する。トークンが正当でない場合、クライアントアプリ20からのアクセスを拒否し、ここで処理を終了する。 P15 (token verification): The resource server 300 verifies the validity of the token received from the client application 20 with the token server 400. If the token is not valid, it denies access from the client application 20 and ends the process.

P16(リソースの提供):トークンが正当な場合、リソースサーバ300は、クライアントアプリ20にリソース301へのアクセスを提供する。 P16 (Provision of resource): If the token is valid, the resource server 300 provides the client application 20 with access to the resource 301.

上述のように、クライアントアプリ20は、トークンサーバ400から取得したトークンをセキュアなコンポーネント50に保存する。これにより、IoTデバイス100の長期稼働において、所定のサーバ(例えば、トークンサーバ400)から取得した有効なトークンを保持し続けるリスク(例えば、漏洩等のセキュリティリスク)を低減しつつ、再認証やトークンの更新に必要となる通信トラフシックを削減することができる。また、トークンが安全に保存されるので、漏洩等を回避するために、トークンを頻繁に更新する必要もなく、トークンを無効にするための作業時間を設定する必要もない。 As described above, the client application 20 stores the token obtained from the token server 400 in the secure component 50. This reduces the risk (e.g., security risk such as leakage) of continuing to hold a valid token obtained from a specific server (e.g., the token server 400) during long-term operation of the IoT device 100, while reducing the communication traffic required for re-authentication and token renewal. In addition, because the token is stored securely, there is no need to frequently refresh the token to avoid leakage, etc., and there is no need to set a work time for invalidating the token.

セキュアなコンポーネント50内において、トークンサーバ400と同じトークン検証ロジックを実装しておくことにより、トークンをセキュアなコンポーネント50に保存する際、当該トークンが正当な値であるか(不適切なトークンでないか)を確認し、トークンの改ざん等を防止することができる。以下では、検証アルゴリズムとして、公開鍵署名を用いる場合について説明する。なお、検証アルゴリズムは、公開鍵署名に限定されるものではなく、他の検証方法を用いてもよい。 By implementing the same token verification logic as the token server 400 in the secure component 50, when the token is stored in the secure component 50, it is possible to check whether the token has a valid value (whether it is an inappropriate token) and prevent tampering with the token. Below, a case where a public key signature is used as the verification algorithm is described. Note that the verification algorithm is not limited to a public key signature, and other verification methods may be used.

図4はトークンの内部検証の例を示す説明図である。以下、符号P21~P32で示す処理について説明する。 Figure 4 is an explanatory diagram showing an example of internal token verification. The processes indicated by symbols P21 to P32 are explained below.

P21(クライアントアプリの実行):デバイス管理者は、クライアントアプリ20を実行する。 P21 (execute client application): The device administrator executes the client application 20.

P22(ブラウザのオープン):クライアントアプリ20は、認可コードを返すためのリダイレクトURIをリクエストに含め、認可サーバ200の認可ページをブラウザ10で開く。ここでは、リダイレクトURIは、IoTデバイス100内でクライアントアプリ20自身を示すURIとする。 P22 (Open browser): The client application 20 includes in the request a redirect URI for returning an authorization code, and opens the authorization page of the authorization server 200 in the browser 10. Here, the redirect URI is a URI that indicates the client application 20 itself within the IoT device 100.

P23(認可ページの転送):ブラウザ10は、認可コードを返すためのリダイレクトURIをリクエストに含め、認可サーバ200の認可ページを開く。 P23 (Transfer of authorization page): The browser 10 includes in the request a redirect URI for returning the authorization code, and opens the authorization page of the authorization server 200.

P24(認証要求):認可サーバ200は、リクエストに含まれているリダイレクトURIが事前登録された正当な値であることを確認した上で、デバイス管理者に対するユーザ認証を要求する。 P24 (Authentication request): The authorization server 200 verifies that the redirect URI included in the request is a valid pre-registered value, and then requests user authentication from the device administrator.

P25(認証情報入力と認可):デバイス管理者は、認可サーバ200に対してユーザ認証情報を入力して認証を完了する。認証完了後、デバイス管理者は認可サーバ200に対し、クライアントアプリ20のリソースアクセスを許可する。認可サーバ200は、ユーザの認可を確認した上で、トークン生成用の認可コードを生成する。 P25 (Authentication information input and authorization): The device administrator inputs user authentication information to the authorization server 200 to complete authentication. After completing authentication, the device administrator allows the authorization server 200 to allow the client application 20 to access resources. The authorization server 200 verifies the user's authorization and then generates an authorization code for token generation.

P26(認可コード付きリダイレクトの実行):認可サーバ200は、ブラウザ10に対し、リダイレクトURIを認可コードと共に返送し、リダイレクトを行う。 P26 (Perform redirection with authorization code): The authorization server 200 returns the redirection URI together with the authorization code to the browser 10 and performs the redirection.

P27(認可コードの取得):ブラウザ10は、リダイレクトURIを認可コードと共に開くと、当該URIへのリクエストは、クライアントアプリ20が受理することになる。ここで、クライアントアプリ20は、ブラウザ10から認可コードを取得する。 P27 (obtaining authorization code): When the browser 10 opens the redirect URI together with the authorization code, requests to that URI are accepted by the client application 20. At this point, the client application 20 obtains the authorization code from the browser 10.

P28(認可コードの提示):クライアントアプリ20は、トークンサーバ400にアクセスし、認可コードを提示する。 P28 (presentation of authorization code): The client application 20 accesses the token server 400 and presents the authorization code.

P29(認可コードの確認):トークンサーバ400は、クライアントアプリ20から提示された認可コードが正当であるかを照合する。照合に失敗した場合、ここで処理を中断する。 P29 (Confirmation of authorization code): The token server 400 verifies whether the authorization code presented by the client application 20 is valid. If the verification fails, the process is interrupted here.

P30(トークンの取得):照合に成功した場合、トークンサーバ400は、新たにトークンを生成する。このとき、トークンサーバ400は、トークン署名生成機能411を呼び出し、自身が保持するトークン署名生成鍵(秘密鍵)420を用いてトークンに対して署名を行い、クライアントアプリ20に返送する。 P30 (token acquisition): If the match is successful, the token server 400 generates a new token. At this time, the token server 400 calls the token signature generation function 411, signs the token using the token signature generation key (private key) 420 that it holds, and returns the token to the client application 20.

P31(トークンの検証):クライアントアプリ20は、セキュアなコンポーネント50に対してトークンの書き込みを指示する。このとき、セキュアなコンポーネント50は、トークンの書き込みに先立って、トークン署名検証機能61を呼び出し、トークン署名検証鍵(公開鍵)71を用いて、トークンに添付された署名を検証し、トークンの正当性検証を行う。検証に失敗した場合は、ここで処理を終了し、トークンの保存を行わない。 P31 (token verification): The client application 20 instructs the secure component 50 to write a token. At this time, prior to writing the token, the secure component 50 calls the token signature verification function 61 and verifies the signature attached to the token using the token signature verification key (public key) 71, thereby verifying the validity of the token. If the verification fails, the process ends here and the token is not saved.

P32(トークンの保存):検証に成功した場合、セキュアなコンポーネント50は、トークンを保存する。P32以降の処理は、図3に示す符号P11以降の処理と同様であるが、リソースサーバ300がクライアントアプリ20から受領したトークンの正当性を確認する際に、P31の処理を同様に、トークン署名検証鍵を用いてトークンを検証してもよい。 P32 (save token): If the verification is successful, the secure component 50 saves the token. The process from P32 onwards is similar to the process from P11 onwards shown in FIG. 3, but when the resource server 300 checks the validity of the token received from the client application 20, it may verify the token using a token signature verification key, similar to the process of P31.

上述のように、セキュアなコンポーネント50がトークンを記憶する際、トークンの正当性を確認することにより、不正なトークンの挿入によるトークンの置き換え攻撃などのトークンの改ざん等を防止することができる。 As described above, when the secure component 50 stores a token, it is possible to prevent token tampering, such as a token replacement attack by inserting an unauthorized token, by checking the validity of the token.

上述の例では、セキュアなコンポーネント50に対してトークンを保存する構成であったが、セキュアなコンポーネント50が動的にトークンを生成してもよい。以下では、トークンの改ざん検知コードの付与による保護及び暗号技術による保護について説明する。まず、トークンの動的生成と改ざん検知コードの付与による保護について説明する。 In the above example, the token is stored in the secure component 50, but the secure component 50 may dynamically generate a token. In the following, protection by adding a tamper detection code to the token and protection by cryptographic technology will be described. First, protection by dynamically generating a token and adding a tamper detection code will be described.

図5は改ざん検知コードの付与による保護の例を示す説明図である。以下、符号P41~P58で示す処理について説明する。 Figure 5 is an explanatory diagram showing an example of protection by adding a tamper detection code. The processes indicated by symbols P41 to P58 are explained below.

P41(クライアントアプリの実行):デバイス管理者は、クライアントアプリ20を実行する。 P41 (executing client application): The device administrator executes the client application 20.

P42(ブラウザのオープン):クライアントアプリ20は、認可コードを返すためのリダイレクトURIをリクエストに含め、認可サーバ200の認可ページをブラウザ10で開く。ここでは、リダイレクトURIは、IoTデバイス100内でクライアントアプリ20自身を示すURIとする。 P42 (Open browser): The client application 20 includes in the request a redirect URI for returning an authorization code, and opens the authorization page of the authorization server 200 in the browser 10. Here, the redirect URI is a URI that indicates the client application 20 itself within the IoT device 100.

P43(認可ページの転送):ブラウザ10は、認可コードを返すためのリダイレクトURIをリクエストに含め、認可サーバ200の認可ページを開く。 P43 (Transfer of authorization page): The browser 10 includes in the request a redirect URI for returning the authorization code, and opens the authorization page of the authorization server 200.

P44(認証要求):認可サーバ200は、リクエストに含まれているリダイレクトURIが事前登録された正当な値であることを確認した上で、デバイス管理者に対するユーザ認証を要求する。ここでは、ユーザID及びパスワードの入力を要求する。 P44 (Authentication request): The authorization server 200 verifies that the redirect URI included in the request is a valid value that has been preregistered, and then requests user authentication from the device administrator. Here, it requests the input of a user ID and password.

P45(認証情報入力と認可):デバイス管理者は、認可サーバ200に対してユーザ認証情報を入力して認証を完了する。認証完了後、デバイス管理者は認可サーバ200に対し、クライアントアプリ20のリソースアクセスを許可する。認可サーバ200は、ユーザの認可を確認した上で、トークン生成用の認可コードを生成する。 P45 (Authentication information input and authorization): The device administrator inputs user authentication information to the authorization server 200 to complete authentication. After completing authentication, the device administrator allows the authorization server 200 to allow the client application 20 to access resources. The authorization server 200 verifies the user's authorization and then generates an authorization code for token generation.

P46(認可コード付きリダイレクトの実行):認可サーバ200は、ブラウザ10に対し、リダイレクトURIを認可コードと共に返送し、リダイレクトを行う。 P46 (Perform redirection with authorization code): The authorization server 200 returns the redirection URI together with the authorization code to the browser 10 and performs the redirection.

P47(認可コードの取得):ブラウザ10は、リダイレクトURIを認可コードと共に開くと、当該URIへのリクエストは、クライアントアプリ20が受理することになる。ここで、クライアントアプリ20は、ブラウザ10から認可コードを取得する。 P47 (obtaining authorization code): When the browser 10 opens the redirect URI together with the authorization code, requests to that URI are accepted by the client application 20. Here, the client application 20 obtains the authorization code from the browser 10.

P48(認可コードの提示):クライアントアプリ20は、トークンサーバ400にアクセスし、認可コードを提示する。 P48 (presentation of authorization code): The client application 20 accesses the token server 400 and presents the authorization code.

P49(認可コードの確認):トークンサーバ400は、クライアントアプリ20から提示された認可コードが正当であるかを照合する。照合に失敗した場合、ここで処理を中断する。 P49 (Verify authorization code): The token server 400 checks whether the authorization code presented by the client application 20 is valid. If the check fails, the process is interrupted here.

P50(トークンの取得):照合に成功した場合、トークンサーバ400は、新たに初期トークンを生成し、生成した初期トークンをクライアントアプリ20に返送する。 P50 (token acquisition): If the match is successful, the token server 400 generates a new initial token and returns the generated initial token to the client application 20.

P51(トークンの保存):クライアントアプリ20は、セキュアなコンポーネント50に対して初期トークンの書き込みを行う。 P51 (saving token): The client application 20 writes the initial token to the secure component 50.

P52(トークンの取得要求):クライアントアプリ20は、リソース301を使用する際に、セキュアなコンポーネント50に対してトークンの取得を要求する。 P52 (token acquisition request): When using the resource 301, the client application 20 requests the secure component 50 to acquire a token.

P53(IDおよびカウンタ付きトークンの生成):セキュアなコンポーネント50は、トークン生成機能60を呼び出し、自身が保持する固有のID51と、トークン生成回数を記録するカウンタ52の値を初期トークンに付加し、IDおよびカウンタ付きトークンを生成する。セキュアなコンポーネント50は、トークンを生成後、カウンタ52の値に1を加算する。 P53 (Generating a token with ID and counter): The secure component 50 calls the token generation function 60, adds its own unique ID 51 and the value of the counter 52 that records the number of tokens generated to the initial token, and generates a token with ID and counter. After generating the token, the secure component 50 adds 1 to the value of the counter 52.

P54(トークンへのMAC付与):セキュアなコンポーネント50は、自身が保持するトークンMAC鍵73を用いて、IDおよびカウンタ付きトークンに対するMAC(メッセージ認証コード)を計算し、計算したMACをトークンに付与する。MAC計算は、トークンのデータ列に対して、既存のMAC計算アルゴリズム(例えば、HMAC-SHA256など)を用いることができる。 P54 (assigning MAC to token): The secure component 50 uses the token MAC key 73 it holds to calculate a MAC (message authentication code) for the token with ID and counter, and assigns the calculated MAC to the token. For the MAC calculation, an existing MAC calculation algorithm (e.g., HMAC-SHA256, etc.) can be used for the token data string.

P55(リソースへのアクセス(Withトークン)):クライアントアプリ20は、セキュアなコンポーネント50から取得したIDおよびカウンタ付きトークンをMACとともに添付して、リソースサーバ300に対してリソース301へのアクセスを要求する。 P55 (Access to resource (with token)): The client application 20 attaches the ID and counter-attached token obtained from the secure component 50 along with the MAC, and requests the resource server 300 to access the resource 301.

P56(トークンのMAC検証):リソースサーバ300は、トークンサーバ400に対して、クライアントアプリ20から受領したIDおよびカウンタ付きトークンの検証を依頼する。トークンサーバ400は、トークンMAC検証機能413を呼び出し、自身が保持するトークンMAC検証鍵422を用いてトークンに付与されているMACを検証する。基本的には、セキュアなコンポーネント50で実行したMAC計算と同一の計算を行ってMACを導出し、トークンに付与されているMACと一致比較すればよい。両者が不一致の場合、不正なトークンとみなし、ここで処理を終了する。 P56 (token MAC verification): The resource server 300 requests the token server 400 to verify the ID and counter-attached token received from the client application 20. The token server 400 calls the token MAC verification function 413 and verifies the MAC assigned to the token using the token MAC verification key 422 that it holds. Basically, it derives the MAC by performing the same calculation as the MAC calculation performed by the secure component 50, and compares it with the MAC assigned to the token. If the two do not match, it considers the token to be invalid and ends the process.

P57(トークンの正当性検証):トークンサーバ400は、トークンからIDを取得してトークン送信元のセキュアなコンポーネント50を特定すると共に、当該IDに対応して保持しているカウンタ402の値を読み出し、リソースサーバ300から取得したトークンに埋め込まれたカウンタ値と比較する。比較終了後、トークンサーバ400は、カウンタ402の値に1を加算する。IDが見つからなかった場合、またはカウンタ値が一致しなかった場合、不正なトークンとみなし、ここで処理を終了する。 P57 (token validity verification): The token server 400 acquires an ID from the token to identify the secure component 50 that sent the token, reads the value of the counter 402 stored corresponding to that ID, and compares it with the counter value embedded in the token acquired from the resource server 300. After completing the comparison, the token server 400 adds 1 to the value of the counter 402. If the ID is not found or the counter values do not match, the token is deemed to be invalid and processing ends here.

P58(リソースの提供):トークンが正当な場合、リソースサーバ300は、クライアントアプリ20にリソース301へのアクセスを提供する。 P58 (Providing resource): If the token is valid, the resource server 300 provides the client application 20 with access to the resource 301.

上述の例のように、セキュアなコンポーネント50は、内部に保有する情報及び記憶した初期トークンを用いて、IDおよびカウンタ付きトークン(新たなトークン)を生成する。内部に保有する情報は、新たなトークンを生成するための秘匿情報であれば、例えば、固有のID、トークン生成回数を記録するカウンタ値や乱数要素など、どのような情報を用いてもよい。 As in the above example, the secure component 50 generates a token with an ID and a counter (a new token) using information stored internally and the stored initial token. The information stored internally may be any confidential information for generating a new token, such as a unique ID, a counter value that records the number of times a token has been generated, or a random number element.

クライアントアプリ20は、新たなトークンをリソースサーバ300へ送信する。リソースサーバ300は、新たなトークンの検証結果に基づいてクライアントアプリ20のリソース301へのアクセスを制御する。すなわち、検証が成功すれば、クライアントアプリ20はリソース301にアクセスすることができる。このように、クライアント側でトークンを動的に生成し、リソースサーバ300で当該トークンを検証することにより、トークンの再利用(トークンを用いたリプレイアタック)やなりすまし等を防止できる。 The client application 20 sends a new token to the resource server 300. The resource server 300 controls the client application 20's access to the resource 301 based on the verification result of the new token. In other words, if the verification is successful, the client application 20 can access the resource 301. In this way, by dynamically generating a token on the client side and verifying the token on the resource server 300, it is possible to prevent token reuse (replay attack using a token) and spoofing, etc.

また、上述のように、改ざん検知コード(上述の例では、MAC)をトークンに付与することで、秘密鍵を知らない攻撃者は改ざん検知コードを計算することができず、トークン検証側で正当に取り扱われるトークンとMACを生成することができなくなる。これにより、トークンの偽造や改ざんを防止できる。 In addition, as described above, by assigning a tamper detection code (in the above example, a MAC) to the token, an attacker who does not know the private key cannot calculate the tamper detection code and cannot generate a token and MAC that are treated properly by the token verification side. This makes it possible to prevent token forgery and tampering.

上述の例では、鍵付きハッシュによりMACを付与して改ざん検知を行っているが、改ざん検知のアルゴリズムは、上述の例に限定されるものではなく、適宜所要のアルゴリズムを用いることができる。 In the above example, tamper detection is performed by adding a MAC using a keyed hash, but the algorithm for tamper detection is not limited to the above example, and any algorithm can be used as needed.

次に、トークンの動的生成と暗号化による保護について説明する。 Next, we'll explain how tokens are dynamically generated and protected by encryption.

図6はトークンの暗号化による保護の例を示す説明図である。以下、符号P61~P78で示す処理について説明する。 Figure 6 is an explanatory diagram showing an example of protection by token encryption. The processes indicated by symbols P61 to P78 are explained below.

P61(クライアントアプリの実行):デバイス管理者は、クライアントアプリ20を実行する。 P61 (executing client application): The device administrator executes the client application 20.

P62(ブラウザのオープン):クライアントアプリ20は、認可コードを返すためのリダイレクトURIをリクエストに含め、認可サーバ200の認可ページをブラウザ10で開く。ここでは、リダイレクトURIは、IoTデバイス100内でクライアントアプリ20自身を示すURIとする。 P62 (Open browser): The client application 20 includes in the request a redirect URI for returning an authorization code, and opens the authorization page of the authorization server 200 in the browser 10. Here, the redirect URI is a URI that indicates the client application 20 itself within the IoT device 100.

P63(認可ページの転送):ブラウザ10は、認可コードを返すためのリダイレクトURIをリクエストに含め、認可サーバ200の認可ページを開く。 P63 (Transfer of authorization page): The browser 10 includes in the request a redirect URI for returning the authorization code, and opens the authorization page of the authorization server 200.

P64(認証要求):認可サーバ200は、リクエストに含まれているリダイレクトURIが事前登録された正当な値であることを確認した上で、デバイス管理者に対するユーザ認証を要求する。ここでは、ユーザID及びパスワードの入力を要求する。 P64 (Authentication request): The authorization server 200 verifies that the redirect URI included in the request is a valid value that has been preregistered, and then requests user authentication from the device administrator. Here, the user is requested to enter a user ID and password.

P65(認証情報入力と認可):デバイス管理者は、認可サーバ200に対してユーザ認証情報を入力して認証を完了する。認証完了後、デバイス管理者は認可サーバ200に対し、クライアントアプリ20のリソースアクセスを許可する。認可サーバ200は、ユーザの認可を確認した上で、トークン生成用の認可コードを生成する。 P65 (Authentication information input and authorization): The device administrator inputs user authentication information to the authorization server 200 to complete authentication. After completing authentication, the device administrator allows the authorization server 200 to allow the client application 20 to access resources. The authorization server 200 verifies the user's authorization and then generates an authorization code for token generation.

P66(認可コード付きリダイレクトの実行):認可サーバ200は、ブラウザ10に対し、リダイレクトURIを認可コードと共に返送し、リダイレクトを行う。 P66 (Perform redirection with authorization code): The authorization server 200 returns the redirection URI together with the authorization code to the browser 10 and performs the redirection.

P67(認可コードの取得):ブラウザ10は、リダイレクトURIを認可コードと共に開くと、当該URIへのリクエストは、クライアントアプリ20が受理することになる。ここで、クライアントアプリ20は、ブラウザ10から認可コードを取得する。 P67 (obtaining authorization code): When the browser 10 opens the redirect URI together with the authorization code, requests to that URI are accepted by the client application 20. Here, the client application 20 obtains the authorization code from the browser 10.

P68(認可コードの提示):クライアントアプリ20は、トークンサーバ400にアクセスし、認可コードを提示する。 P68 (presentation of authorization code): The client application 20 accesses the token server 400 and presents the authorization code.

P69(認可コードの確認):トークンサーバ400は、クライアントアプリ20から提示された認可コードが正当であるかを照合する。照合に失敗した場合、ここで処理を中断する。 P69 (Verify authorization code): The token server 400 checks whether the authorization code presented by the client application 20 is valid. If the check fails, the process is interrupted here.

P70(トークンの取得):照合に成功した場合、トークンサーバ400は、新たに初期トークンを生成し、生成した初期トークンをクライアントアプリ20に返送する。 P70 (token acquisition): If the match is successful, the token server 400 generates a new initial token and returns the generated initial token to the client application 20.

P71(トークンの保存):クライアントアプリ20は、セキュアなコンポーネント50に対して初期トークンの書き込みを行う。 P71 (saving token): The client application 20 writes the initial token to the secure component 50.

P72(トークンの取得要求):クライアントアプリ20は、リソース301を使用する際に、セキュアなコンポーネント50に対してトークンの取得を要求する。 P72 (token acquisition request): When using the resource 301, the client application 20 requests the secure component 50 to acquire a token.

P73(IDおよびカウンタ付きトークンの生成):セキュアなコンポーネント50は、トークン生成機能60を呼び出し、自身が保持する固有のID51と、トークン生成回数を記録するカウンタ52の値を初期トークンに付加し、IDおよびカウンタ付きトークンを生成する。セキュアなコンポーネント50は、トークンを生成後、カウンタ52の値に1を加算する。 P73 (Generating a token with ID and counter): The secure component 50 calls the token generation function 60, adds its own unique ID 51 and the value of the counter 52 that records the number of tokens generated to the initial token, and generates a token with ID and counter. After generating the token, the secure component 50 adds 1 to the value of the counter 52.

P74(トークンの暗号化):セキュアなコンポーネント50は、トークン暗号化機能62を呼び出し、自身が保持するトークン暗号化鍵72を用いて、IDおよびカウンタ付きトークンを暗号化する。使用する暗号化アルゴリズムは、非対称鍵暗号(RSA等)、対象鍵暗号(共通鍵暗号)(AES:Advanced Encryption Standard等)のいずれでもよい。本実施例では、共通鍵を用いてAESで暗号化している。 P74 (token encryption): The secure component 50 calls the token encryption function 62 and encrypts the ID and counter-attached token using the token encryption key 72 held by the secure component 50. The encryption algorithm used may be either asymmetric key encryption (e.g., RSA) or symmetric key encryption (common key encryption) (e.g., AES: Advanced Encryption Standard). In this embodiment, encryption is performed with AES using a common key.

P75(リソースへのアクセス(Withトークン)):クライアントアプリ20は、セキュアなコンポーネント50から取得した暗号化トークンを添付して、リソースサーバ300に対してリソース301へのアクセスを要求する。 P75 (Access to resource (with token)): The client application 20 requests access to the resource 301 from the resource server 300, attaching the encrypted token obtained from the secure component 50.

P76(トークンの復号):リソースサーバ300は、トークンサーバ400に対して、クライアントアプリ20から受領した暗号化トークンの検証を依頼する。トークンサーバ400は、トークン復号機能412を呼び出し、自身が保持するトークン復号鍵421を用いて暗号化トークンを復号し、IDおよびカウンタ付きトークンを得る。 P76 (token decryption): The resource server 300 requests the token server 400 to verify the encrypted token received from the client application 20. The token server 400 calls the token decryption function 412, decrypts the encrypted token using the token decryption key 421 that it holds, and obtains a token with an ID and a counter.

P77(トークンの正当性検証):トークンサーバ400は、トークンからIDを取得してトークン送信元のセキュアなコンポーネント50を特定すると共に、当該IDに対応して保持しているカウンタ402の値を読み出し、リソースサーバ300から取得したトークンに埋め込まれたカウンタ値と比較する。比較終了後、トークンサーバ400は、カウンタ402の値に1を加算する。IDが見つからなかった場合、またはカウンタ値が一致しなかった場合、不正なトークンとみなし、ここで処理を終了する。 P77 (token validity verification): The token server 400 acquires an ID from the token to identify the secure component 50 that sent the token, reads the value of the counter 402 stored corresponding to the ID, and compares it with the counter value embedded in the token acquired from the resource server 300. After completing the comparison, the token server 400 adds 1 to the value of the counter 402. If the ID is not found or the counter values do not match, the token is deemed to be invalid and processing ends here.

P78(リソースの提供):トークンが正当な場合、リソースサーバ300は、クライアントアプリ20にリソース301へのアクセスを提供する。 P78 (Providing resource): If the token is valid, the resource server 300 provides the client application 20 with access to the resource 301.

上述の例においても、図5の場合と同様に、セキュアなコンポーネント50は、内部に保有する情報及び記憶した初期トークンを用いて、IDおよびカウンタ付きトークン(新たなトークン)を生成する。すなわち、トークンサーバ400が発行した固定値のトークンを使い続けるのではなく、セキュアなコンポーネント50とトークンサーバ400が、鍵とセキュアなコンポーネント50の状態に関する情報(例えば、ID、カウンタ)を個別に保持した上で、鍵を用いて両者の上方の整合性を検証する形でトークンの正当性検証を行う。 In the above example, as in the case of FIG. 5, the secure component 50 generates a token with an ID and counter (a new token) using information held internally and the stored initial token. In other words, instead of continuing to use a token with a fixed value issued by the token server 400, the secure component 50 and the token server 400 separately hold a key and information about the state of the secure component 50 (e.g., ID, counter), and then verify the validity of the token by verifying the consistency of both parties using a key.

OAuth2.0をはじめとする従来技術においては、トークンが搾取された場合の不正アクセスを防止することが技術的に困難であり、代替策としてトークンの有効期間の削減、トークンの無効化、署名検証等を行っていたが、いずれもクライアント側に対する通信負荷の増大をもたらしていた。 In conventional technologies such as OAuth 2.0, it is technically difficult to prevent unauthorized access when a token is stolen, so alternative measures include shortening the token's validity period, invalidating the token, and verifying the signature, but all of these measures increase the communication load on the client side.

一方で本実施例の場合、上述のように、セキュアなコンポーネント50側のIDをトークンに添付することで、トークン送信元の正当性を検証できる。また、カウンタをトークンに添付することで、トークンの再利用を防止できる。さらに、トークンは暗号化されているので、偽造や解読が困難である。これにより、IoTデバイス100は、トークンのリフレッシュ等の追加通信を行うことなく、リソースサーバ300に対する通信のみを行うことができ、セキュリティを維持しつつ最適な通信を行うことができる。 On the other hand, in the case of this embodiment, as described above, the ID of the secure component 50 side is attached to the token, so that the legitimacy of the token sender can be verified. Also, by attaching a counter to the token, it is possible to prevent the token from being reused. Furthermore, since the token is encrypted, it is difficult to forge or decipher. This allows the IoT device 100 to communicate only with the resource server 300 without performing additional communication such as refreshing the token, and thus allows optimal communication while maintaining security.

なお、本実施例で採用しているトークンの暗号化、復号の方法や正当性検証方法(ID
とカウンタ)は一例であり、トークン生成や正当性検証に係るアルゴリズム、検証ポリシーは適宜の方法を用いることができる。
The method of token encryption and decryption and the method of validity verification (ID
and a counter) are just an example, and any appropriate method can be used as the algorithm and verification policy for token generation and validity verification.

セキュアなコンポーネント50にトークンを記憶することで、通常のファイルストレージのように直接搾取される危険性は低下したものの、クライアントアプリ20のふりをした不正なアプリによって、セキュアなコンポーネント50からトークンを読み出して搾取されるリスクはなお存在し得る。この場合、クライアントアプリ20とセキュアなコンポーネント50との間で共通鍵を保持し、クライアントアプリ20とセキュアなコンポーネント50との間でセキュアチャネルを開設することでトークンの搾取を防止できる。さらに、以下では、クライアント証明書の提示を行うことでクライアントアプリ20を検証する方法について説明する。 Although storing the token in the secure component 50 reduces the risk of direct exploitation as in normal file storage, there is still a risk that a fraudulent application posing as the client application 20 may read the token from the secure component 50 and exploit it. In this case, token exploitation can be prevented by storing a common key between the client application 20 and the secure component 50 and opening a secure channel between the client application 20 and the secure component 50. Furthermore, a method of verifying the client application 20 by presenting a client certificate will be described below.

図7はクライアントアプリに対する認証の例を示す説明図である。以下、符号P81~P98で示す処理について説明する。 Figure 7 is an explanatory diagram showing an example of authentication for a client application. The processes indicated by symbols P81 to P98 are explained below.

P81(クライアントアプリの実行):デバイス管理者は、クライアントアプリ20を実行する。 P81 (executing client application): The device administrator executes the client application 20.

P82(ブラウザのオープン):クライアントアプリ20は、認可コードを返すためのリダイレクトURIをリクエストに含め、認可サーバ200の認可ページをブラウザ10で開く。ここでは、リダイレクトURIは、IoTデバイス100内でクライアントアプリ20自身を示すURIとする。 P82 (Open browser): The client application 20 includes in the request a redirect URI for returning an authorization code, and opens the authorization page of the authorization server 200 in the browser 10. Here, the redirect URI is a URI that indicates the client application 20 itself within the IoT device 100.

P83(認可ページの転送):ブラウザ10は、認可コードを返すためのリダイレクトURIをリクエストに含め、認可サーバ200の認可ページを開く。 P83 (Transfer of authorization page): The browser 10 includes in the request a redirect URI for returning the authorization code, and opens the authorization page of the authorization server 200.

P84(認証要求):認可サーバ200は、リクエストに含まれているリダイレクトURIが事前登録された正当な値であることを確認した上で、デバイス管理者に対するユーザ認証を要求する。 P84 (Authentication request): The authorization server 200 verifies that the redirect URI included in the request is a valid pre-registered value, and then requests user authentication from the device administrator.

P85(認証情報入力と認可):デバイス管理者は、認可サーバ200に対してユーザ認証情報を入力して認証を完了する。認証完了後、デバイス管理者は認可サーバ200に対し、クライアントアプリ20のリソースアクセスを許可する。認可サーバ200は、ユーザの認可を確認した上で、トークン生成用の認可コードを生成する。 P85 (Authentication information input and authorization): The device administrator inputs user authentication information to the authorization server 200 to complete authentication. After completing authentication, the device administrator allows the authorization server 200 to allow the client application 20 to access resources. The authorization server 200 verifies the user's authorization and then generates an authorization code for token generation.

P86(認可コード付きリダイレクトの実行):認可サーバ200は、ブラウザ10に対し、リダイレクトURIを認可コードと共に返送し、リダイレクトを行う。 P86 (Perform redirection with authorization code): The authorization server 200 returns the redirection URI together with the authorization code to the browser 10 and performs the redirection.

P87(認可コードの取得):ブラウザ10は、リダイレクトURIを認可コードと共に開くと、当該URIへのリクエストは、クライアントアプリ20が受理することになる。ここで、クライアントアプリ20は、ブラウザ10から認可コードを取得する。 P87 (Obtaining authorization code): When the browser 10 opens the redirect URI together with the authorization code, requests to that URI are accepted by the client application 20. Here, the client application 20 obtains the authorization code from the browser 10.

P88(認可コードの提示):クライアントアプリ20は、トークンサーバ400にアクセスし、認可コードを提示する。 P88 (presentation of authorization code): The client application 20 accesses the token server 400 and presents the authorization code.

P89(認可コードの確認):トークンサーバ400は、クライアントアプリ20から提示された認可コードが正当であるかを照合する。照合に失敗した場合、ここで処理を中断する。 P89 (Confirmation of authorization code): The token server 400 verifies whether the authorization code presented by the client application 20 is valid. If the verification fails, the process is interrupted here.

P90(トークンの取得):照合に成功した場合、トークンサーバ400は、新たにトークンを生成し、生成したトークンをクライアントアプリ20に返送する。 P90 (obtaining token): If the match is successful, the token server 400 generates a new token and returns the generated token to the client application 20.

P91(クライアントアプリ証明書の送信):クライアントアプリ20は、トークンの書き込みに先立って、セキュアなコンポーネント50に対してクライアントアプリ証明書21を送信する。 P91 (sending client application certificate): The client application 20 sends the client application certificate 21 to the secure component 50 prior to writing the token.

P92(クライアントアプリ証明書の検証):セキュアなコンポーネント50は、クライアント検証機能64を呼び出し、自身が保持しているクライアント検証鍵(公開鍵)74を用いて、送信されたクライアントアプリ証明書21を検証する。具体的には、セキュアなコンポーネント50は、クライアントアプリ20のハッシュ値を計算し、計算したハッシュ値と、クライアントアプリ証明書21に含まれる暗号化ハッシュ値を復号して得た値とを比較し、一致していることを確認する。不一致の場合、クライアントアプリ20は不正なクライアントアプリであるとみなし、ここで処理を終了する。 P92 (Verifying client application certificate): The secure component 50 calls the client verification function 64 and verifies the transmitted client application certificate 21 using the client verification key (public key) 74 that it holds. Specifically, the secure component 50 calculates a hash value of the client application 20, compares the calculated hash value with the value obtained by decrypting the encrypted hash value included in the client application certificate 21, and confirms that they match. If they do not match, the client application 20 is considered to be an unauthorized client application, and the process ends here.

P93(トークンの保存):クライアントアプリ証明書の検証が成功した場合、クライアントアプリ20は、セキュアなコンポーネント50に対してトークンの書き込みを行う。セキュアなコンポーネント50は、クライアントアプリ証明書の検証が完了していることを確認した上で、トークンを内部に保存する。 P93 (saving token): If the verification of the client application certificate is successful, the client application 20 writes the token to the secure component 50. The secure component 50 confirms that the verification of the client application certificate is complete, and then saves the token internally.

P94(トークンの取得要求):クライアントアプリ20は、リソース301を使用する際に、セキュアなコンポーネント50に対してトークンの取得を要求する。このとき、P92で行った、クライアントアプリ証明書の検証を再度実施する。 P94 (token acquisition request): When using the resource 301, the client application 20 requests the secure component 50 to acquire a token. At this time, the client application certificate verification performed in P92 is performed again.

P95(トークンの取得):クライアントアプリ証明書の検証が成功した場合、セキュアなコンポーネント50は、クライアントアプリ20に対して、保存しているトークンを返送する。 P95 (obtaining token): If the verification of the client application certificate is successful, the secure component 50 returns the stored token to the client application 20.

P96(リソースへのアクセス(Withトークン)):クライアントアプリ20は、セキュアなコンポーネント50から取得したトークンを添付して、リソースサーバ300に対してリソース301へのアクセスを要求する。 P96 (Access to resource (with token)): The client application 20 attaches the token obtained from the secure component 50 and requests the resource server 300 to access the resource 301.

P97(トークンの確認):リソースサーバ300は、トークンサーバ400に対して、クライアントアプリ20から受領したトークンの正当性を確認する。トークンが正当でない場合、クライアントアプリ20からのアクセスを拒否し、ここで処理を終了する。 P97 (Token Verification): The resource server 300 verifies the validity of the token received from the client application 20 with the token server 400. If the token is not valid, it denies access from the client application 20 and ends the process.

P98(リソースの提供):トークンが正当な場合、リソースサーバ300は、クライアントアプリ20にリソース301へのアクセスを提供する。 P98 (Providing resource): If the token is valid, the resource server 300 provides the client application 20 with access to the resource 301.

上述の実施例によれば、不正なアプリによって、トークンの不正な設定や搾取を防止できる。 The above-described embodiment can prevent unauthorized configuration and exploitation of tokens by unauthorized apps.

クライアント検証鍵(公開鍵)74は、セキュアなコンポーネント50に予め保持されており、一般のユーザがクライアント検証鍵(公開鍵)74を変更することはできない。また、リプレイアタックを防止するため、クライアントアプリ20のハッシュ値計算は、セキュアなコンポーネント50自身が直接計算することが望ましい。なお、クライアントアプリ証明書21によるクライアント認証は一例であって、これに限定されるものではなく、他のどのような方法でクライアント認証を行ってもよい。 The client verification key (public key) 74 is stored in advance in the secure component 50, and general users cannot change the client verification key (public key) 74. In addition, in order to prevent replay attacks, it is preferable that the hash value of the client application 20 is calculated directly by the secure component 50 itself. Note that client authentication using the client application certificate 21 is just one example, and is not limited to this, and any other method may be used for client authentication.

以上のとおり、IoTデバイス100側にセキュアなコンポーネント50を組み込むことにより、IoTデバイス100上で適切にセキュリティを維持したまま、認可メカニズムを利用することができる。一方で、IoTデバイス100のセキュリティを維持するためには、内部に保持する鍵や各機能などの内部状態を適切に保守管理し、必要に応じて当該内部状態を更新できることが望ましい。以下では、IoTデバイス100の内部状態の更新について説明する。 As described above, by incorporating a secure component 50 on the IoT device 100 side, it is possible to utilize an authorization mechanism while maintaining appropriate security on the IoT device 100. On the other hand, in order to maintain the security of the IoT device 100, it is desirable to appropriately maintain and manage the internal state of the keys and each function held inside, and to update the internal state as necessary. The following describes how to update the internal state of the IoT device 100.

図8は秘匿通信路による外部管理の例を示す説明図である。以下、符号P101~P106で示す処理について説明する。 Figure 8 is an explanatory diagram showing an example of external management using a secret communication channel. The processes indicated by symbols P101 to P106 are explained below.

P101(IoTデバイスの電源投入):デバイス管理者がIoTデバイス100を使用するためIoTデバイス100に電源を投入する。 P101 (Powering on IoT device): The device administrator powers on IoT device 100 in order to use it.

P102(セキュアなコンポーネントへの状態確認指示):IoTデバイス100は、電源が投入されると、セキュアなコンポーネント50に対して内部状態の更新が必要かどうか、状態確認指示を行う。 P102 (state check instruction to secure component): When the IoT device 100 is powered on, it issues a state check instruction to the secure component 50 to see if an internal state needs to be updated.

P103(秘匿通信路開設機能の呼び出し):セキュアなコンポーネント50は、状態確認指示を受けて、自身の内部の秘匿通信路開設機能65を呼び出す。 P103 (calling the secret communication channel establishment function): Upon receiving the status check instruction, the secure component 50 calls its own internal secret communication channel establishment function 65.

P104(秘匿通信路の開設):秘匿通信路開設機能65は、セキュアなコンポーネント管理サーバ500に対して秘匿通信路を開設する。ここでは、TLS(Transport Layer Security)通信を想定しているが、他の通信プロトコルを用いたセキュアチャネルを使用してもよい。セキュアなコンポーネント50が自らネットワーク通信機能を持たない場合は、IoTデバイス100の通信機能を使用してもよい。ただし、秘匿通信路のエンドポイントは、あくまでもセキュアなコンポーネント50とセキュアなコンポーネント管理サーバ500の間である。 P104 (Establishment of a secret communication path): The secret communication path establishment function 65 establishes a secret communication path to the secure component management server 500. Here, TLS (Transport Layer Security) communication is assumed, but a secure channel using another communication protocol may be used. If the secure component 50 does not have its own network communication function, the communication function of the IoT device 100 may be used. However, the endpoint of the secret communication path is always between the secure component 50 and the secure component management server 500.

P105(更新対象コンテンツの準備):セキュアなコンポーネント管理サーバ500は、秘匿通信路開設を受けて、更新すべきコンテンツを準備する。本実施例では、例えば、トークン暗号化鍵の危殆化に備え、新たな鍵の更新を行うものとする。なお、更新対象は、トークン暗号化鍵に限定されない。セキュアなコンポーネント管理サーバ500は、更新対象となる鍵の生成、準備を行う。 P105 (Preparation of content to be updated): The secure component management server 500 prepares the content to be updated in response to the establishment of a secret communication path. In this embodiment, for example, a new key is updated in preparation for the token encryption key being compromised. Note that the update target is not limited to the token encryption key. The secure component management server 500 generates and prepares the key to be updated.

P106(コンテンツの送信):セキュアなコンポーネント管理サーバ500は、秘匿通信路経由でセキュアなコンポーネント50に対してコンテンツを送信する。ここでは、セキュアなコンポーネント管理サーバ500は、トークン暗号化鍵72をセキュアなコンポーネント50に送信している。本実施例のように、対向するコンテンツが他のサーバ上に存在する場合は、当該サーバに対して別途秘匿通信路を開設して更新を行うことができる。ここでは、トークンサーバ400に対して秘匿通信路を開設し、トークン復号鍵421の更新を同時に行う。 P106 (sending content): The secure component management server 500 sends content to the secure component 50 via a secret communication path. Here, the secure component management server 500 sends the token encryption key 72 to the secure component 50. If the opposing content exists on another server, as in this embodiment, a separate secret communication path can be opened to that server to perform the update. Here, a secret communication path is opened to the token server 400, and the token decryption key 421 is updated at the same time.

これにより、セキュアなコンポーネント50のトークンに関する機能又は状態を遠隔で更新することができ、IoTデバイス100のセキュリティを維持することができる。 This allows the functionality or state of the token of the secure component 50 to be updated remotely, thereby maintaining the security of the IoT device 100.

上述の実施例では、鍵の更新について例示したが、更新対象は鍵に限定されるものではなく、セキュアなコンポーネント50が保持している任意のコンテンツを更新することができる。例えば、セキュアなコンポーネント50がJava Card(商標)プラットフォームをサポートしたセキュアエレメントの場合、各種処理(暗号化処理、生成処理、署名検証処理等)がJava Cardアプレットとして実装されていれば、アプレットの更新により各種機能を更新することができる。また、トークンに関する機能の有効化・無効化を切り替えるフラグを用意するような実施例の場合、当該フラグを秘匿通信路経由で更新することで、遠隔から認可機能の有効・無効を切り替えることが可能となる。また、本実施例では、更新を確実に行うため、電源投入を遠隔管理のトリガとしているが、これに限定されるものではなく、クライアントアプリの起動、IoTデバイス上の他のアプリの動作など、他のアクションをトリガとしてもよい。 In the above embodiment, key updating is exemplified, but the update target is not limited to keys, and any content held by the secure component 50 can be updated. For example, if the secure component 50 is a secure element that supports the Java Card (trademark) platform, and various processes (encryption process, generation process, signature verification process, etc.) are implemented as Java Card applets, various functions can be updated by updating the applet. In addition, in the case of an embodiment in which a flag is provided for switching between enabling and disabling functions related to the token, the authorization function can be remotely enabled and disabled by updating the flag via a secret communication path. In addition, in this embodiment, in order to ensure updating, power-on is used as a trigger for remote management, but this is not limited thereto, and other actions such as the startup of a client application or the operation of another application on the IoT device may be used as the trigger.

本実施の形態の認可に基づくリソースアクセス制御システムは、ユーザ認証結果に基づいてリソースに対するアクセスを認可する認可サーバと、前記認可サーバの認可結果に基づいてアクセスが制御されるリソースを有するリソースサーバと、クライアントが動作するデバイスとを備え、前記デバイスは、前記認可サーバがリソースに対するアクセスを認可した結果、前記クライアントが取得する、所定のサーバが発行するトークン情報を記憶するセキュアなコンポーネントを備え、前記クライアントは、前記セキュアなコンポーネントに記憶したトークン情報を前記リソースサーバへ送信し、前記リソースサーバは、前記トークン情報の検証結果に基づいて前記クライアントのリソースへのアクセスを制御する。 The authorization-based resource access control system of this embodiment includes an authorization server that authorizes access to resources based on a user authentication result, a resource server having resources whose access is controlled based on the authorization result of the authorization server, and a device on which a client operates. The device includes a secure component that stores token information issued by a specified server and acquired by the client as a result of the authorization server authorizing access to the resource. The client transmits the token information stored in the secure component to the resource server, and the resource server controls the client's access to the resource based on the verification result of the token information.

本実施の形態のセキュアなコンポーネントは、クライアントが動作するデバイスに実装されるセキュアなコンポーネントであって、認可サーバが、ユーザ認証結果に基づいてリソースに対するアクセスを認可した結果、所定のサーバが発行するトークン情報を前記クライアントから取得して記憶し、前記認可サーバの認可結果に基づいてアクセスが制御されるリソースを有するリソースサーバへ記憶したトークン情報を送信するために、前記記憶したトークン情報を前記クライアントへ出力する。 The secure component of this embodiment is a secure component implemented in a device on which a client operates, and acquires and stores token information issued by a specific server from the client as a result of an authorization server authorizing access to a resource based on a user authentication result, and outputs the stored token information to the client in order to transmit the stored token information to a resource server having a resource whose access is controlled based on the authorization result of the authorization server.

本実施の形態のデバイスは、前述のセキュアなコンポーネントを備え、クライアントが動作する。 The device of this embodiment is equipped with the above-mentioned secure components and runs a client.

本実施の形態の認可に基づくリソースアクセス制御方法は、ユーザ認証結果に基づいてリソースに対するアクセスを認可する認可サーバと、前記認可サーバの認可結果に基づいてアクセスが制御されるリソースを有するリソースサーバと、クライアントが動作するデバイスとを備えるシステムの認可に基づくリソースアクセス制御方法であって、前記デバイスは、前記認可サーバがリソースに対するアクセスを認可した結果、前記クライアントが取得する、所定のサーバが発行するトークン情報をセキュアなコンポーネントに記憶し、前記クライアントは、前記セキュアなコンポーネントに記憶したトークン情報を前記リソースサーバへ送信し、前記リソースサーバは、前記トークン情報の検証結果に基づいて前記クライアントのリソースへのアクセスを制御する。 The resource access control method based on authorization in this embodiment is a resource access control method based on authorization for a system including an authorization server that authorizes access to resources based on a user authentication result, a resource server having resources whose access is controlled based on the authorization result of the authorization server, and a device on which a client operates, in which the device stores token information issued by a specified server and acquired by the client as a result of the authorization server authorizing access to the resource in a secure component, the client transmits the token information stored in the secure component to the resource server, and the resource server controls the client's access to the resource based on the verification result of the token information.

認可サーバは、ユーザ認証結果に基づいてリソースに対するアクセスを認可する。リソースサーバは、認可サーバの認可結果に基づいてアクセスが制御されるリソースを有する。デバイス(IoTデバイスとも称する)は、クライアント(クライアントアプリケーション)が動作する。デバイスは、認可サーバがリソースに対するアクセスを認可した結果、クライアントが取得する、所定のサーバが発行するトークン情報を記憶するセキュアなコンポーネントを備える。 The authorization server authorizes access to resources based on the user authentication result. The resource server has resources whose access is controlled based on the authorization result of the authorization server. The device (also called an IoT device) runs a client (client application). The device has a secure component that stores token information issued by a specific server and obtained by the client as a result of the authorization server authorizing access to the resource.

すなわち、クライアントは、所定のサーバが発行するトークン情報を取得し、取得したトークン情報をデバイス内のセキュアなコンポーネントに記憶する。これにより、デバイスの長期稼働において、所定のサーバ(例えば、トークンサーバ)から取得した有効なトークン情報を保持し続けるリスク(例えば、漏洩等のセキュリティリスク)を低減しつつ、再認証やトークン情報の更新に必要となる通信トラフシックを削減することができる。 That is, the client obtains token information issued by a specific server and stores the obtained token information in a secure component within the device. This reduces the risk (e.g., security risks such as leakage) of continuing to hold valid token information obtained from a specific server (e.g., a token server) during long-term operation of the device, while reducing the communication traffic required for re-authentication and updating of token information.

クライアントは、セキュアなコンポーネントに記憶したトークン情報をリソースサーバへ送信する。リソースサーバは、トークン情報の検証結果に基づいてクライアントのリソースへのアクセスを制御する。すなわち、検証が成功すれば、クライアントはリソースにアクセスすることができる。これにより、発行されたトークン情報を長期間に亘って安全に保護することができる、認可に基づくリソースアクセス制御システムを実現できる。 The client sends the token information stored in the secure component to the resource server. The resource server controls the client's access to resources based on the results of verifying the token information. In other words, if the verification is successful, the client can access the resources. This makes it possible to realize an authorization-based resource access control system that can safely protect issued token information for a long period of time.

本実施の形態の認可に基づくリソースアクセス制御システムにおいて、前記セキュアなコンポーネントは、トラステッド実行環境又はセキュアエレメントである。 In the authorization-based resource access control system of this embodiment, the secure component is a trusted execution environment or a secure element.

本実施の形態のセキュアなコンポーネントは、トラステッド実行環境又はセキュアエレメントである。 The secure component in this embodiment is a trusted execution environment or a secure element.

セキュアなコンポーネントは、トラステッド実行環境又はセキュアエレメントである。トラステッド実行環境は、SoC(System on Chip)上で、例えば、CPU仮想化支援技術(例えば、TrustZone(登録商標))と称される技術を用いることによって、SoC内で区分された領域(いわゆるTEE:Trusted Execution Environment)を指し、通常実行環境(REE:Rich Execution Environmentとも称する)よりもセキュアな領域である。セキュアエレメントは、耐タンパ性を有するセキュリティチップで構成することができる。これにより、発行されたトークン情報を長期間に亘って安全に保護することができる。また、トークン情報を頻繁に更新する必要もなく、トークン情報を無効にするための作業時間を設定する必要もない。 The secure component is a trusted execution environment or a secure element. The trusted execution environment refers to an area (so-called TEE: Trusted Execution Environment) divided within a SoC (System on Chip) by using, for example, a technology called CPU virtualization support technology (for example, TrustZone (registered trademark)) on the SoC, and is a more secure area than the normal execution environment (also called REE: Rich Execution Environment). The secure element can be composed of a security chip with tamper resistance. This allows the issued token information to be safely protected for a long period of time. In addition, there is no need to frequently update the token information, nor is there a need to set an operation time for invalidating the token information.

本実施の形態の認可に基づくリソースアクセス制御システムにおいて、前記セキュアなコンポーネントは、前記クライアントが取得したトークン情報の正当性を検証するトークン検証機能を備え、検証が成功した場合、前記トークン情報を記憶する。 In the authorization-based resource access control system of this embodiment, the secure component has a token verification function that verifies the validity of the token information acquired by the client, and stores the token information if the verification is successful.

本実施の形態のセキュアなコンポーネントは、前記クライアントから取得したトークン情報の正当性を検証するトークン検証機能を備え、検証が成功した場合、前記トークン情報を記憶する。 The secure component of this embodiment has a token verification function that verifies the validity of the token information obtained from the client, and if the verification is successful, stores the token information.

セキュアなコンポーネントは、クライアントが取得したトークン情報の正当性を検証し、検証が成功した場合、トークン情報を記憶する。すなわち、セキュアなコンポーネントがトークン情報を記憶する際、トークン情報の正当性を確認する。これにより、不正なトークン情報の挿入によるトークン情報の置き換え攻撃などのトークン情報の改ざん等を防止することができる。 The secure component verifies the validity of the token information acquired by the client, and if the verification is successful, stores the token information. In other words, when the secure component stores the token information, it checks the validity of the token information. This makes it possible to prevent tampering with the token information, such as a token information replacement attack by inserting unauthorized token information.

本実施の形態の認可に基づくリソースアクセス制御システムにおいて、前記セキュアなコンポーネントは、内部に保有する情報及び記憶したトークン情報を用いて新たなトークン情報を生成するトークン生成機能を備え、前記クライアントは、前記新たなトークン情報を前記リソースサーバへ送信し、前記リソースサーバは、前記新たなトークン情報の検証結果に基づいて前記クライアントのリソースへのアクセスを制御する。 In the authorization-based resource access control system of this embodiment, the secure component has a token generation function that generates new token information using information held internally and stored token information, the client transmits the new token information to the resource server, and the resource server controls the client's access to resources based on the verification results of the new token information.

本実施の形態のセキュアなコンポーネントは、内部に保有する情報及び記憶したトークン情報を用いて新たなトークン情報を生成するトークン生成機能を備え、前記新たなトークン情報を前記リソースサーバへ送信するために、前記新たなトークン情報を前記クライアントへ出力する。 The secure component of this embodiment has a token generation function that generates new token information using internally held information and stored token information, and outputs the new token information to the client in order to send the new token information to the resource server.

セキュアなコンポーネントは、内部に保有する情報及び記憶したトークン情報を用いて新たなトークン情報を生成する。内部に保有する情報は、新たなトークン情報を生成するための秘匿情報であれば、例えば、固有のID、トークン情報生成回数を記録するカウンタ値や乱数要素など、どのような情報を用いてもよい。 The secure component generates new token information using information held internally and stored token information. The information held internally may be any confidential information for generating new token information, such as a unique ID, a counter value that records the number of times token information has been generated, or a random number element.

クライアントは、新たなトークン情報をリソースサーバへ送信する。リソースサーバは、新たなトークン情報の検証結果に基づいてクライアントのリソースへのアクセスを制御する。すなわち、検証が成功すれば、クライアントはリソースにアクセスすることができる。このように、クライアント側でトークン情報を動的に生成し、リソースサーバで当該トークン情報を検証することにより、トークン情報の再利用(トークン情報を用いたリプレイアタック)やなりすまし等を防止できる。 The client sends new token information to the resource server. The resource server controls the client's access to resources based on the results of verifying the new token information. In other words, if the verification is successful, the client can access the resources. In this way, by dynamically generating token information on the client side and verifying that token information on the resource server, it is possible to prevent the reuse of token information (replay attacks using token information) and spoofing.

本実施の形態の認可に基づくリソースアクセス制御システムにおいて、前記セキュアなコンポーネントは、内部に保有する鍵を用いて改ざん検知コードを生成する検知コード生成機能を備え、前記クライアントは、前記新たなトークン情報に前記改ざん検知コードを付加して前記リソースサーバへ送信し、前記リソースサーバは、前記改ざん検知コードの検証結果に基づいて前記クライアントのリソースへのアクセスを制御する。 In the authorization-based resource access control system of this embodiment, the secure component has a detection code generation function that generates a tamper detection code using a key held internally, the client adds the tamper detection code to the new token information and transmits it to the resource server, and the resource server controls the client's access to resources based on the verification result of the tamper detection code.

本実施の形態のセキュアなコンポーネントは、内部に保有する鍵を用いて改ざん検知コードを生成する検知コード生成機能を備え、前記改ざん検知コードを付加した前記新たなトークン情報を前記リソースサーバへ送信するために、前記改ざん検知コードを付加した前記新たなトークン情報を前記クライアントへ出力する。 The secure component of this embodiment has a detection code generation function that generates a tamper detection code using an internally held key, and outputs the new token information with the tamper detection code added to the client in order to transmit the new token information with the tamper detection code added to the resource server.

セキュアなコンポーネントは、内部に保有する鍵を用いて改ざん検知コードを生成する。クライアントは、新たなトークン情報に改ざん検知コードを付加してリソースサーバへ送信する。リソースサーバは、改ざん検知コードの検証結果に基づいてクライアントのリソースへのアクセスを制御する。すなわち、検証が成功すれば、クライアントはリソースにアクセスすることができる。 The secure component generates a tamper detection code using a key held internally. The client adds the tamper detection code to the new token information and sends it to the resource server. The resource server controls the client's access to resources based on the results of verifying the tamper detection code. In other words, if the verification is successful, the client can access the resource.

改ざん検知コードの付与を行うことにより、セキュアなコンポーネントの内部に保有する鍵(秘密鍵)を知らない攻撃者は改ざん検知コードを計算することができず、トークン情報の検証側で改ざん検知コードの検証を行うことができない。これにより、トークン情報の偽造や改ざんを防止できる。 By assigning a tamper detection code, an attacker who does not know the key (private key) held inside the secure component cannot calculate the tamper detection code, and the token information verification side cannot verify the tamper detection code. This makes it possible to prevent forgery or tampering of token information.

本実施の形態の認可に基づくリソースアクセス制御システムにおいて、前記セキュアなコンポーネントは、内部に保有する暗号化鍵を用いて前記新たなトークン情報を暗号化するトークン暗号化機能を備え、前記クライアントは、暗号化されたトークン情報を前記リソースサーバへ送信し、前記リソースサーバは、前記暗号化されたトークン情報を復号して得られた前記新たなトークン情報の検証結果に基づいて前記クライアントのリソースへのアクセスを制御する。 In the authorization-based resource access control system of this embodiment, the secure component has a token encryption function that encrypts the new token information using an encryption key stored internally, the client transmits the encrypted token information to the resource server, and the resource server controls the client's access to resources based on the verification result of the new token information obtained by decrypting the encrypted token information.

本実施の形態のセキュアなコンポーネントは、内部に保有する暗号化鍵を用いて前記新たなトークン情報を暗号化するトークン暗号化機能を備え、暗号化されたトークン情報を前記リソースサーバへ送信するために、前記暗号化されたトークン情報を前記クライアントへ出力する。 The secure component of this embodiment has a token encryption function that encrypts the new token information using an encryption key stored internally, and outputs the encrypted token information to the client in order to send the encrypted token information to the resource server.

セキュアなコンポーネントは、内部に保有する暗号化鍵を用いて新たなトークン情報を暗号化する。クライアントは、暗号化されたトークン情報をリソースサーバへ送信する。リソースサーバは、暗号化されたトークン情報を復号して得られた新たなトークン情報の検証結果に基づいてクライアントのリソースへのアクセスを制御する。すなわち、セキュアなコンポーネントとリソースサーバとが対向する鍵を保持し、動的に生成されたトークン情報に暗号化技術を適用して保護する。 The secure component encrypts the new token information using an encryption key stored internally. The client sends the encrypted token information to the resource server. The resource server controls the client's access to resources based on the verification results of the new token information obtained by decrypting the encrypted token information. In other words, the secure component and the resource server hold opposing keys, and dynamically generated token information is protected by applying encryption technology.

トークン情報は、暗号化されているため、偽造や解読が困難であり、トークン情報の構造を攻撃者に把握されるリスクを無くし、トークン情報の改ざんによるリソースの不正使用を防止できる。 Since the token information is encrypted, it is difficult to forge or decrypt, eliminating the risk of an attacker understanding the structure of the token information and preventing unauthorized use of resources by tampering with the token information.

本実施の形態の認可に基づくリソースアクセス制御システムにおいて、前記セキュアなコンポーネントは、前記クライアントを認証するクライアント認証機能を備え、前記クライアントの認証結果に応じて、前記クライアントとの間での前記トークン情報の授受の可否を決定する。 In the authorization-based resource access control system of this embodiment, the secure component has a client authentication function that authenticates the client, and determines whether or not to exchange the token information with the client depending on the authentication result of the client.

本実施の形態のセキュアなコンポーネントは、前記クライアントを認証するクライアント認証機能を備え、前記クライアントの認証結果に応じて、前記クライアントとの間での前記トークン情報の授受の可否を決定する。 The secure component of this embodiment has a client authentication function that authenticates the client, and determines whether or not to exchange the token information with the client depending on the authentication result of the client.

セキュアなコンポーネントは、クライアントを認証し、クライアントの認証結果に応じて、クライアントとの間でのトークン情報の授受の可否を決定する。すなわち、クライアントが、トークン情報をセキュアなコンポーネントに記憶する場合、あるいは、クライアントが、セキュアなコンポーネントからトークン情報を取り出す場合、セキュアなコンポーネントは、要求元のクライアント(アプリ)を認証する。これにより、不正なアプリによって、トークン情報の不正な設定や搾取を防止できる。 The secure component authenticates the client and, depending on the result of the client authentication, determines whether or not to exchange token information with the client. That is, when a client stores token information in the secure component, or when a client retrieves token information from the secure component, the secure component authenticates the requesting client (application). This makes it possible to prevent unauthorized applications from unauthorized setting or exploiting token information.

本実施の形態の認可に基づくリソースアクセス制御システムにおいて、前記セキュアなコンポーネントは、外部のサーバとの間で秘匿通信路を開設する開設機能を備え、前記セキュアなコンポーネントの内部機能、及び前記セキュアなコンポーネントが内部に保有する情報又は鍵の少なくとも一部が前記外部のサーバから更新可能である。 In the authorization-based resource access control system of this embodiment, the secure component has an opening function for opening a secret communication path with an external server, and at least a portion of the internal functions of the secure component and the information or keys held internally by the secure component can be updated from the external server.

本実施の形態のセキュアなコンポーネントは、外部のサーバとの間で秘匿通信路を開設する開設機能を備え、前記セキュアなコンポーネントの内部機能、及び前記セキュアなコンポーネントが内部に保有する情報又は鍵の少なくとも一部が前記外部のサーバから更新可能である。 The secure component of this embodiment has an opening function for opening a secret communication path with an external server, and at least a portion of the internal functions of the secure component and the information or keys held internally by the secure component can be updated from the external server.

セキュアなコンポーネントは、外部のサーバとの間で秘匿通信路を開設する開設機能を備える。セキュアなコンポーネントの内部機能、及びセキュアなコンポーネントが内部に保有する情報又は鍵の少なくとも一部が外部のサーバから更新可能である。すなわち、セキュアなコンポーネントが開設した秘匿通信路経由でセキュアなコンポーネントの内部状態を変更することができる。これにより、セキュアなコンポーネントのトークン情報に関する機能又は状態を遠隔で更新することができ、デバイスのセキュリティを維持することができる。 The secure component has an opening function for opening a secret communication path between the secure component and an external server. At least a portion of the internal functions of the secure component and the information or keys held internally by the secure component can be updated from an external server. In other words, the internal state of the secure component can be changed via the secret communication path opened by the secure component. This allows the functions or state related to the token information of the secure component to be updated remotely, thereby maintaining the security of the device.

10 ブラウザ
20 クライアントアプリ
21 クライアントアプリ証明書
50 セキュアなコンポーネント
51 SE(TEE)ID
52 カウンタ
53 トークン
60 トークン生成機能
61 トークン署名検証機能
62 トークン暗号化機能
63 トークンMAC付与機能
64 クライアント検証機能
65 秘匿通信路開設機能
71 トークン署名検証鍵(公開鍵)
72 トークン暗号化鍵
73 トークンMAC鍵
74 クライアント検証鍵(公開鍵)
100 IoTデバイス
200 認可サーバ
201 認可コード
300 リソースサーバ
301 リソース
400 トークンサーバ
401 SE(TEE)ID
402 カウンタ
403 トークン
410 トークン正当性確認機能
411 トークン署名生成機能
412 トークン復号機能
413 トークンMAC検証機能
420 トークン署名生成鍵(秘密鍵)
421 トークン復号鍵
422 トークンMAC検証鍵
500 セキュアなコンポーネント管理サーバ
10 Browser 20 Client application 21 Client application certificate 50 Secure component 51 SE (TEE) ID
52 Counter 53 Token 60 Token generation function 61 Token signature verification function 62 Token encryption function 63 Token MAC assignment function 64 Client verification function 65 Secret communication path opening function 71 Token signature verification key (public key)
72 Token encryption key 73 Token MAC key 74 Client verification key (public key)
100 IoT device 200 Authorization server 201 Authorization code 300 Resource server 301 Resource 400 Token server 401 SE (TEE) ID
402 Counter 403 Token 410 Token validity confirmation function 411 Token signature generation function 412 Token decryption function 413 Token MAC verification function 420 Token signature generation key (secret key)
421 Token decryption key 422 Token MAC verification key 500 Secure component management server

Claims (18)

ユーザ認証結果に基づいてリソースに対するアクセスを認可する認可サーバと、
前記認可サーバの認可結果に基づいてアクセスが制御されるリソースを有するリソースサーバと、
クライアントが動作するデバイスと
を備え、
前記デバイスは、
前記認可サーバがリソースに対するアクセスを認可した結果、前記クライアントが取得する、所定のサーバが発行するトークン情報を記憶するセキュアなコンポーネントを備え、
前記クライアントは、
前記セキュアなコンポーネントに記憶したトークン情報を前記リソースサーバへ送信し、
前記リソースサーバは、
前記所定のサーバが発行したトークン情報の正当性を検証し、前記トークン情報の検証結果に基づいて前記クライアントのリソースへのアクセスを制御し、
前記セキュアなコンポーネントは、
前記クライアントが取得したトークン情報の正当性を検証するトークン検証機能を備え、
検証が成功した場合、前記トークン情報を記憶する、
認可に基づくリソースアクセス制御システム。
an authorization server that authorizes access to resources based on a user authentication result;
a resource server having a resource whose access is controlled based on an authorization result of the authorization server;
A device on which a client runs;
The device comprises:
a secure component that stores token information issued by a predetermined server and acquired by the client as a result of the authorization server authorizing access to a resource;
The client:
Sending the token information stored in the secure component to the resource server;
The resource server comprises:
Verifying the validity of token information issued by the predetermined server, and controlling access to resources of the client based on a result of the verification of the token information ;
The secure component comprises:
A token verification function is provided for verifying the validity of the token information acquired by the client,
If the verification is successful, store the token information.
An authorization-based resource access control system.
ユーザ認証結果に基づいてリソースに対するアクセスを認可する認可サーバと、an authorization server that authorizes access to resources based on a user authentication result;
前記認可サーバの認可結果に基づいてアクセスが制御されるリソースを有するリソースサーバと、a resource server having a resource whose access is controlled based on an authorization result of the authorization server;
クライアントが動作するデバイスとThe device on which the client runs
を備え、Equipped with
前記デバイスは、The device comprises:
前記認可サーバがリソースに対するアクセスを認可した結果、前記クライアントが取得する、所定のサーバが発行するトークン情報を記憶するセキュアなコンポーネントを備え、a secure component that stores token information issued by a predetermined server and acquired by the client as a result of the authorization server authorizing access to a resource;
前記クライアントは、The client:
前記セキュアなコンポーネントに記憶したトークン情報を前記リソースサーバへ送信し、Sending the token information stored in the secure component to the resource server;
前記リソースサーバは、The resource server comprises:
前記所定のサーバが発行したトークン情報の正当性を検証し、前記トークン情報の検証結果に基づいて前記クライアントのリソースへのアクセスを制御し、Verifying the validity of token information issued by the predetermined server, and controlling access to resources of the client based on a result of the verification of the token information;
前記セキュアなコンポーネントは、The secure component comprises:
前記クライアントを認証するクライアント認証機能を備え、A client authentication function for authenticating the client is provided,
前記クライアントの認証結果に応じて、前記クライアントとの間での前記トークン情報の授受の可否を決定する、determining whether or not to exchange the token information with the client depending on the authentication result of the client;
認可に基づくリソースアクセス制御システム。An authorization-based resource access control system.
前記セキュアなコンポーネントは、
トラステッド実行環境又はセキュアエレメントである、
請求項1又は請求項2に記載の認可に基づくリソースアクセス制御システム。
The secure component comprises:
A trusted execution environment or secure element,
3. The authorization-based resource access control system according to claim 1 or 2 .
前記セキュアなコンポーネントは、
前記クライアントが取得したトークン情報の正当性を検証するトークン検証機能を備え、
検証が成功した場合、前記トークン情報を記憶する、
求項2に記載の認可に基づくリソースアクセス制御システム。
The secure component comprises:
A token verification function is provided for verifying the validity of the token information acquired by the client,
If the verification is successful, store the token information.
The authorization-based resource access control system according to claim 2.
前記セキュアなコンポーネントは、
内部に保有する情報及び記憶したトークン情報を用いて新たなトークン情報を生成するトークン生成機能を備え、
前記クライアントは、
前記新たなトークン情報を前記リソースサーバへ送信し、
前記リソースサーバは、
前記新たなトークン情報の検証結果に基づいて前記クライアントのリソースへのアクセスを制御する、
請求項1から請求項のいずれか一項に記載の認可に基づくリソースアクセス制御システム。
The secure component comprises:
A token generation function is provided for generating new token information using internally held information and stored token information,
The client:
Sending the new token information to the resource server;
The resource server,
and controlling access to resources of the client based on a result of verifying the new token information.
The authorization-based resource access control system according to any one of claims 1 to 4 .
前記セキュアなコンポーネントは、
内部に保有する鍵を用いて改ざん検知コードを生成する検知コード生成機能を備え、
前記クライアントは、
前記新たなトークン情報に前記改ざん検知コードを付加して前記リソースサーバへ送信し、
前記リソースサーバは、
前記改ざん検知コードの検証結果に基づいて前記クライアントのリソースへのアクセスを制御する、
請求項に記載の認可に基づくリソースアクセス制御システム。
The secure component comprises:
Equipped with a detection code generation function that generates a tamper detection code using an internally held key,
The client:
Adding the tamper detection code to the new token information and transmitting the new token information to the resource server;
The resource server comprises:
controlling access to resources of the client based on a verification result of the tamper detection code;
The authorization-based resource access control system according to claim 5 .
前記セキュアなコンポーネントは、
内部に保有する暗号化鍵を用いて前記新たなトークン情報を暗号化するトークン暗号化機能を備え、
前記クライアントは、
暗号化されたトークン情報を前記リソースサーバへ送信し、
前記リソースサーバは、
前記暗号化されたトークン情報を復号して得られた前記新たなトークン情報の検証結果に基づいて前記クライアントのリソースへのアクセスを制御する、
請求項に記載の認可に基づくリソースアクセス制御システム。
The secure component comprises:
a token encryption function for encrypting the new token information using an encryption key stored therein;
The client:
Sending the encrypted token information to the resource server;
The resource server comprises:
and controlling access to resources of the client based on a verification result of the new token information obtained by decrypting the encrypted token information.
The authorization-based resource access control system according to claim 5 .
前記セキュアなコンポーネントは、
前記クライアントを認証するクライアント認証機能を備え、
前記クライアントの認証結果に応じて、前記クライアントとの間での前記トークン情報の授受の可否を決定する、
請求項1に記載の認可に基づくリソースアクセス制御システム。
The secure component comprises:
A client authentication function for authenticating the client is provided,
determining whether or not to exchange the token information with the client depending on the authentication result of the client;
The authorization-based resource access control system according to claim 1 .
前記セキュアなコンポーネントは、
外部のサーバとの間で秘匿通信路を開設する開設機能を備え、
前記セキュアなコンポーネントの内部機能、及び前記セキュアなコンポーネントが内部に保有する情報又は鍵の少なくとも一部が前記外部のサーバから更新可能である、
請求項1から請求項のいずれか一項に記載の認可に基づくリソースアクセス制御システム。
The secure component comprises:
Equipped with a function to open a secret communication channel with an external server,
At least a part of the internal functions of the secure component and the information or keys held internally by the secure component can be updated from the external server;
The authorization-based resource access control system according to any one of claims 1 to 8 .
クライアントが動作するデバイスに実装されるセキュアなコンポーネントであって、
認可サーバが、ユーザ認証結果に基づいてリソースに対するアクセスを認可した結果、所定のサーバが発行するトークン情報を前記クライアントから取得して記憶し、
前記認可サーバの認可結果に基づいてアクセスが制御されるリソースを有し、前記所定のサーバが発行したトークン情報の正当性を検証し、前記トークン情報の検証結果に基づいて前記クライアントのリソースへのアクセスを制御するリソースサーバへ記憶したトークン情報を送信するために、前記記憶したトークン情報を前記クライアントへ出力
前記クライアントから取得したトークン情報の正当性を検証するトークン検証機能を備え、
検証が成功した場合、前記トークン情報を記憶する、
セキュアなコンポーネント。
A secure component implemented on a device on which a client operates, comprising:
an authorization server obtains token information issued by a predetermined server as a result of authorizing access to a resource based on a user authentication result from the client and stores the token information;
outputting the stored token information to the client in order to transmit the stored token information to a resource server that has a resource to which access is controlled based on the authorization result of the authorization server, verifies the validity of token information issued by the predetermined server, and controls access to the resource of the client based on the verification result of the token information;
A token verification function is provided for verifying the validity of token information acquired from the client,
If the verification is successful, store the token information .
Secure components.
前記セキュアなコンポーネントは、
トラステッド実行環境又はセキュアエレメントである、
請求項10に記載のセキュアなコンポーネント。
The secure component comprises:
A trusted execution environment or secure element,
The secure component of claim 10 .
内部に保有する情報及び記憶したトークン情報を用いて新たなトークン情報を生成するトークン生成機能を備え、
前記新たなトークン情報を前記リソースサーバへ送信するために、前記新たなトークン情報を前記クライアントへ出力する、
請求項10又は請求項11に記載のセキュアなコンポーネント。
A token generation function is provided for generating new token information using internally held information and stored token information,
outputting the new token information to the client for transmission to the resource server;
A secure component according to claim 10 or claim 11.
内部に保有する鍵を用いて改ざん検知コードを生成する検知コード生成機能を備え、
前記改ざん検知コードを付加した前記新たなトークン情報を前記リソースサーバへ送信するために、前記改ざん検知コードを付加した前記新たなトークン情報を前記クライアントへ出力する、
請求項12に記載のセキュアなコンポーネント。
Equipped with a detection code generation function that generates a tamper detection code using an internally held key,
outputting the new token information to which the tampering detection code has been added to the client in order to transmit the new token information to which the tampering detection code has been added to the resource server;
The secure component of claim 12.
内部に保有する暗号化鍵を用いて前記新たなトークン情報を暗号化するトークン暗号化機能を備え、
暗号化されたトークン情報を前記リソースサーバへ送信するために、前記暗号化されたトークン情報を前記クライアントへ出力する、
請求項12に記載のセキュアなコンポーネント。
a token encryption function for encrypting the new token information using an encryption key stored therein;
outputting the encrypted token information to the client for transmission to the resource server;
The secure component of claim 12.
前記クライアントを認証するクライアント認証機能を備え、
前記クライアントの認証結果に応じて、前記クライアントとの間での前記トークン情報の授受の可否を決定する、
請求項10から請求項14のいずれか一項に記載のセキュアなコンポーネント。
A client authentication function for authenticating the client is provided,
determining whether or not to exchange the token information with the client depending on the authentication result of the client;
A secure component according to any one of claims 10 to 14.
外部のサーバとの間で秘匿通信路を開設する開設機能を備え、
前記セキュアなコンポーネントの内部機能、及び前記セキュアなコンポーネントが内部に保有する情報又は鍵の少なくとも一部が前記外部のサーバから更新可能である、
請求項10から請求項15のいずれか一項に記載のセキュアなコンポーネント。
Equipped with a function to open a secret communication channel with an external server,
At least a part of the internal functions of the secure component and the information or keys held internally by the secure component can be updated from the external server;
A secure component according to any one of claims 10 to 15.
請求項10から請求項16のいずれか一項に記載のセキュアなコンポーネントを備え、クライアントが動作する、
デバイス。
A client operates comprising a secure component according to any one of claims 10 to 16.
device.
ユーザ認証結果に基づいてリソースに対するアクセスを認可する認可サーバと、
前記認可サーバの認可結果に基づいてアクセスが制御されるリソースを有するリソースサーバと、
クライアントが動作するデバイスと
を備えるシステムの認可に基づくリソースアクセス制御方法であって、
前記デバイスは、
前記認可サーバがリソースに対するアクセスを認可した結果、前記クライアントが取得する、所定のサーバが発行するトークン情報をセキュアなコンポーネントに記憶し、
前記セキュアなコンポーネントは、
前記クライアントが取得したトークン情報の正当性を検証し、
検証が成功した場合、前記トークン情報を記憶し、
前記クライアントは、
前記セキュアなコンポーネントに記憶したトークン情報を前記リソースサーバへ送信し、
前記リソースサーバは、
前記所定のサーバが発行したトークン情報の正当性を検証し、前記トークン情報の検証結果に基づいて前記クライアントのリソースへのアクセスを制御する、
認可に基づくリソースアクセス制御方法。
an authorization server that authorizes access to resources based on a user authentication result;
a resource server having a resource whose access is controlled based on an authorization result of the authorization server;
A method for controlling resource access based on authorization in a system comprising:
The device comprises:
storing token information issued by a predetermined server, which is acquired by the client as a result of the authorization server authorizing access to a resource, in a secure component;
The secure component comprises:
Verifying the validity of the token information acquired by the client;
If the verification is successful, storing the token information;
The client:
Sending the token information stored in the secure component to the resource server;
The resource server,
verifying the validity of token information issued by the predetermined server, and controlling access to resources of the client based on a result of verifying the token information;
A method for controlling resource access based on authorization.
JP2020072994A 2020-04-15 2020-04-15 Authorization-based resource access control system, secure component, device, and authorization-based resource access control method Active JP7559344B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020072994A JP7559344B2 (en) 2020-04-15 2020-04-15 Authorization-based resource access control system, secure component, device, and authorization-based resource access control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020072994A JP7559344B2 (en) 2020-04-15 2020-04-15 Authorization-based resource access control system, secure component, device, and authorization-based resource access control method

Publications (2)

Publication Number Publication Date
JP2021170228A JP2021170228A (en) 2021-10-28
JP7559344B2 true JP7559344B2 (en) 2024-10-02

Family

ID=78150095

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020072994A Active JP7559344B2 (en) 2020-04-15 2020-04-15 Authorization-based resource access control system, secure component, device, and authorization-based resource access control method

Country Status (1)

Country Link
JP (1) JP7559344B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117331964B (en) * 2023-12-01 2024-02-27 成都明途科技有限公司 Data query method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015530802A (en) 2012-08-14 2015-10-15 クアルコム,インコーポレイテッド Method, system and device for dynamic HPLMN configuration
JP2017503289A (en) 2014-10-31 2017-01-26 小米科技有限責任公司Xiaomi Inc. Terminal verification method, apparatus, program, and recording medium
JP2017157984A (en) 2016-02-29 2017-09-07 Kddi株式会社 COMMUNICATION SYSTEM, HARDWARE SECURITY MODULE, TERMINAL DEVICE, COMMUNICATION METHOD, AND PROGRAM
JP2017537421A (en) 2014-11-17 2017-12-14 オベルトゥル テクノロジOberthur Technologies How to secure payment tokens
WO2020009659A1 (en) 2018-07-02 2020-01-09 Soracom, Inc. Updating a subscriber identity module
WO2020055574A1 (en) 2018-09-13 2020-03-19 Qualcomm Incorporated Extensible authentication protocol (eap) implementation in new radio (nr)

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015530802A (en) 2012-08-14 2015-10-15 クアルコム,インコーポレイテッド Method, system and device for dynamic HPLMN configuration
JP2017503289A (en) 2014-10-31 2017-01-26 小米科技有限責任公司Xiaomi Inc. Terminal verification method, apparatus, program, and recording medium
JP2017537421A (en) 2014-11-17 2017-12-14 オベルトゥル テクノロジOberthur Technologies How to secure payment tokens
JP2017157984A (en) 2016-02-29 2017-09-07 Kddi株式会社 COMMUNICATION SYSTEM, HARDWARE SECURITY MODULE, TERMINAL DEVICE, COMMUNICATION METHOD, AND PROGRAM
WO2020009659A1 (en) 2018-07-02 2020-01-09 Soracom, Inc. Updating a subscriber identity module
WO2020055574A1 (en) 2018-09-13 2020-03-19 Qualcomm Incorporated Extensible authentication protocol (eap) implementation in new radio (nr)

Also Published As

Publication number Publication date
JP2021170228A (en) 2021-10-28

Similar Documents

Publication Publication Date Title
US12143476B2 (en) Method of data transfer, a method of controlling use of data and cryptographic device
US10193697B1 (en) Systems and methods for providing authentication to a plurality of devices
US8214884B2 (en) Computer-based dynamic secure non-cached delivery of security credentials such as digitally signed certificates or keys
EP2115654B1 (en) Simplified management of authentication credentials for unattended applications
US7155616B1 (en) Computer network comprising network authentication facilities implemented in a disk drive
US10554393B2 (en) Universal secure messaging for cryptographic modules
US20080077592A1 (en) method and apparatus for device authentication
US20060195689A1 (en) Authenticated and confidential communication between software components executing in un-trusted environments
CN116490868A (en) System and method for secure and fast machine learning reasoning in trusted execution environments
JP2009541817A (en) Single sign-on between systems
CN113614720A (en) Apparatus and method for dynamically configuring access control of trusted applications
JP7586355B2 (en) Cryptographic communication system, secure element, device, and cryptographic communication method
CN115277168A (en) Method, device and system for accessing server
CN111224784B (en) Role separation distributed authentication and authorization method based on hardware trusted root
KR20180087543A (en) Key management method and fido authenticator software authenticator
CN118337430A (en) System, method, device, processor and storage medium for realizing trusted transmission and reverse authorization processing for multiparty interaction data
Heilman et al. Openpubkey: Augmenting openid connect with user held signing keys
JP7559344B2 (en) Authorization-based resource access control system, secure component, device, and authorization-based resource access control method
JP4499575B2 (en) Network security method and network security system
US12034716B2 (en) Exclusive self-escrow method and apparatus
JP2004070875A (en) Secure system
US20240012933A1 (en) Integration of identity access management infrastructure with zero-knowledge services
TWI725623B (en) Point-to-point authority management method based on manager's self-issued tickets
JP4279607B2 (en) USAGE AUTHENTICATION METHOD, USE LICENSE ISSUING DEVICE, USE AUTHENTICATION AUTHENTICATION SYSTEM, USE LICENSE ISSUING PROGRAM AND RECORDING MEDIUM
CN119383406B (en) Control method and system for LED display screen with protection function

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230221

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20231011

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20231017

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20231212

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20240227

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240515

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20240527

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20240820

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240902

R150 Certificate of patent or registration of utility model

Ref document number: 7559344

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150