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 PDFInfo
- 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
Links
- 238000013475 authorization Methods 0.000 title claims description 231
- 238000000034 method Methods 0.000 title claims description 40
- 230000006870 function Effects 0.000 claims description 97
- 238000012795 verification Methods 0.000 claims description 82
- 238000004891 communication Methods 0.000 claims description 40
- 238000001514 detection method Methods 0.000 claims description 30
- 230000005540 biological transmission Effects 0.000 claims 2
- 230000008569 process Effects 0.000 description 23
- 238000010586 diagram Methods 0.000 description 16
- 238000004422 calculation algorithm Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 7
- 238000012790 confirmation Methods 0.000 description 6
- 238000012546 transfer Methods 0.000 description 5
- 238000012545 processing Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 230000010354 integration Effects 0.000 description 3
- 230000007774 longterm Effects 0.000 description 3
- 230000004044 response Effects 0.000 description 2
- 238000003339 best practice Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000001010 compromised effect Effects 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
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).
しかし、特許文献1のようなシステムでは、クライアント端末上にアクセストークンを保持するため、アクセストークン漏洩に基づくセキュリティリスクが存在する。すなわち、Webサービスと異なり、IoTデバイス上のアプリケーションだけでOAuth2.0を利用する場合、IoTデバイス上にアクセストークンを保持せざるを得なくなるが、万一漏洩した場合、第三者に不正なリソースへのアクセスを許すおそれがある。また、IoTシステムは、長期間に亘って稼動するという特性上、一度ログインしたら継続してログインを続けることが多く、アクセストークンを無効にするための作業時間を設定することが難しい。また、頻繁なアクセストークンの更新は、IoTシステムが苦手とする通信トラフィックの増加や集中を招く。
However, in a system such as that described in
本発明は、斯かる事情に鑑みてなされたものであり、発行されたアクセストークンを長期間にわたって安全に保護することができる認可に基づくリソースアクセス制御システム、セキュアなコンポーネント、デバイス及び認可に基づくリソースアクセス制御方法を提供することを目的とする。 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は本実施の形態の認可に基づくリソースアクセス制御システムの構成の一例を示す模式図である。認可に基づくリソースアクセス制御システムは、デバイスとしての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デバイス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
デバイス管理者は、IoTデバイス100の管理者であり、IoTデバイス100に対するアクセス権を持つと同時に、リソースを提供する事業者に対してユーザ登録を行っており、リソースを提供する事業者に対する認証を行う主体(ユーザ)である(Resource Ownerに相当する)。デバイス管理者は、IoTデバイス100でクライアントアプリ20を実行することで、所望の機能を実現することを期待しているユーザである。認可サーバ200上でユーザ登録がされている。
The device administrator is the administrator of the
認可サーバ200は、個々のユーザを認証した上で、当該ユーザの許可に基づき、リソースサーバ300が有するリソース301へのアクセスを認可するためのサーバである。認可サーバ200は、認可コード201を保持する。認可コード201は、デバイス管理者による認証、認可が行われた場合に動的に生成されるコードであり、基本的には1回限りの使い捨てのコードとすることができる。ここで、「認証」とは、あるユーザが特定のユーザであることを識別することであり、本実施の形態では、ユーザ名とパスワードで認証を行うこととしているが、認証方法は、これに限定されるものではない。また、「認可」は、認証を行ったユーザに対してアクセスなどの権限を付与することである。
The
リソースサーバ300は、リソース301を保持するサーバである。リソース301は、クライアントアプリ20がアクセスを必要とするリソースであり、例えば、ファイル等のデータ、あるいは、データ以外として、例えば、API(例えば、ディープラーニング用APIなど)実行などの機能も含む。
The
トークンサーバ400は、認可サーバ200の認可に基づき、トークン(アクセストークンとも称する)を発行するためのサーバである。なお、本明細書では、トークン情報は、トークンを意味するが、トークンに関連する情報やトークンに付随する情報を含めてもよい。トークンサーバ400の詳細は後述する。
The
セキュアなコンポーネント管理サーバ500は、セキュアなコンポーネント50の遠隔管理を目的とすることができる。セキュアなコンポーネント管理サーバ500は、IoTデバイス100内のセキュアなコンポーネント50と通信(例えば、秘匿通信路経由の通信)を行い、セキュアなコンポーネント50内部の機能や状態を更新することができる。
The secure
図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
IoTデバイス100は、セキュアなコンポーネント50の他に、クライアントアプリ20、クライアントアプリ証明書21、ブラウザ10を備える。
In addition to the
クライアントアプリ20は、リソースを提供する事業者の認可を経て、リソースにアクセスすることで機能を実現するアプリケーションである。クライアントアプリ20は、リソースを提供する事業者とは別の主体(ベンダー等)によって開発されたアプリケーションである。
The
クライアントアプリ証明書21は、クライアントアプリ20に対するコードサイニング証明書である。コードサイニング証明書は、クライアントアプリ20にデジタル署名(例えば、クライアントアプリ20のハッシュ値に対して秘密鍵署名が施されている)を行う電子署名用の証明書であり、クライアントアプリ20の配布元を認証し、なりすましや内容の改ざんなどがされていないことを保証できる。
The
ブラウザ10は、Webブラウザであり、クライアントアプリ20とは別のアプリケーションとして与えられる。
The
セキュアなコンポーネント50は、IoTデバイス100内に存在する、通常のプログラム実行環境とは論理的又は物理的に隔離された、ストレージ(メモリ)を持つセキュアな実行環境である。本実施の形態では、セキュアなコンポーネント50は、主にセキュアエレメント(SEとも称する)を想定する。セキュアエレメントは、耐タンパ性を有するセキュリティチップで構成することができる。これにより、後述のように、発行されたトークン情報を長期間に亘って安全に保護することができる。また、トークン情報を頻繁に更新する必要もなく、トークン情報を無効にするための作業時間を設定する必要もない。
The
セキュアなコンポーネント50は、トラステッド実行環境(TEEとも称する)でもよい。トラステッド実行環境は、SoC(System on Chip)上で、例えば、CPU仮想化支援技術(例えば、TrustZone(登録商標))と称される技術を用いることによって、SoC内で区分された領域(いわゆるTEE:Trusted Execution Environment)を指し、通常実行環境(REE:Rich Execution Environmentとも称する)よりもセキュアな領域である。
The
クライアントアプリ20とセキュアなコンポーネント50との間の通信路は、セキュアなコンポーネント50の種類によって異なる。クライアントアプリ20とセキュアエレメントとの間の通信は、例えば、ISO7816/SPI/I2C等のシリアル通信路を用いることができ、クライアントアプリ20とTEEとの間の通信は、例えば、APII/Fを介して行うことができる。
The communication path between the
セキュアなコンポーネント50は、SE(TEE)ID51、カウンタ52、トークン53、トークン生成機能60、トークン署名検証機能61、トークン暗号化機能62、トークンMAC付与機能63、クライアント検証機能64、秘匿通信路開設機能65、トークン署名検証鍵(公開鍵)71、トークン暗号化鍵72、トークンMAC鍵73、及びクライアント検証鍵(公開鍵)74を内蔵する。
The
SE(TEE)ID51は、セキュアなコンポーネント50を一意に識別するためのIDである。SE(TEE)ID51は、SEID51、又はTEEID51の意味である。
The SE(TEE)
カウンタ52は、セキュアなコンポーネント50がトークンを生成する際、生成回数を計数する。
The counter 52 counts the number of times the
トークン53は、リソースサーバ300のリソース301に対する認可を受けていることを証明する秘密情報である。トークン53は、クライアントアプリ20経由でトークンサーバ400から受け取ることができる。トークン53のデータ構造、内容については、以降説明する個々の実施例によって異なる。
The token 53 is secret information that proves that the
トークン生成機能60は、セキュアなコンポーネント50自身がトークンを生成する場合に実行する機能である。トークン生成機能60は、SE(TEE)ID51やカウンタ52の値をトークン(初期のトークンとも称する)に付加する等の処理を行って動的なトークンを生成する。
The
トークン署名検証機能61は、クライアントアプリ20経由でトークンサーバ400から受け取ったトークンに署名が添付されている場合、署名の検証を行う機能である。
The token
トークン暗号化機能62は、暗号化トークンを授受する際に暗号化を行う機能である。
The
トークンMAC付与機能63は、トークンにMAC(Message Authentication Code:メッセージ認証コード)を付与する際に実行する機能である。
The token
クライアント検証機能64は、クライアントアプリ20との間でのトークン授受時にクライアント認証を行う際に実行する機能である。
The
秘匿通信路開設機能65は、セキュアなコンポーネント管理サーバ500との間で秘匿通信路を開設する機能であり、例えば、TLS(Transport Layer Security)等の通信機能を想定している。
The secret communication
トークン署名検証鍵(公開鍵)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
トークン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
SE(TEE)ID401は、トークンサーバ400が出力するトークンの出力先のIoTデバイス100内のセキュアなコンポーネント50を一意に識別するためのIDである。SE(TEE)ID401は、SEID401又はTEEID401の意味である。
The SE(TEE)
カウンタ402は、セキュアなコンポーネント50がトークンを生成する際、生成回数を計数するカウンタである。カウンタ402は、当該セキュアなコンポーネント50からのトークンの受信回数と同期している。
The
トークン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
トークン正当性確認機能410は、セキュアなコンポーネント50が生成した動的なトークンの正当性を確認する機能である。トークン正当性確認機能410は、SE(TEE)ID401やカウンタ402の値を参照してトークンの正当性を確認する。
The token
トークン署名生成機能411は、トークンに対して署名を生成し、当該トークンに付与する機能である。
The token
トークン復号機能412は、暗号化トークンを受信した際、暗号化トークンを復号する機能である。
The
トークンMAC検証機能413は、トークンに付与されたMACを検証する機能である。
The token
トークン署名生成鍵(秘密鍵)420は、トークンに対して署名を生成する鍵である。 The token signature generation key (private key) 420 is a key that generates a signature for the token.
トークン復号鍵421は、暗号化トークンを受信した際、暗号化トークンの復号に用いる鍵である。
The
トークンMAC検証鍵422は、トークンに付与されたMACを照合するために使用する鍵である。
The token
セキュアなコンポーネント50が動的にトークンを生成する場合、トークンサーバ400は、トークンを生成可能なSE(TEE)ID401のリストと、当該SE(TEE)ID401がトークンを生成した回数を記録している。セキュアなコンポーネント50の製造者であれば、各個体のID管理を元々手掛けていることもあり、比較的容易に管理できるので、トークンサーバ400の運営は、セキュアなコンポーネント50の製造者又は当該製造者と協業関係にある事業者が行うことが好ましい。なお、トークンサーバ400を運営する事業者は、サービス事業者であってもよい。
When the
次に、本実施の形態の認可に基づくリソースアクセス制御システムの処理について説明する。デバイス(例えば、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
図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
P2(ブラウザのオープン):クライアントアプリ20は、認可コードを返すためのリダイレクトURI(Uniform Resource Identifier)をリクエストに含め、認可サーバ200の認可ページをブラウザ10で開く。リダイレクトURIは、クライアントアプリ20が承認され、認可コードが付与されたとき、認可サーバ200が、ブラウザ10を別の場所へ遷移させる(リダイレクトする)場所である。ここでは、リダイレクトURIは、IoTデバイス100内でクライアントアプリ20自身を示すURIとする。
P2 (Open browser): The
P3(認可ページの転送):ブラウザ10は、認可コードを返すためのリダイレクトURIをリクエストに含め、認可サーバ200の認可ページを開く。
P3 (transfer of authorization page): The
P4(認証要求):認可サーバ200は、リクエストに含まれているリダイレクトURIが事前登録された正当な値であることを確認した上で、デバイス管理者に対するユーザ認証を要求する。ここでは、ユーザID及びパスワードの入力を要求する。なお、ユーザ認証は、ユーザID及びパスワードの入力に限定されるものではなく、例えば、生体情報を入力してもよい。
P4 (authentication request): The
P5(認証情報入力と認可):デバイス管理者は、認可サーバ200に対してユーザ認証情報を入力して認証を完了する。認証完了後、デバイス管理者は認可サーバ200に対し、クライアントアプリ20のリソースアクセスを許可する。認可サーバ200は、ユーザの認可を確認した上で、トークン生成用の認可コードを生成する。
P5 (Authentication Information Input and Authorization): The device administrator inputs user authentication information to the
P6(認可コード付きリダイレクトの実行):認可サーバ200は、ブラウザ10に対し、リダイレクトURIを認可コードと共に返送し、リダイレクトを行う。
P6 (Perform redirection with authorization code): The
P7(認可コードの取得):ブラウザ10は、リダイレクトURIを認可コードと共に開くと、当該URIへのリクエストは、クライアントアプリ20が受理することになる。ここで、クライアントアプリ20は、ブラウザ10から認可コードを取得する。
P7 (obtaining authorization code): When the
P8(認可コードの提示):クライアントアプリ20は、トークンサーバ400にアクセスし、認可コードを提示する。
P8 (presentation of authorization code): The
P9(認可コードの確認):トークンサーバ400は、クライアントアプリ20から提示された認可コードが正当であるかを照合する。照合に失敗した場合、ここで処理を中断する。
P9 (Verify authorization code): The
P10(トークンの取得):照合に成功した場合、トークンサーバ400は、新たにトークンを生成し、生成したトークンをクライアントアプリ20に返送する。
P10 (obtaining token): If the match is successful, the
P11(トークンの保存):クライアントアプリ20は、セキュアなコンポーネント50に対してトークンの書き込みを行う。
P11 (saving token): The
P12(トークンの取得要求):クライアントアプリ20は、リソース301を使用する際に、セキュアなコンポーネント50に対してトークンの取得を要求する。
P12 (token acquisition request): When using the resource 301, the
P13(トークンの取得):セキュアなコンポーネント50は、クライアントアプリ20に対して、保存しているトークンを返送する。
P13 (obtaining token): The
P14(リソースへのアクセス(Withトークン)):クライアントアプリ20は、セキュアなコンポーネント50から取得したトークンを添付して、リソースサーバ300に対してリソース301へのアクセスを要求する。
P14 (Access to resource (with token)): The
P15(トークンの確認):リソースサーバ300は、トークンサーバ400に対して、クライアントアプリ20から受領したトークンの正当性を確認する。トークンが正当でない場合、クライアントアプリ20からのアクセスを拒否し、ここで処理を終了する。
P15 (token verification): The
P16(リソースの提供):トークンが正当な場合、リソースサーバ300は、クライアントアプリ20にリソース301へのアクセスを提供する。
P16 (Provision of resource): If the token is valid, the
上述のように、クライアントアプリ20は、トークンサーバ400から取得したトークンをセキュアなコンポーネント50に保存する。これにより、IoTデバイス100の長期稼働において、所定のサーバ(例えば、トークンサーバ400)から取得した有効なトークンを保持し続けるリスク(例えば、漏洩等のセキュリティリスク)を低減しつつ、再認証やトークンの更新に必要となる通信トラフシックを削減することができる。また、トークンが安全に保存されるので、漏洩等を回避するために、トークンを頻繁に更新する必要もなく、トークンを無効にするための作業時間を設定する必要もない。
As described above, the
セキュアなコンポーネント50内において、トークンサーバ400と同じトークン検証ロジックを実装しておくことにより、トークンをセキュアなコンポーネント50に保存する際、当該トークンが正当な値であるか(不適切なトークンでないか)を確認し、トークンの改ざん等を防止することができる。以下では、検証アルゴリズムとして、公開鍵署名を用いる場合について説明する。なお、検証アルゴリズムは、公開鍵署名に限定されるものではなく、他の検証方法を用いてもよい。
By implementing the same token verification logic as the
図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
P22(ブラウザのオープン):クライアントアプリ20は、認可コードを返すためのリダイレクトURIをリクエストに含め、認可サーバ200の認可ページをブラウザ10で開く。ここでは、リダイレクトURIは、IoTデバイス100内でクライアントアプリ20自身を示すURIとする。
P22 (Open browser): The
P23(認可ページの転送):ブラウザ10は、認可コードを返すためのリダイレクトURIをリクエストに含め、認可サーバ200の認可ページを開く。
P23 (Transfer of authorization page): The
P24(認証要求):認可サーバ200は、リクエストに含まれているリダイレクトURIが事前登録された正当な値であることを確認した上で、デバイス管理者に対するユーザ認証を要求する。
P24 (Authentication request): The
P25(認証情報入力と認可):デバイス管理者は、認可サーバ200に対してユーザ認証情報を入力して認証を完了する。認証完了後、デバイス管理者は認可サーバ200に対し、クライアントアプリ20のリソースアクセスを許可する。認可サーバ200は、ユーザの認可を確認した上で、トークン生成用の認可コードを生成する。
P25 (Authentication information input and authorization): The device administrator inputs user authentication information to the
P26(認可コード付きリダイレクトの実行):認可サーバ200は、ブラウザ10に対し、リダイレクトURIを認可コードと共に返送し、リダイレクトを行う。
P26 (Perform redirection with authorization code): The
P27(認可コードの取得):ブラウザ10は、リダイレクトURIを認可コードと共に開くと、当該URIへのリクエストは、クライアントアプリ20が受理することになる。ここで、クライアントアプリ20は、ブラウザ10から認可コードを取得する。
P27 (obtaining authorization code): When the
P28(認可コードの提示):クライアントアプリ20は、トークンサーバ400にアクセスし、認可コードを提示する。
P28 (presentation of authorization code): The
P29(認可コードの確認):トークンサーバ400は、クライアントアプリ20から提示された認可コードが正当であるかを照合する。照合に失敗した場合、ここで処理を中断する。
P29 (Confirmation of authorization code): The
P30(トークンの取得):照合に成功した場合、トークンサーバ400は、新たにトークンを生成する。このとき、トークンサーバ400は、トークン署名生成機能411を呼び出し、自身が保持するトークン署名生成鍵(秘密鍵)420を用いてトークンに対して署名を行い、クライアントアプリ20に返送する。
P30 (token acquisition): If the match is successful, the
P31(トークンの検証):クライアントアプリ20は、セキュアなコンポーネント50に対してトークンの書き込みを指示する。このとき、セキュアなコンポーネント50は、トークンの書き込みに先立って、トークン署名検証機能61を呼び出し、トークン署名検証鍵(公開鍵)71を用いて、トークンに添付された署名を検証し、トークンの正当性検証を行う。検証に失敗した場合は、ここで処理を終了し、トークンの保存を行わない。
P31 (token verification): The
P32(トークンの保存):検証に成功した場合、セキュアなコンポーネント50は、トークンを保存する。P32以降の処理は、図3に示す符号P11以降の処理と同様であるが、リソースサーバ300がクライアントアプリ20から受領したトークンの正当性を確認する際に、P31の処理を同様に、トークン署名検証鍵を用いてトークンを検証してもよい。
P32 (save token): If the verification is successful, the
上述のように、セキュアなコンポーネント50がトークンを記憶する際、トークンの正当性を確認することにより、不正なトークンの挿入によるトークンの置き換え攻撃などのトークンの改ざん等を防止することができる。
As described above, when the
上述の例では、セキュアなコンポーネント50に対してトークンを保存する構成であったが、セキュアなコンポーネント50が動的にトークンを生成してもよい。以下では、トークンの改ざん検知コードの付与による保護及び暗号技術による保護について説明する。まず、トークンの動的生成と改ざん検知コードの付与による保護について説明する。
In the above example, the token is stored in the
図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
P42(ブラウザのオープン):クライアントアプリ20は、認可コードを返すためのリダイレクトURIをリクエストに含め、認可サーバ200の認可ページをブラウザ10で開く。ここでは、リダイレクトURIは、IoTデバイス100内でクライアントアプリ20自身を示すURIとする。
P42 (Open browser): The
P43(認可ページの転送):ブラウザ10は、認可コードを返すためのリダイレクトURIをリクエストに含め、認可サーバ200の認可ページを開く。
P43 (Transfer of authorization page): The
P44(認証要求):認可サーバ200は、リクエストに含まれているリダイレクトURIが事前登録された正当な値であることを確認した上で、デバイス管理者に対するユーザ認証を要求する。ここでは、ユーザID及びパスワードの入力を要求する。
P44 (Authentication request): The
P45(認証情報入力と認可):デバイス管理者は、認可サーバ200に対してユーザ認証情報を入力して認証を完了する。認証完了後、デバイス管理者は認可サーバ200に対し、クライアントアプリ20のリソースアクセスを許可する。認可サーバ200は、ユーザの認可を確認した上で、トークン生成用の認可コードを生成する。
P45 (Authentication information input and authorization): The device administrator inputs user authentication information to the
P46(認可コード付きリダイレクトの実行):認可サーバ200は、ブラウザ10に対し、リダイレクトURIを認可コードと共に返送し、リダイレクトを行う。
P46 (Perform redirection with authorization code): The
P47(認可コードの取得):ブラウザ10は、リダイレクトURIを認可コードと共に開くと、当該URIへのリクエストは、クライアントアプリ20が受理することになる。ここで、クライアントアプリ20は、ブラウザ10から認可コードを取得する。
P47 (obtaining authorization code): When the
P48(認可コードの提示):クライアントアプリ20は、トークンサーバ400にアクセスし、認可コードを提示する。
P48 (presentation of authorization code): The
P49(認可コードの確認):トークンサーバ400は、クライアントアプリ20から提示された認可コードが正当であるかを照合する。照合に失敗した場合、ここで処理を中断する。
P49 (Verify authorization code): The
P50(トークンの取得):照合に成功した場合、トークンサーバ400は、新たに初期トークンを生成し、生成した初期トークンをクライアントアプリ20に返送する。
P50 (token acquisition): If the match is successful, the
P51(トークンの保存):クライアントアプリ20は、セキュアなコンポーネント50に対して初期トークンの書き込みを行う。
P51 (saving token): The
P52(トークンの取得要求):クライアントアプリ20は、リソース301を使用する際に、セキュアなコンポーネント50に対してトークンの取得を要求する。
P52 (token acquisition request): When using the resource 301, the
P53(IDおよびカウンタ付きトークンの生成):セキュアなコンポーネント50は、トークン生成機能60を呼び出し、自身が保持する固有のID51と、トークン生成回数を記録するカウンタ52の値を初期トークンに付加し、IDおよびカウンタ付きトークンを生成する。セキュアなコンポーネント50は、トークンを生成後、カウンタ52の値に1を加算する。
P53 (Generating a token with ID and counter): The
P54(トークンへのMAC付与):セキュアなコンポーネント50は、自身が保持するトークンMAC鍵73を用いて、IDおよびカウンタ付きトークンに対するMAC(メッセージ認証コード)を計算し、計算したMACをトークンに付与する。MAC計算は、トークンのデータ列に対して、既存のMAC計算アルゴリズム(例えば、HMAC-SHA256など)を用いることができる。
P54 (assigning MAC to token): The
P55(リソースへのアクセス(Withトークン)):クライアントアプリ20は、セキュアなコンポーネント50から取得したIDおよびカウンタ付きトークンをMACとともに添付して、リソースサーバ300に対してリソース301へのアクセスを要求する。
P55 (Access to resource (with token)): The
P56(トークンのMAC検証):リソースサーバ300は、トークンサーバ400に対して、クライアントアプリ20から受領したIDおよびカウンタ付きトークンの検証を依頼する。トークンサーバ400は、トークンMAC検証機能413を呼び出し、自身が保持するトークンMAC検証鍵422を用いてトークンに付与されているMACを検証する。基本的には、セキュアなコンポーネント50で実行したMAC計算と同一の計算を行ってMACを導出し、トークンに付与されているMACと一致比較すればよい。両者が不一致の場合、不正なトークンとみなし、ここで処理を終了する。
P56 (token MAC verification): The
P57(トークンの正当性検証):トークンサーバ400は、トークンからIDを取得してトークン送信元のセキュアなコンポーネント50を特定すると共に、当該IDに対応して保持しているカウンタ402の値を読み出し、リソースサーバ300から取得したトークンに埋め込まれたカウンタ値と比較する。比較終了後、トークンサーバ400は、カウンタ402の値に1を加算する。IDが見つからなかった場合、またはカウンタ値が一致しなかった場合、不正なトークンとみなし、ここで処理を終了する。
P57 (token validity verification): The
P58(リソースの提供):トークンが正当な場合、リソースサーバ300は、クライアントアプリ20にリソース301へのアクセスを提供する。
P58 (Providing resource): If the token is valid, the
上述の例のように、セキュアなコンポーネント50は、内部に保有する情報及び記憶した初期トークンを用いて、IDおよびカウンタ付きトークン(新たなトークン)を生成する。内部に保有する情報は、新たなトークンを生成するための秘匿情報であれば、例えば、固有のID、トークン生成回数を記録するカウンタ値や乱数要素など、どのような情報を用いてもよい。
As in the above example, the
クライアントアプリ20は、新たなトークンをリソースサーバ300へ送信する。リソースサーバ300は、新たなトークンの検証結果に基づいてクライアントアプリ20のリソース301へのアクセスを制御する。すなわち、検証が成功すれば、クライアントアプリ20はリソース301にアクセスすることができる。このように、クライアント側でトークンを動的に生成し、リソースサーバ300で当該トークンを検証することにより、トークンの再利用(トークンを用いたリプレイアタック)やなりすまし等を防止できる。
The
また、上述のように、改ざん検知コード(上述の例では、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
P62(ブラウザのオープン):クライアントアプリ20は、認可コードを返すためのリダイレクトURIをリクエストに含め、認可サーバ200の認可ページをブラウザ10で開く。ここでは、リダイレクトURIは、IoTデバイス100内でクライアントアプリ20自身を示すURIとする。
P62 (Open browser): The
P63(認可ページの転送):ブラウザ10は、認可コードを返すためのリダイレクトURIをリクエストに含め、認可サーバ200の認可ページを開く。
P63 (Transfer of authorization page): The
P64(認証要求):認可サーバ200は、リクエストに含まれているリダイレクトURIが事前登録された正当な値であることを確認した上で、デバイス管理者に対するユーザ認証を要求する。ここでは、ユーザID及びパスワードの入力を要求する。
P64 (Authentication request): The
P65(認証情報入力と認可):デバイス管理者は、認可サーバ200に対してユーザ認証情報を入力して認証を完了する。認証完了後、デバイス管理者は認可サーバ200に対し、クライアントアプリ20のリソースアクセスを許可する。認可サーバ200は、ユーザの認可を確認した上で、トークン生成用の認可コードを生成する。
P65 (Authentication information input and authorization): The device administrator inputs user authentication information to the
P66(認可コード付きリダイレクトの実行):認可サーバ200は、ブラウザ10に対し、リダイレクトURIを認可コードと共に返送し、リダイレクトを行う。
P66 (Perform redirection with authorization code): The
P67(認可コードの取得):ブラウザ10は、リダイレクトURIを認可コードと共に開くと、当該URIへのリクエストは、クライアントアプリ20が受理することになる。ここで、クライアントアプリ20は、ブラウザ10から認可コードを取得する。
P67 (obtaining authorization code): When the
P68(認可コードの提示):クライアントアプリ20は、トークンサーバ400にアクセスし、認可コードを提示する。
P68 (presentation of authorization code): The
P69(認可コードの確認):トークンサーバ400は、クライアントアプリ20から提示された認可コードが正当であるかを照合する。照合に失敗した場合、ここで処理を中断する。
P69 (Verify authorization code): The
P70(トークンの取得):照合に成功した場合、トークンサーバ400は、新たに初期トークンを生成し、生成した初期トークンをクライアントアプリ20に返送する。
P70 (token acquisition): If the match is successful, the
P71(トークンの保存):クライアントアプリ20は、セキュアなコンポーネント50に対して初期トークンの書き込みを行う。
P71 (saving token): The
P72(トークンの取得要求):クライアントアプリ20は、リソース301を使用する際に、セキュアなコンポーネント50に対してトークンの取得を要求する。
P72 (token acquisition request): When using the resource 301, the
P73(IDおよびカウンタ付きトークンの生成):セキュアなコンポーネント50は、トークン生成機能60を呼び出し、自身が保持する固有のID51と、トークン生成回数を記録するカウンタ52の値を初期トークンに付加し、IDおよびカウンタ付きトークンを生成する。セキュアなコンポーネント50は、トークンを生成後、カウンタ52の値に1を加算する。
P73 (Generating a token with ID and counter): The
P74(トークンの暗号化):セキュアなコンポーネント50は、トークン暗号化機能62を呼び出し、自身が保持するトークン暗号化鍵72を用いて、IDおよびカウンタ付きトークンを暗号化する。使用する暗号化アルゴリズムは、非対称鍵暗号(RSA等)、対象鍵暗号(共通鍵暗号)(AES:Advanced Encryption Standard等)のいずれでもよい。本実施例では、共通鍵を用いてAESで暗号化している。
P74 (token encryption): The
P75(リソースへのアクセス(Withトークン)):クライアントアプリ20は、セキュアなコンポーネント50から取得した暗号化トークンを添付して、リソースサーバ300に対してリソース301へのアクセスを要求する。
P75 (Access to resource (with token)): The
P76(トークンの復号):リソースサーバ300は、トークンサーバ400に対して、クライアントアプリ20から受領した暗号化トークンの検証を依頼する。トークンサーバ400は、トークン復号機能412を呼び出し、自身が保持するトークン復号鍵421を用いて暗号化トークンを復号し、IDおよびカウンタ付きトークンを得る。
P76 (token decryption): The
P77(トークンの正当性検証):トークンサーバ400は、トークンからIDを取得してトークン送信元のセキュアなコンポーネント50を特定すると共に、当該IDに対応して保持しているカウンタ402の値を読み出し、リソースサーバ300から取得したトークンに埋め込まれたカウンタ値と比較する。比較終了後、トークンサーバ400は、カウンタ402の値に1を加算する。IDが見つからなかった場合、またはカウンタ値が一致しなかった場合、不正なトークンとみなし、ここで処理を終了する。
P77 (token validity verification): The
P78(リソースの提供):トークンが正当な場合、リソースサーバ300は、クライアントアプリ20にリソース301へのアクセスを提供する。
P78 (Providing resource): If the token is valid, the
上述の例においても、図5の場合と同様に、セキュアなコンポーネント50は、内部に保有する情報及び記憶した初期トークンを用いて、IDおよびカウンタ付きトークン(新たなトークン)を生成する。すなわち、トークンサーバ400が発行した固定値のトークンを使い続けるのではなく、セキュアなコンポーネント50とトークンサーバ400が、鍵とセキュアなコンポーネント50の状態に関する情報(例えば、ID、カウンタ)を個別に保持した上で、鍵を用いて両者の上方の整合性を検証する形でトークンの正当性検証を行う。
In the above example, as in the case of FIG. 5, the
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
なお、本実施例で採用しているトークンの暗号化、復号の方法や正当性検証方法(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
図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
P82(ブラウザのオープン):クライアントアプリ20は、認可コードを返すためのリダイレクトURIをリクエストに含め、認可サーバ200の認可ページをブラウザ10で開く。ここでは、リダイレクトURIは、IoTデバイス100内でクライアントアプリ20自身を示すURIとする。
P82 (Open browser): The
P83(認可ページの転送):ブラウザ10は、認可コードを返すためのリダイレクトURIをリクエストに含め、認可サーバ200の認可ページを開く。
P83 (Transfer of authorization page): The
P84(認証要求):認可サーバ200は、リクエストに含まれているリダイレクトURIが事前登録された正当な値であることを確認した上で、デバイス管理者に対するユーザ認証を要求する。
P84 (Authentication request): The
P85(認証情報入力と認可):デバイス管理者は、認可サーバ200に対してユーザ認証情報を入力して認証を完了する。認証完了後、デバイス管理者は認可サーバ200に対し、クライアントアプリ20のリソースアクセスを許可する。認可サーバ200は、ユーザの認可を確認した上で、トークン生成用の認可コードを生成する。
P85 (Authentication information input and authorization): The device administrator inputs user authentication information to the
P86(認可コード付きリダイレクトの実行):認可サーバ200は、ブラウザ10に対し、リダイレクトURIを認可コードと共に返送し、リダイレクトを行う。
P86 (Perform redirection with authorization code): The
P87(認可コードの取得):ブラウザ10は、リダイレクトURIを認可コードと共に開くと、当該URIへのリクエストは、クライアントアプリ20が受理することになる。ここで、クライアントアプリ20は、ブラウザ10から認可コードを取得する。
P87 (Obtaining authorization code): When the
P88(認可コードの提示):クライアントアプリ20は、トークンサーバ400にアクセスし、認可コードを提示する。
P88 (presentation of authorization code): The
P89(認可コードの確認):トークンサーバ400は、クライアントアプリ20から提示された認可コードが正当であるかを照合する。照合に失敗した場合、ここで処理を中断する。
P89 (Confirmation of authorization code): The
P90(トークンの取得):照合に成功した場合、トークンサーバ400は、新たにトークンを生成し、生成したトークンをクライアントアプリ20に返送する。
P90 (obtaining token): If the match is successful, the
P91(クライアントアプリ証明書の送信):クライアントアプリ20は、トークンの書き込みに先立って、セキュアなコンポーネント50に対してクライアントアプリ証明書21を送信する。
P91 (sending client application certificate): The
P92(クライアントアプリ証明書の検証):セキュアなコンポーネント50は、クライアント検証機能64を呼び出し、自身が保持しているクライアント検証鍵(公開鍵)74を用いて、送信されたクライアントアプリ証明書21を検証する。具体的には、セキュアなコンポーネント50は、クライアントアプリ20のハッシュ値を計算し、計算したハッシュ値と、クライアントアプリ証明書21に含まれる暗号化ハッシュ値を復号して得た値とを比較し、一致していることを確認する。不一致の場合、クライアントアプリ20は不正なクライアントアプリであるとみなし、ここで処理を終了する。
P92 (Verifying client application certificate): The
P93(トークンの保存):クライアントアプリ証明書の検証が成功した場合、クライアントアプリ20は、セキュアなコンポーネント50に対してトークンの書き込みを行う。セキュアなコンポーネント50は、クライアントアプリ証明書の検証が完了していることを確認した上で、トークンを内部に保存する。
P93 (saving token): If the verification of the client application certificate is successful, the
P94(トークンの取得要求):クライアントアプリ20は、リソース301を使用する際に、セキュアなコンポーネント50に対してトークンの取得を要求する。このとき、P92で行った、クライアントアプリ証明書の検証を再度実施する。
P94 (token acquisition request): When using the resource 301, the
P95(トークンの取得):クライアントアプリ証明書の検証が成功した場合、セキュアなコンポーネント50は、クライアントアプリ20に対して、保存しているトークンを返送する。
P95 (obtaining token): If the verification of the client application certificate is successful, the
P96(リソースへのアクセス(Withトークン)):クライアントアプリ20は、セキュアなコンポーネント50から取得したトークンを添付して、リソースサーバ300に対してリソース301へのアクセスを要求する。
P96 (Access to resource (with token)): The
P97(トークンの確認):リソースサーバ300は、トークンサーバ400に対して、クライアントアプリ20から受領したトークンの正当性を確認する。トークンが正当でない場合、クライアントアプリ20からのアクセスを拒否し、ここで処理を終了する。
P97 (Token Verification): The
P98(リソースの提供):トークンが正当な場合、リソースサーバ300は、クライアントアプリ20にリソース301へのアクセスを提供する。
P98 (Providing resource): If the token is valid, the
上述の実施例によれば、不正なアプリによって、トークンの不正な設定や搾取を防止できる。 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
以上のとおり、IoTデバイス100側にセキュアなコンポーネント50を組み込むことにより、IoTデバイス100上で適切にセキュリティを維持したまま、認可メカニズムを利用することができる。一方で、IoTデバイス100のセキュリティを維持するためには、内部に保持する鍵や各機能などの内部状態を適切に保守管理し、必要に応じて当該内部状態を更新できることが望ましい。以下では、IoTデバイス100の内部状態の更新について説明する。
As described above, by incorporating a
図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
P102(セキュアなコンポーネントへの状態確認指示):IoTデバイス100は、電源が投入されると、セキュアなコンポーネント50に対して内部状態の更新が必要かどうか、状態確認指示を行う。
P102 (state check instruction to secure component): When the
P103(秘匿通信路開設機能の呼び出し):セキュアなコンポーネント50は、状態確認指示を受けて、自身の内部の秘匿通信路開設機能65を呼び出す。
P103 (calling the secret communication channel establishment function): Upon receiving the status check instruction, the
P104(秘匿通信路の開設):秘匿通信路開設機能65は、セキュアなコンポーネント管理サーバ500に対して秘匿通信路を開設する。ここでは、TLS(Transport Layer Security)通信を想定しているが、他の通信プロトコルを用いたセキュアチャネルを使用してもよい。セキュアなコンポーネント50が自らネットワーク通信機能を持たない場合は、IoTデバイス100の通信機能を使用してもよい。ただし、秘匿通信路のエンドポイントは、あくまでもセキュアなコンポーネント50とセキュアなコンポーネント管理サーバ500の間である。
P104 (Establishment of a secret communication path): The secret communication
P105(更新対象コンテンツの準備):セキュアなコンポーネント管理サーバ500は、秘匿通信路開設を受けて、更新すべきコンテンツを準備する。本実施例では、例えば、トークン暗号化鍵の危殆化に備え、新たな鍵の更新を行うものとする。なお、更新対象は、トークン暗号化鍵に限定されない。セキュアなコンポーネント管理サーバ500は、更新対象となる鍵の生成、準備を行う。
P105 (Preparation of content to be updated): The secure
P106(コンテンツの送信):セキュアなコンポーネント管理サーバ500は、秘匿通信路経由でセキュアなコンポーネント50に対してコンテンツを送信する。ここでは、セキュアなコンポーネント管理サーバ500は、トークン暗号化鍵72をセキュアなコンポーネント50に送信している。本実施例のように、対向するコンテンツが他のサーバ上に存在する場合は、当該サーバに対して別途秘匿通信路を開設して更新を行うことができる。ここでは、トークンサーバ400に対して秘匿通信路を開設し、トークン復号鍵421の更新を同時に行う。
P106 (sending content): The secure
これにより、セキュアなコンポーネント50のトークンに関する機能又は状態を遠隔で更新することができ、IoTデバイス100のセキュリティを維持することができる。
This allows the functionality or state of the token of the
上述の実施例では、鍵の更新について例示したが、更新対象は鍵に限定されるものではなく、セキュアなコンポーネント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
本実施の形態の認可に基づくリソースアクセス制御システムは、ユーザ認証結果に基づいてリソースに対するアクセスを認可する認可サーバと、前記認可サーバの認可結果に基づいてアクセスが制御されるリソースを有するリソースサーバと、クライアントが動作するデバイスとを備え、前記デバイスは、前記認可サーバがリソースに対するアクセスを認可した結果、前記クライアントが取得する、所定のサーバが発行するトークン情報を記憶するセキュアなコンポーネントを備え、前記クライアントは、前記セキュアなコンポーネントに記憶したトークン情報を前記リソースサーバへ送信し、前記リソースサーバは、前記トークン情報の検証結果に基づいて前記クライアントのリソースへのアクセスを制御する。 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
52
72
100
402
421
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.
前記認可サーバの認可結果に基づいてアクセスが制御されるリソースを有するリソースサーバと、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から請求項4のいずれか一項に記載の認可に基づくリソースアクセス制御システム。 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 .
内部に保有する鍵を用いて改ざん検知コードを生成する検知コード生成機能を備え、
前記クライアントは、
前記新たなトークン情報に前記改ざん検知コードを付加して前記リソースサーバへ送信し、
前記リソースサーバは、
前記改ざん検知コードの検証結果に基づいて前記クライアントのリソースへのアクセスを制御する、
請求項5に記載の認可に基づくリソースアクセス制御システム。 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 .
内部に保有する暗号化鍵を用いて前記新たなトークン情報を暗号化するトークン暗号化機能を備え、
前記クライアントは、
暗号化されたトークン情報を前記リソースサーバへ送信し、
前記リソースサーバは、
前記暗号化されたトークン情報を復号して得られた前記新たなトークン情報の検証結果に基づいて前記クライアントのリソースへのアクセスを制御する、
請求項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から請求項8のいずれか一項に記載の認可に基づくリソースアクセス制御システム。 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.
デバイス。 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.
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)
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)
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) |
-
2020
- 2020-04-15 JP JP2020072994A patent/JP7559344B2/en active Active
Patent Citations (6)
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 |