JP2020009259A - Information processing device, control method, and program thereof - Google Patents

Information processing device, control method, and program thereof Download PDF

Info

Publication number
JP2020009259A
JP2020009259A JP2018131011A JP2018131011A JP2020009259A JP 2020009259 A JP2020009259 A JP 2020009259A JP 2018131011 A JP2018131011 A JP 2018131011A JP 2018131011 A JP2018131011 A JP 2018131011A JP 2020009259 A JP2020009259 A JP 2020009259A
Authority
JP
Japan
Prior art keywords
date
authentication
time
server
authorization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2018131011A
Other languages
Japanese (ja)
Inventor
譲 大久保
Yuzuru Okubo
譲 大久保
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2018131011A priority Critical patent/JP2020009259A/en
Publication of JP2020009259A publication Critical patent/JP2020009259A/en
Pending legal-status Critical Current

Links

Images

Abstract

To minimize inquiry for date and hour acquisition to an authorization server.SOLUTION: A client terminal transmits a token issuance request including a first date and hour set to its own terminal to one of a plurality of authentication and authorization servers, receives a second date and hour of the authentication and authorization server as a response, and calculates and stores a date and hour offset on the basis of the first date and hour and the second date and hour. When transmitting a second token issuance request, the client terminal identifies a date and hour offset of a target authentication and authorization server from among the stored date and hour offsets and transmits a token issuance request including a third date and hour estimated from the identified time and hour offset.SELECTED DRAWING: Figure 8

Description

本発明は、アクセストークンを用いる情報処理装置、制御方法、およびそのプログラムに関する。   The present invention relates to an information processing device using an access token, a control method, and a program therefor.

近年、インターネット上に展開された所謂クラウドサービスの利用が拡大している。また、これらクラウドサービスは個々にWebサービスのAPI(Application Programming Interface)を公開している。他のアプリケーションやクラウドサービスからAPIを介してサービスが提供する機能を利用する事が可能となっている。これらWebサービスAPIではOAuth 2.0と呼ばれる、認可の連携を実現させるための標準プロトコルの採用が進んでいる。非特許文献1にはOAuth 2.0を利用した技術が開示されている。   In recent years, so-called cloud services deployed on the Internet have been increasingly used. Further, each of these cloud services discloses an API (Application Programming Interface) of the Web service. It is possible to use a function provided by the service via an API from another application or a cloud service. In these Web service APIs, the adoption of a standard protocol called OAuth 2.0 for realizing the cooperation of authorization is progressing. Non-Patent Document 1 discloses a technique using OAuth 2.0.

OAuth 2.0によれば、例えばあるサービスAが管理するユーザーのデータを取得するAPIに対して、そのユーザーから認められた範囲にてサービスBがアクセスすることができる。このときサービスAは、サービスBからアクセスされる範囲を明らかにした上で、サービスBによるAPIへのアクセスに対してユーザーの明示的な認可を得ることになっている。ユーザーが明示的に認可を行うことを認可操作と称する。また、このアクセスされる範囲をOAuth 2.0ではスコープと呼称し、スコープによりデータへのアクセス許容量が決定される。   According to OAuth 2.0, for example, a service B can access an API for acquiring data of a user managed by a certain service A within a range approved by the user. At this time, the service A clarifies the range accessed from the service B, and obtains the user's explicit permission for the service B to access the API. Explicit authorization by a user is called an authorization operation. In OAuth 2.0, this accessed range is called a scope, and the scope determines the data access allowance.

ユーザーが認可操作を行うと、サービスBは、サービスAにおけるユーザーが許可した範囲のデータへのアクセスが認められたことを証明する認可トークンを受け取る。以降のサービスAのAPIへのアクセスはその認可トークンを用いて実現できる。認可トークンは単にトークン、またはアクセストークンと状況に応じて様々な呼ばれ方をするが、いずれの場合であっても同じ認可トークンを指す。このユーザーの認可操作によりサービスBがユーザーのリソースに対しアクセスすることを認可したことを権限委譲と称する。なお、OAuth 2.0では、ユーザーの認可操作を元に認可トークンを発行するサーバーを認可サーバーまたは認証認可サーバーと呼称する。また、APIを公開するサーバーをリソースサーバー、APIをコールする主体をクライアントと呼称する。   When the user performs an authorization operation, the service B receives an authorization token proving that access to data in the range permitted by the user in the service A is authorized. Subsequent access to the API of service A can be realized using the authorization token. The authorization token is simply referred to as a token or an access token depending on the situation, but refers to the same authorization token in any case. Authorizing the service B to access the user's resources by the user's authorization operation is called authority transfer. In OAuth 2.0, a server that issues an authorization token based on a user's authorization operation is called an authorization server or an authentication authorization server. A server that exposes an API is called a resource server, and a subject that calls the API is called a client.

OAuth 2.0では、認可サーバーとリソースサーバーは同一サーバーで構成する事も可能としているが、リソースサーバーが複数種存在する様な大規模なシステムでは、通常、認可サーバーを独立したサーバーとして構成する。その場合、上記フローにおいて、サービスAはサービスBからのAPI利用のたびに、取得したアクセストークンの検証を認可サーバーに依頼する。そして、その検証結果を元にAPIの利用の可否を決定する。その場合、大規模システムでは、認可サーバーに負荷が集中してしまうという課題が発生する。そこでサービスAが認可サーバーに検証依頼することなく、自身でアクセストークンを検証する手段として、署名付きアクセストークンの利用が検討されている。署名付きアクセストークンとしては、非特許文献2および3にて、JWT(JSON Web Token)とJWS(JSON Web Signature)が知られている。サービスAは受信した署名付きアクセストークンの署名を検証する事で、認可サーバーに確認することなく、アクセストークンが有効であるかを判断する事ができる。   In OAuth 2.0, the authorization server and the resource server can be configured by the same server. However, in a large-scale system in which there are a plurality of resource servers, the authorization server is usually configured as an independent server. . In this case, in the above flow, the service A requests the authorization server to verify the obtained access token every time the API is used from the service B. Then, based on the verification result, it is determined whether the API can be used. In that case, in a large-scale system, a problem occurs in that the load is concentrated on the authorization server. Therefore, use of a signed access token is being considered as a means for the service A to verify the access token by itself without requesting the authorization server for verification. Non-Patent Documents 2 and 3 disclose JWT (JSON Web Token) and JWS (JSON Web Signature) as signed access tokens. By verifying the signature of the received signed access token, the service A can determine whether the access token is valid without checking with the authorization server.

また、JWTには、リプレイアタックを防ぐためと、認可サーバーが署名付きアクセストークンを保持しておく時間を明確にするために、JWTを作成した日時をそれ自身に含めることが可能である。非特許文献4は、チケットにタイムスタンプを含め、タイムスタンプがサーバーの時刻と一定以上乖離している場合、認証を受け付けない方法を示している。JWTでも同様に、JWTに含まれたJWT作成日時が認可サーバーの日時と乖離していた場合、認可サーバーが認可を拒否する方法が考えられる。   In addition, the JWT can include the date and time when the JWT was created in itself to prevent replay attacks and to clarify how long the authorization server keeps the signed access token. Non-Patent Document 4 discloses a method in which a time stamp is included in a ticket and authentication is not accepted if the time stamp deviates from the server time by a certain amount or more. Similarly, if the JWT creation date and time included in the JWT is different from the date and time of the authorization server, the authorization server may reject the authorization.

しかし、必ずしもクライアントや認可サーバーの日時が、実際の日時(以降、絶対日時と称する)に常に同期しているわけではない。NTP(Network Time Protocol)プロトコルやSNTP(Simple Network Time Protocol)プロトコルによって絶対日時に同期する方法もあるが、専用の同期用サーバーをインターネット上に公開する必要がある。その場合、大量のクライアントが使用することと、第三者に利用される可能性があることを考慮すると、コストの面から難しかった。   However, the date and time of the client and the authorization server are not always synchronized with the actual date and time (hereinafter, referred to as absolute date and time). There is also a method of synchronizing to the absolute date and time by using the NTP (Network Time Protocol) protocol or the SNTP (Simple Network Time Protocol) protocol, but it is necessary to publish a dedicated synchronization server on the Internet. In that case, it was difficult in terms of cost in view of the use by a large number of clients and the possibility of being used by a third party.

一般的な技術として特許文献1では、クライアントがサーバーから返信されたサーバー日時に同期し、同期後に認証要求を送信することを開示している。   As a general technique, Patent Document 1 discloses that a client synchronizes with a server date and time returned from a server, and transmits an authentication request after the synchronization.

“The OAuth 2.0 Authorization Framework”、[online]D.Hardt、2012年8月<URL http://tools.ietf.org/html/rfc6749>"The OAuth 2.0 Authorization Framework", [online] D. Hardt, August 2012 <URL http: // tools. ief. org / html / rfc6749> “JSON Web Token(JWT)”、[online]M.Jones,J.Bradley,N.Sakimura、2015年5月<URL https://tools.ietf.org/html/rfc7519>"JSON Web Token (JWT)", [online] Jones, J .; Bradley, N .; Sakimura, May 2015 <URL https: // tools. ief. org / html / rfc7519> “JSON Web Signature(JWS)”、[online]M.Jones,J.Bradley,N.Sakimura、2015年5月<https://tools.ietf.org/html/rfc7515>"JSON Web Signature (JWS)", [online] Jones, J .; Bradley, N .; Sakimura, May 2015 <https: // tools. ief. org / html / rfc7515> “The Kerberos Network Authentication Service(V5)”、[online]J.Kohl,C.Neuman、1993年9月<https://tools.ietf.org/html/rfc1510>"The Kerberos Network Authentication Service (V5)", [online] J. Kohl, C.A. Neuman, September 1993 <https: // tools. ief. org / html / rfc1510>

特開2016−31593JP 2016-31593A

クライアントが複数の認可サーバーと通信する場合では、複数の認可サーバー同士が同一の日時に同期出来ていない時、タイミングによっては、クライアントが認可サーバーに対して日時情報取得のための問い合わせを繰り返してしまう。その結果、不要な問い合わせが増大することで、パフォーマンスの悪化およびコストが増えてしまうという課題があった。   When a client communicates with multiple authorization servers, if the multiple authorization servers cannot synchronize with the same date and time, depending on the timing, the client repeatedly queries the authorization server for date and time information acquisition. . As a result, there is a problem in that unnecessary queries increase, thereby deteriorating performance and increasing costs.

本発明の目的は、上記課題を解決するために、複数の認可サーバーと通信する場合に、認可サーバーとの日時オフセットをクライアントが適切に管理し、認可サーバーへの日時取得のための問い合わせを最小限にすることである。   An object of the present invention is to solve the above-mentioned problem, when communicating with a plurality of authorization servers, the client appropriately manages the date and time offset with the authorization server, and minimizes queries to the authorization server for date and time acquisition. It is to limit.

本願発明の一実施形態に係る情報処理装置は、アクセストークンを発行することが可能な複数の認証認可サーバーと通信する情報処理装置であって、前記情報処理装置に設定されている第1の日時を含むトークン発行要求を1つの認証認可サーバーに送信する送信手段と、前記送信手段により送信された前記トークン発行要求に対する応答として、前記1つの認証認可サーバーに設定されている第2の日時を受信する受信手段と、前記受信手段により受信された前記第2の日時と前記第1の日時とに基づき日時オフセットを算出し、前記1つの認証認可サーバーに関連付けて記憶する記憶手段と、を有し、前記記憶手段は、前記複数の認証認可サーバーの夫々に対する日時オフセットを記憶することが可能であり、前記送信手段は、前記複数の認証認可サーバーの何れか1つに対して2回目のトークン発行要求を送信する場合、前記記憶手段により記憶された日時オフセットの中から送信対象となる認証認可サーバーの日時オフセットを特定し、前記2回目のトークン発行要求には特定された前記日時オフセットから推定される第3の日時を含めて送信することを特徴とする。   An information processing apparatus according to an embodiment of the present invention is an information processing apparatus that communicates with a plurality of authentication / authorization servers capable of issuing an access token, and includes a first date and time set in the information processing apparatus. Sending means for sending a token issuance request including one to one authentication and authorization server, and receiving a second date and time set in the one authentication and authorization server as a response to the token issuance request sent by the sending means Receiving means, and a storage means for calculating a date / time offset based on the second date / time and the first date / time received by the receiving means, and storing the date / time offset in association with the one authentication / authorization server. The storage means can store a date and time offset for each of the plurality of authentication / authorization servers, and the transmitting means When a second token issuance request is transmitted to any one of the authentication / authorization servers, the date / time offset of the authentication / authorization server to be transmitted is specified from the date / time offsets stored by the storage unit. The third token issuance request is transmitted including the third date and time estimated from the specified date and time offset.

本発明の目的を解決するシステムによれば、クライアントが認可サーバーの日時を取得する回数を最小限に抑えることで、パフォーマンス劣化とサーバー負荷を低減することが出来る。   According to the system for solving the object of the present invention, it is possible to reduce the performance degradation and the server load by minimizing the number of times the client acquires the date and time of the authorization server.

システム構成図System Configuration 各装置のハードウェア構成図Hardware configuration diagram of each device 各装置のソフトウェアモジュール構成図Software module configuration diagram of each device 従来技術でのアクセストークン発行と検証のシーケンス図Sequence diagram of access token issuance and verification in conventional technology JWSアクセストークン発行と検証のシーケンス図Sequence diagram of JWS access token issuance and verification クライアント日時設定を行うJWSアクセストークン発行と検証のフロー図Flow chart of JWS access token issuance and verification for setting client date and time 複数の認証認可サーバーと通信する、クライアント日時設定を行うJWSアクセストークン発行と検証のフロー図Flow diagram of JWS access token issuance and verification for setting client date and time to communicate with multiple authentication and authorization servers サーバーに対応する日時オフセットを使用するJWSアクセストークン発行と検証のシーケンス図Sequence diagram of JWS access token issuance and verification using date and time offset corresponding to server 具体的な日時を使用した、サーバーに対応する日時オフセットを使用する場合の動作説明図Operation explanation diagram when using date and time offset corresponding to server using specific date and time サーバーグルーピングを用いるJWSアクセストークン発行と検証のシーケンス図Sequence diagram of JWS access token issuance and verification using server grouping 初期グループ決定処理のフローチャートFlowchart of initial group determination processing 具体的な日時を使用した、サーバーグルーピングを用いる場合の動作説明図Operation explanation diagram when using server grouping using specific date and time

以下、本発明を実施するための形態について図面を用いて説明する。   Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.

[実施例1]
本実施例においては、インターネット上の各サーバーにアプリケーションが設置されていることとする。アプリケーションはクライアント端末と連携し、様々な機能を提供することとする。このような機能を提供する実体をサービスと称し、機能をクライアント端末に提供することをサービスの提供と称する。
[Example 1]
In this embodiment, it is assumed that an application is installed on each server on the Internet. The application cooperates with the client terminal to provide various functions. An entity that provides such a function is referred to as a service, and providing a function to a client terminal is referred to as providing a service.

本実施の形態に係る情報処理システムである認証・認可システムは、図1に示すような構成のネットワーク上に実現される。100は、Wide Area Network(WAN)であり、本発明ではWorld Wide Web(WWW)システムが構築されている。101、102、103は各構成要素を接続するLocal Area Network(LAN)である。110はユーザー・クライアント端末の認証および、OAuthを実現するための認証認可サーバーAである。120はリソースサーバーAであり、様々なサービスを提供する。   An authentication / authorization system, which is an information processing system according to the present embodiment, is realized on a network having a configuration as shown in FIG. Reference numeral 100 denotes a Wide Area Network (WAN), and a World Wide Web (WWW) system is constructed in the present invention. Reference numerals 101, 102, and 103 denote local area networks (LANs) for connecting the components. Reference numeral 110 denotes an authentication / authorization server A for realizing user client terminal authentication and OAuth. Reference numeral 120 denotes a resource server A, which provides various services.

実施例1において各サーバーは1台ずつ設置されているが複数台で構成されていても良く、例えば、認証認可サーバーAシステムとして提供されても良い。140はクライアント端末であり、パソコン、モバイル端末、画像形成装置などである。クライアント端末140には、1つまたは複数のリソースサービス連携アプリケーションがインストールされており、リソースサービスとのデータ送受信を行う。認証認可サーバーB111とリソースサーバーB121は認証認可サーバーA110とリソースサーバーA120と同様の構成である。しかし、別のセキュリティドメインのシステムであり、認証認可サーバーB111より発行されたトークンでリソースサーバーB121を利用する。   In the first embodiment, each server is installed one by one, but may be configured by a plurality of servers, and for example, may be provided as an authentication and authorization server A system. Reference numeral 140 denotes a client terminal, such as a personal computer, a mobile terminal, or an image forming apparatus. One or a plurality of resource service cooperation applications are installed in the client terminal 140, and perform data transmission and reception with the resource service. The authentication and authorization server B111 and the resource server B121 have the same configuration as the authentication and authorization server A110 and the resource server A120. However, it is a system in another security domain, and uses the resource server B121 with a token issued by the authentication and authorization server B111.

図2は本実施例に係る、認証認可サーバーA110、認証認可サーバーB111、リソースサーバーA120、リソースサーバーB121、クライアント端末140を構成する情報処理装置の一般的なハードウェア構成である。CPU231は、ROM233のプログラム用ROMに記憶された、或いはハードディスク(HD)等の外部メモリ241からRAM232にロードされたOSやアプリケーション等のプログラムを実行する。またCPU231は、システムバス234に接続される各ブロックを制御する。ここでOSとはコンピューター上で稼動するオペレーティングシステムの略語であり、以下オペレーティングシステムのことをOSと呼ぶ。後述する各シーケンスの処理はこのプログラムの実行により実現できる。   FIG. 2 illustrates a general hardware configuration of an information processing apparatus that configures the authentication and authorization server A110, the authentication and authorization server B111, the resource server A120, the resource server B121, and the client terminal 140 according to the present embodiment. The CPU 231 executes a program such as an OS or an application stored in the program ROM of the ROM 233 or loaded into the RAM 232 from the external memory 241 such as a hard disk (HD). The CPU 231 controls each block connected to the system bus 234. Here, the OS is an abbreviation for an operating system running on a computer, and the operating system is hereinafter referred to as an OS. The processing of each sequence described later can be realized by executing this program.

RAM232は、CPU231の主メモリ、ワークエリア等として機能する。操作部I/F235は、操作部242からの入力を制御する。CRTコントローラ(CRTC)236は、CRTディスプレイ240の表示を制御する。ディスクコントローラ(DKC)237は各種データを記憶するハードディスク(HD)等の外部メモリ241におけるデータアクセスを制御する。   The RAM 232 functions as a main memory, a work area, and the like for the CPU 231. The operation unit I / F 235 controls an input from the operation unit 242. A CRT controller (CRTC) 236 controls the display on the CRT display 240. A disk controller (DKC) 237 controls data access in an external memory 241 such as a hard disk (HD) for storing various data.

ネットワークコントローラ(NC)238はWAN100もしくはLAN101、102、103を介して接続されたサーバーコンピューターや他の機器との通信制御処理を実行する。リアルタイムクロック(RTC)239は、情報処理装置の電源が切られていても日時をカウントするために用いられる。システム本体の電源系統とは異なる電源とも接続される。異なる電源は、ボタン型電池などの一次電池や、コンデンサや二次電池などから供給される。   A network controller (NC) 238 executes a communication control process with a server computer or another device connected via the WAN 100 or the LANs 101, 102, and 103. The real-time clock (RTC) 239 is used to count the date and time even when the information processing apparatus is turned off. A power supply different from the power supply system of the system body is also connected. The different power is supplied from a primary battery such as a button-type battery, a capacitor, a secondary battery, or the like.

尚、後述の全ての説明においては、特に断りのない限り各機能の実行フローのハード上の主体はCPU231であり、ソフトウェア上の主体は外部メモリ241にインストールされたアプリケーションプログラムである。   In the following description, unless otherwise specified, the main body of the execution flow of each function on the hardware is the CPU 231, and the main body on the software is an application program installed in the external memory 241.

図3は本実施の形態に係る、認証認可サーバーA110、認証認可サーバーB111、リソースサーバーA120、リソースサーバーB121、クライアント端末140、それぞれのモジュール構成を示す図である。各々のモジュールが実行されることで、各々の機能を実現する。   FIG. 3 is a diagram showing the module configuration of each of the authentication and authorization server A110, the authentication and authorization server B111, the resource server A120, the resource server B121, and the client terminal 140 according to the present embodiment. Each function is realized by executing each module.

認証認可サーバーA110、認証認可サーバーB111は認証認可モジュール310を持つ。認証認可モジュール310では、ユーザーやクライアント端末の認証処理、認証されたユーザーやクライアント端末の認可処理、署名付きアクセストークンの発行処理を行う。   The authentication and authorization server A 110 and the authentication and authorization server B 111 have an authentication and authorization module 310. The authentication / authorization module 310 performs an authentication process of a user or a client terminal, an authorization process of an authenticated user or a client terminal, and a process of issuing a signed access token.

リソースサーバーA120、リソースサーバーB121はリソースサーバーモジュール320を持つ。リソースサーバーモジュール320は、WebサービスとしてAPIを公開し、クライアント端末140からのサービス提供の要求を受け付けサービスの提供を行う。また、クライアント端末140からの要求に対して、署名付きアクセストークンの検証処理を行うことでサービス提供の可否を決定する。   The resource server A 120 and the resource server B 121 have a resource server module 320. The resource server module 320 publishes an API as a Web service, receives a service provision request from the client terminal 140, and provides a service. In addition, in response to a request from the client terminal 140, whether or not to provide a service is determined by performing verification processing of a signed access token.

クライアント端末140は認証認可サーバー連携クライアント341、リソースサービス連携アプリケーション342を持つ。また、WWWを利用するためのユーザーエージェントであるWebブラウザ343を持つ場合があるが必須ではない。認証認可サーバー連携クライアント341は認証認可サーバーA110に対して、ユーザーやクライアントの認証の要求、アクセストークンの発行依頼や取得を行う。   The client terminal 140 has an authentication / authorization server cooperation client 341 and a resource service cooperation application 342. In addition, there is a case where a web browser 343 which is a user agent for using WWW is used, but this is not essential. The authentication / authorization server cooperation client 341 requests the authentication / authorization server A110 to authenticate a user or a client, and issues or obtains an access token.

リソースサービス連携アプリケーション342は、リソースサーバーA120、リソースサーバーB121よりサービス提供を受けるアプリケーションである。リソースサービス連携アプリケーション342は以下の手順でリソースサーバーA120、リソースサーバーB121よりサービス提供を受ける。まず、リソースサービス連携アプリケーション342は認証認可サーバー連携クライアント341に対してアクセストークンの発行を依頼する。ここで、認証認可サーバー連携クライアント341はリソースサービス連携アプリケーション342用のアクセストークンを認証認可サーバーA110より取得する。   The resource service cooperation application 342 is an application that receives a service from the resource server A 120 and the resource server B 121. The resource service cooperation application 342 receives service provision from the resource server A 120 and the resource server B 121 in the following procedure. First, the resource service cooperation application 342 requests the authentication and authorization server cooperation client 341 to issue an access token. Here, the authentication / authorization server cooperation client 341 acquires an access token for the resource service cooperation application 342 from the authentication / authorization server A110.

認証認可サーバー連携クライアント341は取得したアクセストークンを要求元のリソースサービス連携アプリケーション342に返却する。リソースサービス連携アプリケーション342は取得したアクセストークンを利用して、リソースサーバーA120、リソースサーバーB121へリソース要求を行うことでサービスの提供を受けることができる。   The authentication / authorization server cooperation client 341 returns the acquired access token to the requesting resource service cooperation application 342. The resource service cooperation application 342 can receive the service by making a resource request to the resource server A 120 and the resource server B 121 using the acquired access token.

また、認証認可サーバー連携クライアント341は日時オフセット記憶領域344を持つ。日時オフセット記憶領域344は、認証認可サーバーA110、認証認可サーバーB111が返却するサーバー日時とクライアント端末140の持つクライアント日時との差分が記憶される。   The authentication / authorization server cooperation client 341 has a date / time offset storage area 344. The date / time offset storage area 344 stores the difference between the server date / time returned by the authentication / authorization server A 110 and the authentication / authorization server B 111 and the client date / time of the client terminal 140.

図4にてOAuth 2.0でのアクセストークン発行と検証の流れについて説明する。図4はアクセストークン発行と検証に関するシーケンス図である。認証認可サーバーA110、リソースサーバーA120、クライアント端末140間で連携している。   The flow of access token issuance and verification in OAuth 2.0 will be described with reference to FIG. FIG. 4 is a sequence diagram related to access token issuance and verification. The authentication / authorization server A110, the resource server A120, and the client terminal 140 cooperate.

まず、クライアント端末140は、ステップS401にて認証認可サーバーA110に対して認証情報あるいは認可コードを送信しアクセストークンを要求し、取得する。認証情報を送信するか認可コードを送信するかは、オーナーによって異なる。クライアント端末140が処理を実施するオーナーである場合はクライアント端末140自体が認証を行い、クライアント端末140が他のオーナーから処理を依頼される場合にはオーナーから受け取った認可コードを渡すことになる。   First, in step S401, the client terminal 140 transmits authentication information or an authorization code to the authentication / authorization server A110, requests and acquires an access token. Whether to send authentication information or an authorization code depends on the owner. If the client terminal 140 is the owner who performs the processing, the client terminal 140 itself performs authentication, and if the client terminal 140 is requested to perform processing by another owner, the authorization code received from the owner is passed.

次に、クライアント端末140は取得したアクセストークンを使って、ステップS402にてリソースサーバーA120に対してサービスの提供を要求する。リソースサーバーA120は受け取ったアクセストークンが適正かどうかをステップS403にて認証認可サーバーA110に検証するよう要求する。   Next, using the acquired access token, the client terminal 140 requests the resource server A 120 to provide a service in step S402. In step S403, the resource server A120 requests the authentication / authorization server A110 to verify whether the received access token is appropriate.

認証認可サーバーA110はステップS404にてアクセストークンの検証を行い、適正であればリソースサーバーA120はステップS405にてサービスを提供するための処理を実行し、処理結果をクライアント端末140に返す。なお、ステップS404の検証でアクセストークンが不適正であった場合は、リソースサーバーA120は処理を行わず、エラーをクライアント端末140に返す。   The authentication / authorization server A110 verifies the access token in step S404, and if appropriate, the resource server A120 executes processing for providing a service in step S405, and returns a processing result to the client terminal 140. If the access token is incorrect in the verification in step S404, the resource server A120 returns an error to the client terminal 140 without performing the processing.

引き続き実施例1における署名付きアクセストークンの説明を行う。実施例1では、通常のアクセストークンの代わりにアクセストークン情報およびリソースオーナー情報であるアクセストークンに紐付くユーザー情報を格納するJWS(以降JWSアクセストークンとする)を用いてリソースサーバーにアクセスする。   Next, the signed access token according to the first embodiment will be described. In the first embodiment, the resource server is accessed using JWS (hereinafter referred to as a JWS access token) that stores user information associated with the access token, which is the access token information and the resource owner information, instead of the normal access token.

以下本実施例で用いるJWSアクセストークンについて詳述する。JWS(JSON Web Signature)は、JWT(JSON Web Token)で表現されたコンテンツをデジタル署名やMACs(Message Authentication Codes)により保護して表現する方法である。またJWTは、JSON(JavaScript(登録商標) Object Notation)をベースとしたデータ構造を用いたURLセーフなクレームの表現方法である。JWS、JWTについては、各々RFC(RFC7515(JWS)、RFC7519(JWT))として仕様化、公開されている。   Hereinafter, the JWS access token used in the present embodiment will be described in detail. JWS (JSON Web Signature) is a method of protecting and expressing contents expressed by JWT (JSON Web Token) by digital signatures and MACs (Message Authentication Codes). JWT is a URL-safe claim expression method using a data structure based on JSON (JavaScript (registered trademark) Object Notation). JWS and JWT are specified and released as RFCs (RFC7515 (JWS) and RFC7519 (JWT)), respectively.

本実施例で使用するJWSアクセストークンに含まれるクレームは、以下である。   The claims included in the JWS access token used in this embodiment are as follows.

Figure 2020009259
Figure 2020009259

表1のクレーム名クラス“Registered Claim”の各クレームは、JWTのRFC7519で予め定義されたクレームで以下である。すなわち、JWTの発行者の識別子“iss”(Issuer)、JWTの主語となる主体の識別子“sub”(Subject)、JWTを利用することが想定された主体の識別子一覧“aud”(Audience)、JWTの有効期限“exp”(Expiration Time)、JWTが有効になる日時“nbf”(Not Before)、JWTを発行した時刻“iat”(Issued At)、JWTのための一意な識別子“jti”(JWT ID)を表す。上記“exp”、“nbt”、“iat”に指定する日時はIntDateで、1970−01−01T0:0:0Z UTCから指定されたUTCの日付/時刻まで秒の数を表わすJSON数値である。またこれらの“Registered Claim”の使用は任意である。   Each claim of the claim name class “Registered Claim” in Table 1 is a claim defined in advance by JWT RFC7519 and is as follows. That is, the identifier “iss” (Issuer) of the JWT issuer, the identifier “sub” (Subject) of the subject which is the subject of the JWT, a list of identifiers “aud” (Audience) of the subjects assumed to use the JWT, JWT expiration date “exp” (Expiration Time), date and time “nbf” (Not Before) when JWT becomes valid, time “Iat” (Issued At) when JWT was issued, and unique identifier “jti” for JWT ( JWT ID). The date and time designated as “exp”, “nbt”, and “iat” is IntDate, which is a JSON numeric value indicating the number of seconds from the 1970-01-01T0: 0: 0Z UTC to the date / time of the designated UTC. Use of these "Registered Claims" is optional.

実施例1においては、JWSアクセストークンを発行する認証認可サーバーA110が以下のように値を設定する。“iss”として認証認可サーバーA110のURI、“sub”としてユーザーのUUID(Universally Unique Identifier)、“aud”としてリソースサーバーA120のURIを設定する。また、“exp”として本JWT発行時から3600秒、すなわち“iat”の値+3600、“nbf”として本JWT発行時、“すなわち“iat”と同じ値を設定する。また、“jti”として認可トークン情報の認可トークンIDを設定する。   In the first embodiment, the authentication / authorization server A 110 that issues the JWS access token sets the values as follows. The URI of the authentication / authorization server A110 is set as “iss”, the UUID (Universally Unique Identifier) of the user is set as “sub”, and the URI of the resource server A120 is set as “aud”. Also, "exp" is set to 3600 seconds after the issuance of this JWT, that is, the value of "iat" +3600, and "nbf" is set to the same value as "iat" when this JWT is issued. Set the authorization token ID of the token information.

さらには、表1のクレーム名クラス“Private Claim”の各クレームは、JWTのRFC7519によると、JWT発行者と利用者の合意のものとで使用するプライベートクレーム名クラスである。他に定義されたクレーム名と衝突のないことを前提とする。本実施例では、“Private Claim”クラスのクレーム名に認可トークン情報(認可トークンスコープリスト“authz:scopes”,認可トークンクライアントID“authz:client_id”)と、認可トークンに紐付く属性情報(デバイスシリアル“ext:device−serial”,アプリケーションID“ext:appid”)を持つことを特徴とする。   Further, each claim of the claim name class “Private Claim” in Table 1 is a private claim name class used in accordance with JWT RFC7519 according to the agreement between the JWT issuer and the user. It is assumed that there is no conflict with other defined claim names. In the present embodiment, authorization token information (authorization token scope list “authz: scopes”, authorization token client ID “authz: client_id”) is added to the claim name of the “Private Claim” class, and attribute information (device serial number) associated with the authorization token "Ext: device-serial" and an application ID "ext: appid").

具体的には、JWSアクセストークンを発行する認証認可サーバーA110が、認可情報として“authz:scopes”、“authz:client_id”のクレームを設定する。すなわち、“authz:scopes”としてリソースサーバーA120が取得を許可するリソースを表すスコープリストを設定する。さらに、“authz:client_id”としてリソースサーバーA120にアクセスするクライアントのIDを表す“authz:client_id”を設定する。また、“ext:dev−serial”としてクライアント端末140を識別するデバイスシリアル番号、“ext:appid”としてリソースサービス連携アプリケーション342を識別するためのアプリケーションIDを設定する。詳細は後述する。また、JWSはアクセストークンのためだけでなく、クライアント端末140が認証認可サーバーA110、認証認可サーバーB111に対して、トークン発行要求を行うときにも使用される。その際の各クレームに格納すべき値は、JWSアクセストークンと同様となる。   Specifically, the authentication / authorization server A110 that issues the JWS access token sets claims of “authz: scopes” and “authz: client_id” as the authorization information. That is, a scope list that indicates resources that the resource server A 120 permits to acquire is set as “authz: scopes”. Further, “authz: client_id” representing the ID of the client accessing the resource server A 120 is set as “authz: client_id”. Further, a device serial number for identifying the client terminal 140 is set as “ext: dev-serial”, and an application ID for identifying the resource service cooperation application 342 is set as “ext: appid”. Details will be described later. The JWS is used not only for the access token but also when the client terminal 140 issues a token issuance request to the authentication and authorization server A110 and the authentication and authorization server B111. At this time, the value to be stored in each claim is the same as the JWS access token.

実施例1の表1で示されたような内容のJWSアクセストークンを発行する認証認可サーバーA110は、表1のクレームをJWTの仕様であるRFC7519によりJSONとしてエンコードする。また、JWSの仕様であるRFC7515のコンパクトシリアライゼーション仕様に従ってデジタル署名されたコンテンツ(表1のクレームのJSON表現、すなわちJWSペイロード)をコンパクトなURL−safe文字列として表現符号化する。本実施例のJWSアクセストークンは、JWSコンパクトシリアライゼーション仕様に従い、エンコード済JWSヘッダー、エンコード済JWSペイロード、およびエンコード済JWS署名を、この順序でピリオド(’.’)文字を区切り文字として連結した文字列である。   The authentication / authorization server A110 that issues the JWS access token having the contents shown in Table 1 of the first embodiment encodes the claims of Table 1 as JSON according to RFC7519 which is a specification of JWT. Further, the content (JSON expression of the claim in Table 1, ie, the JWS payload) digitally signed in accordance with the compact serialization specification of RFC7515 which is the specification of JWS is represented and encoded as a compact URL-safe character string. According to the JWS compact serialization specification, the JWS access token of this embodiment is a character string obtained by concatenating an encoded JWS header, an encoded JWS payload, and an encoded JWS signature in this order with a period ('.') Character as a delimiter. It is.

本実施例においては、JWSヘッダーとしてJWSの署名に使われる暗号アルゴリズムを識別する“alg”(アルゴリズム)を用いる。具体的に本実施例においては、“alg”として“RS256”(RSASSA−PKCS1_v1_5 using SHA−256)を用いる。“RS256”文字列は、algの値としてIANA JSON Web Signature and Encryption Algorithmsレジストリに登録されており、JSON Web Algorithms(JWA)仕様(RFC7518)のSection 3.1で定義されている。   In the present embodiment, "alg" (algorithm) for identifying the encryption algorithm used for the signature of the JWS is used as the JWS header. Specifically, in the present embodiment, “RS256” (RSASSA-PKCS1_v1_5 using SHA-256) is used as “alg”. The “RS256” character string is registered as an alg value in the IANA JSON Web Signature and Encryption Algorithms registry, and is defined in Section 3 of the JSON Web Algorithms (JWA) specification (RFC7518).

なお本実施例においてJWSの署名に使われる暗号アルゴリズム“RS256”で使用する秘密鍵、公開鍵の鍵ペアは、認証認可サーバーA110が予め生成しておいたものを使用する。またJWSの署名を検証する公開鍵はJWSアクセストークンを使用するリソースサーバーA120、121に予め配備しておく。リソースサーバーB121は認証認可サーバーA110と異なるセキュリティドメインに属するが、JWSアクセストークンを検証する公開鍵を保持する。このため、認証認可サーバーA110が発行したJWSアクセストークンでリソースサーバーA120が利用可能となる。   Note that in this embodiment, a key pair of a secret key and a public key used in the encryption algorithm “RS256” used for the signature of the JWS is generated in advance by the authentication / authorization server A110. A public key for verifying the signature of the JWS is provided in advance in the resource servers A 120 and 121 that use the JWS access token. The resource server B121 belongs to a security domain different from that of the authentication / authorization server A110, but holds a public key for verifying the JWS access token. Therefore, the resource server A120 can be used with the JWS access token issued by the authentication / authorization server A110.

次にJWSアクセストークン発行と検証の流れについて、図5を用いて説明する。図5は、JWSアクセストークン発行と検証のシーケンス図である。本実施例では、複数の認証認可サーバーとの通信を行う場合を表している。クライアント端末140が認証認可サーバーA110と認証認可サーバーB111の2つの認証認可サーバーと通信を行う。   Next, the flow of issuing and verifying a JWS access token will be described with reference to FIG. FIG. 5 is a sequence diagram of issuing and verifying a JWS access token. In this embodiment, a case where communication with a plurality of authentication / authorization servers is performed is shown. The client terminal 140 communicates with two authentication / authorization servers A110 and B111.

まず、クライアント端末140は認証認可サーバーA110に対して、トークン発行要求を行う(S501)。ここでトークン発行要求はJWTとして表現される。特にJWTクレーム“iat”(Issued At)にはクライアント端末140のクライアント日時が使用される。クライアント日時は、RTC239を基に算出される値であっても良いし、CPU231が独自にカウントアップする日時情報を基に算出しても良い。   First, the client terminal 140 issues a token issue request to the authentication / authorization server A110 (S501). Here, the token issuance request is expressed as JWT. In particular, the client date and time of the client terminal 140 is used for the JWT claim “iat” (Issued At). The client date and time may be a value calculated based on the RTC 239, or may be calculated based on date and time information that the CPU 231 independently counts up.

認証認可サーバーA110は、クライアント端末140から受信したトークン発行要求が正規のものか、または有効期限が切れていないか、などの検証を行う(S502)。認証認可サーバーA110は、有効期限について、“exp”(Expiration Time)、“nbf”(Not Before)、“iat”(Issued At)クレームが有効かどうかを確認することによって判定する。具体的には、JWT発行日時である“iat”が、認証認可サーバーA110の持つサーバー日時と比較し誤差が一定以内、例えば±30秒、かどうかによって判定する。この、日時の検証処理によってリプレイ攻撃に対する耐性を高めることが出来る。   The authentication / authorization server A 110 verifies whether the token issuance request received from the client terminal 140 is valid or has not expired (S502). The authentication / authorization server A110 determines the expiration date by confirming whether the “exp” (Expiration Time), “nbf” (Not Before), and “iat” (Issued At) claims are valid. Specifically, the JWT issuance date / time “iat” is compared with the server date / time of the authentication / authorization server A 110 to determine whether the error is within a certain range, for example, ± 30 seconds. By performing the date and time verification processing, it is possible to increase the resistance to the replay attack.

次に、認証認可サーバーA110は、リソースサーバーA120で有効なJWSアクセストークンの発行処理を行う(S503)。クライアント端末140はS503にて発行されたJWSアクセストークンを受信する。   Next, the authentication / authorization server A110 issues a valid JWS access token in the resource server A120 (S503). The client terminal 140 receives the JWS access token issued in S503.

さらに、図5には別の認証認可サーバーB111からJWSアクセストークンを取得する流れが記載されている。トークン発行要求の送信処理S504は、発行要求に署名する秘密鍵が異なる以外は認証認可サーバーAに対するトークン発行要求の送信処理S501と同じ処理となる。同様にトークン発行処理S506は、認証処理サーバーAが行うトークン発行処理S503と同じ処理となる。   Further, FIG. 5 shows a flow of acquiring a JWS access token from another authentication / authorization server B111. The transmission process S504 of the token issuance request is the same as the transmission process S501 of the token issuance request to the authentication / authorization server A except that the secret key for signing the issuance request is different. Similarly, the token issuing process S506 is the same as the token issuing process S503 performed by the authentication processing server A.

クライアント端末140は認証認可サーバーAから取得したJWSアクセストークン、および認証認可サーバーBから取得したJWSアクセストークンを用いることで、異なるリソースサーバーにリソース要求を行う(S507)。クライアント端末140とリソースサーバー間の処理は図4と同等のため、ここでは省略する。このように、図5は、クライアント端末140が任意のタイミングで、複数の認証認可サーバーと通信出来ることを示している。   The client terminal 140 makes a resource request to a different resource server by using the JWS access token obtained from the authentication / authorization server A and the JWS access token obtained from the authentication / authorization server B (S507). The processing between the client terminal 140 and the resource server is the same as in FIG. As described above, FIG. 5 shows that the client terminal 140 can communicate with a plurality of authentication / authorization servers at an arbitrary timing.

図5ではクライアント端末140のクライアント日時、および認証認可サーバーA110と認証認可サーバーB111それぞれの持つサーバー日時の同期が取れており、JWT検証処理S502、S505で日時に関する検証が成功する場合を示した。一方で、これらのクライアントサーバ間で日時の同期が取れていないことも考えられる。そこで、クライアント端末140のクライアント日時が絶対日時と同期が取れていない場合の一例について、図6を用いて説明する。   FIG. 5 shows a case where the client date and time of the client terminal 140 and the server date and time of each of the authentication / authorization server A 110 and the authentication / authentication server B 111 are synchronized, and the verification regarding the date and time is successful in the JWT verification processing S502 and S505. On the other hand, the date and time may not be synchronized between these client servers. An example in which the client date and time of the client terminal 140 is not synchronized with the absolute date and time will be described with reference to FIG.

まず、クライアント端末140は認証認可サーバーA110に対して1回目のトークン発行要求を行う(S601)。この1回目のトークン発行要求は図5のトークン発行要求(S501)と同様の処理であるため、詳細は省略する。   First, the client terminal 140 issues a first token issuance request to the authentication / authorization server A110 (S601). This first token issuance request is the same as the token issuance request (S501) in FIG.

次に認証認可サーバーA110は、S601にて受信したトークン発行要求の正当性検証を行う(S602)。ここで、クライアント端末140のクライアント日時と認証認可サーバーA110のサーバー日時間に差異があると仮定しているため、JWT発行日時“iat”がサーバー日時に比べ既定の差異よりも大きいこととなる。認証認可サーバーA110は、JWT発行日時“iat”がサーバー日時に対して差異が大きすぎるため、クライアント端末140に対して、検証処理エラーを返す。認証認可サーバーA110は、クライアント端末140に対して、単にエラーを返すだけでなく、自身のサーバー日時も返すようにする。   Next, the authentication / authorization server A 110 verifies the validity of the token issuance request received in S601 (S602). Here, since it is assumed that there is a difference between the client date and time of the client terminal 140 and the server date and time of the authentication / authorization server A110, the JWT issue date and time "iat" is larger than the predetermined difference as compared with the server date and time. The authentication / authorization server A 110 returns a verification processing error to the client terminal 140 because the JWT issue date / time “iat” is too different from the server date / time. The authentication / authorization server A 110 not only returns an error but also returns its own server date and time to the client terminal 140.

クライアント端末140は、S602にて検証処理に失敗した旨を知ると共に、認証認可サーバーA110のサーバー日時を受信する。クライアント端末140は、受信したサーバー日時を自身のクライアント日時として設定する(S603)。クライアント日時の記憶先として、RAM232内に記憶しCPU231がカウントアップする方式でも良いし、RTC239に直接設定する方式であっても良い。   The client terminal 140 knows that the verification processing has failed in S602, and receives the server date and time of the authentication and authorization server A110. The client terminal 140 sets the received server date and time as its own client date and time (S603). As a storage destination of the client date and time, a method of storing the date and time in the RAM 232 and counting up by the CPU 231 may be used, or a method of directly setting the RTC 239 may be used.

続いて、クライアント端末140は認証認可サーバーA110に対して2回目のトークン発行要求を行う。2回目のトークン発行要求は、1回目のトークン発行要求と同様の処理であるが、発行要求に含めるJWT発行日時“iat”が、認証認可サーバーA110のサーバー日時基づくものである点が異なる。なお、2回目のトークン発行要求に用いられる内容は、単にJWT発行日時“iat”が異なるだけではなく、その他のクレームおよび署名結果が異なっても良い。   Subsequently, the client terminal 140 makes a second token issuance request to the authentication / authorization server A110. The second token issuance request is the same process as the first token issuance request, except that the JWT issuance date and time "iat" included in the issuance request is based on the server date and time of the authentication and authorization server A110. The contents used for the second token issuance request may not only differ from the JWT issuance date and time “iat”, but may also differ from other claims and signature results.

認証認可サーバーA110は、2回目のトークン発行要求に用いられたJWTの検証を行う(S604)。2回目のトークン発行要求に用いられたJWTのJWT発行日時“iat”は、自身のサーバー日時に基づくものであるから、検証に成功する。以降の処理、S605とS606は、図5のS503、S507と同様の処理であるから、詳細は省略する。   The authentication and authorization server A110 verifies the JWT used for the second token issuance request (S604). The JWT issuance date and time "iat" of the JWT used for the second token issuance request is based on its own server date and time, and thus the verification is successful. Subsequent processes, S605 and S606, are the same processes as S503 and S507 in FIG.

以上、図6の処理方式であれば、仮にクライアント端末140のクライアント日時に誤差がある場合であっても、クライアント日時が再び誤差が生じないとすれば、2回目以降のトークン発行要求でJWSアクセストークンが取得可能となる。   As described above, according to the processing method of FIG. 6, even if there is an error in the client date and time of the client terminal 140, if the client date and time does not cause an error again, the JWS access request is issued in the second and subsequent token issuing requests. Tokens can be obtained.

しかし、図6の方式を採用すると、複数の認証認可サーバーからJWSアクセストークンを取得する場合に、過剰なトークン発行要求を出してしまうという問題が発生する場合がある。問題となる場合の処理の一例を、図7を用いて説明する。図7では認証認可サーバーA110、認証認可サーバーB111のサーバー日時が絶対日時に対して誤差があるものとする。   However, when the method shown in FIG. 6 is adopted, a problem may occur that an excessive token issuance request is issued when acquiring a JWS access token from a plurality of authentication / authorization servers. An example of a process when a problem occurs will be described with reference to FIG. In FIG. 7, it is assumed that the server date and time of the authentication and authorization server A110 and the authentication and authorization server B111 have an error with respect to the absolute date and time.

クライアント端末140は、認証認可サーバーA110に対して1回目のトークン発行要求を行う。この処理は図6のS601、S602、S603の同様の処理である。このような、JWT検証処理S602に失敗し、認証認可サーバーA110がクライアント端末140に対して自身のサーバー日時を返す処理を、認証認可サーバーA110に対するトークン発行要求(S701)と呼ぶ。   The client terminal 140 makes a first token issuance request to the authentication / authorization server A110. This processing is the same processing as S601, S602, and S603 in FIG. Such processing in which the JWT verification processing S602 fails and the authentication / authorization server A110 returns its own server date and time to the client terminal 140 is referred to as a token issue request to the authentication / authorization server A110 (S701).

同様に、クライアント端末140は、認証認可サーバーB111に対しても1回目のトークン発行要求を行う。前提では認証認可サーバーB111のサーバー日時は絶対日時に対して誤差が無い。しかし、認証認可サーバーA110のサーバー日時を用いたクライアント日時設定処理S603によって、クライアント端末140のクライアント日時は誤差を持っている。そのため、認証認可サーバーBに対するトークン発行要求はJWT発行日時“iat”が原因でJWT検証処理(S602)に失敗する。その結果、クライアント端末140はクライアント日時として認証認可サーバーBから送られてきた日時を設定する。   Similarly, the client terminal 140 makes a first token issuance request to the authentication / authorization server B111. As a premise, the server date and time of the authentication / authorization server B111 has no error with respect to the absolute date and time. However, the client date and time of the client terminal 140 has an error due to the client date and time setting process S603 using the server date and time of the authentication and authorization server A110. Therefore, the token issuance request to the authentication / authorization server B fails in the JWT verification processing (S602) due to the JWT issuance date / time "iat". As a result, the client terminal 140 sets the date and time sent from the authentication and authorization server B as the client date and time.

続いて、クライアント端末140は再び認証認可サーバーA110にトークン発行要求を行う(S703)。この処理は、クライアント端末140のクライアント日時が認証認可サーバーB111と同期してしまっているため、誤差を含む認証認可サーバーB111のサーバー日時に基づいたJWT発行日時“iat”が原因でJWT検証処理S602エラーとなる。   Subsequently, the client terminal 140 issues a token issuance request to the authentication / authorization server A 110 again (S703). In this processing, since the client date and time of the client terminal 140 are synchronized with the authentication and authorization server B111, the JWT issuance date and time “iat” based on the server date and time of the authentication and authorization server B111 including the error causes the JWT verification processing S602. An error occurs.

以降は、タイミングによってはS703とS704が繰り返されることとなり、過剰なトークン発行要求を出してしまう恐れがある。過剰なトークン発行要求は認証認可サーバーの負荷を増大させることになり、パフォーマンス劣化および管理保守コストの増大に繋がる。   Thereafter, S703 and S704 are repeated depending on the timing, and there is a possibility that an excessive token issuance request may be issued. Excessive token issuance requests increase the load on the authentication and authorization server, leading to performance degradation and increased management and maintenance costs.

検証に成功するトークン発行要求処理(S705)は、図6の2回目のアクセストークン発行要求(S603)と同様の処理のため詳細は省略する。加えて、リソースサーバーとの通信処理(S706)は図6にあるリソースサーバーとの通信処理(S606)と同様のため詳細は省略する。   The token issuance request processing (S705) that succeeds in the verification is the same as the second access token issuance request (S603) in FIG. In addition, the communication process with the resource server (S706) is the same as the communication process with the resource server (S606) in FIG.

図7では1回目のトークン発行要求と2回目のトークン発行要求の間に他の処理が割り込める状態であった。しかし、1回目のトークン発行要求と2回目のトークン発行要求の間に、他の処理が割り込めないようにミューテックスロック等を行ったとしても、毎回サーバー日時取得のための余分なトークン発行要求を出してしまう問題は残る。   In FIG. 7, another process can be interrupted between the first token issue request and the second token issue request. However, even if a mutex lock or the like is performed between the first token issuance request and the second token issuance request so that other processing cannot be interrupted, an extra token issuance request is issued every time to obtain the server date and time. The problem remains.

以上、図7によって、単に認証認可サーバーから取得した日時をクライアント日時に設定するだけでは過剰なトークン発行要求を出してしまうという問題が発生する場合があることを示した。   As described above, FIG. 7 shows that simply setting the date and time acquired from the authentication and authorization server to the client date and time may cause an excessive token issue request.

このような余分なトークン発行要求を出さない方式を、図8を用いて説明する。図8は、図6と図7のJWSアクセストークン発行と検証の処理を踏襲している。その差異について説明する。まず、クライアント端末140が認証認可サーバーA110から取得したサーバー日時と自身のクライアント日時から日時オフセットを算出、および記憶する(S801)。クライアント端末140は同様の処理を認証認可サーバーB111に対しても行う(S802)。   A method of not issuing such an extra token issuance request will be described with reference to FIG. FIG. 8 follows the JWS access token issuance and verification processing of FIGS. 6 and 7. The difference will be described. First, the client terminal 140 calculates and stores a date / time offset from the server date / time acquired from the authentication / authorization server A 110 and its own client date / time (S801). The client terminal 140 performs the same processing for the authentication and authorization server B111 (S802).

これらの日時オフセット記憶処理は、認証認可サーバー連携クライアント341の管理する日時オフセット記憶領域344に記憶される。また、日時オフセット記憶領域344は単一の日時オフセットを記憶するものではなく、認証認可サーバーごとに日時オフセットを記憶する領域が確保される。すなわち、認証認可サーバーA110のサーバー日時に基づいて算出した日時オフセットと、認証認可サーバーB111のサーバー日時に基づいて算出した日時オフセットは互いに上書きされることなく、異なる領域に記憶される。また、各日時オフセットは認証認可サーバー毎に関連付けられて記憶される。日時オフセットは、返信されたサーバー日時からサーバー日時受信時のクライアント日時を差し引いた値とする。   These date / time offset storage processes are stored in the date / time offset storage area 344 managed by the authentication / authorization server cooperation client 341. The date and time offset storage area 344 does not store a single date and time offset, but secures an area for storing the date and time offset for each authentication and authorization server. That is, the date and time offset calculated based on the server date and time of the authentication and authorization server A110 and the date and time offset calculated based on the server date and time of the authentication and authorization server B111 are stored in different areas without being overwritten each other. Each date and time offset is stored in association with each authentication / authorization server. The date and time offset is a value obtained by subtracting the client date and time when the server date and time is received from the returned server date and time.

さらに別の差異として、クライアント端末140は、認証認可サーバーA110に対する2回目のトークン発行要求を行う前に、トークン発行要求に含まれるJWT発行日時“iat”クレームの値の推定を行う(S803)。同様に、クライアント端末140は、認証認可サーバーB111に対する2回目のトークン発行要求前にJWT発行日時“iat”クレームの値の推定を行う(S804)。JWT作成日時推定処理(S803,S804)は、S801およびS802の日時オフセット記憶処理で記憶した日時オフセットに、クライアント端末140のクライアント日時を足すことによって、JWT作成日時を推定する。   As yet another difference, the client terminal 140 estimates the value of the JWT issue date / time "iat" claim included in the token issue request before making the second token issue request to the authentication / authorization server A110 (S803). Similarly, the client terminal 140 estimates the value of the JWT issue date and time "iat" claim before the second token issuance request to the authentication / authorization server B111 (S804). The JWT creation date and time estimation processing (S803, S804) estimates the JWT creation date and time by adding the client date and time of the client terminal 140 to the date and time offset stored in the date and time offset storage processing of S801 and S802.

2回目のトークン発行要求(S603)は、図6の処理と同等のため詳細を省略する。同様に、リソースサーバーとの通信処理(S805)も図6の処理と同等のため詳細を省略する。以上、図8のJWSアクセストークン発行と検証の処理によれば、1回目と2回目のトークン発行要求の間に、別の認証認可サーバー向けのトークン発行処理が割り込んだとしても、サーバー日時取得のための要求を高々1回に抑えることができる。   The second token issuance request (S603) is the same as the processing in FIG. Similarly, the communication processing with the resource server (S805) is the same as the processing in FIG. As described above, according to the JWS access token issuance and verification processing of FIG. 8, even if the token issuance processing for another authentication / authorization server is interrupted between the first and second token issuance requests, the server date and time can be obtained. Requests can be suppressed at most once.

なお、図8の例では、認証認可サーバーA110、認証認可サーバーB111ともトークン発行要求に対する応答としてサーバー日時を送信しているが、トークン発行要求の検証に成功した場合は図5のS503およびS506に示す通りJWSアクセストークンを送信する。その場合、クライアント端末140は日時オフセットを算出し、記憶することは行わない。2回目以降のトークン発行要求を行う場合、日時オフセットが記憶されていない場合は図5に示す通りクライアント端末140に設定されている日時を利用し、日時オフセットが記憶されている場合はJWT作成日時推定処理を行う。なお、2回目以降のトークン発行要求は、JWSアクセストークンの有効期限が切れた場合に行われる。   Note that, in the example of FIG. 8, both the authentication and authorization server A110 and the authentication and authorization server B111 transmit the server date and time as a response to the token issuance request, but if the token issuance request is successfully verified, the process proceeds to S503 and S506 in FIG. Transmit the JWS access token as shown. In that case, the client terminal 140 does not calculate and store the date and time offset. When the second and subsequent token issuance requests are made, if the date and time offset is not stored, the date and time set in the client terminal 140 is used as shown in FIG. 5, and if the date and time offset is stored, the JWT creation date and time are used. Perform estimation processing. Note that the second and subsequent token issuance requests are made when the JWS access token has expired.

図9を用いて、図8で説明したJWSアクセストークン発行と検証の処理のフローについて、実際の日時の値を用いて動作を具体的に説明する。図9ではクライアント端末140と、各認証認可サーバーの日時、および時間経過を表すために、3つの時間的なスナップショットを記載している。より正確に言えば、認証認可サーバーにリクエストを出してからレスポンスが到着するまでには時間経過が発生する。しかし、図9では、時間経過が無視できる程度に短いものとして考慮していない。ただし、例えばリクエストが到着するまで数百ミリ秒といった、時間経過が無視できない場合には、リクエスト送信直前のクライアント日時とレスポンス受信時点のクライアント日時の平均値を、2回目のトークン発行要求に使用してもよい。また、図9の例ではJWT発行日時“iat”と認証認可サーバーのサーバー日時間の誤差が30秒を超える場合にエラーを返すものとする。   With reference to FIG. 9, the operation of the JWS access token issuance and verification processing flow described in FIG. 8 will be specifically described using actual date and time values. In FIG. 9, three temporal snapshots are shown in order to represent the date and time of the client terminal 140 and each authentication / authorization server, and the lapse of time. More precisely, a time elapses from when a request is issued to the authentication / authorization server until a response arrives. However, FIG. 9 does not consider that the passage of time is negligibly short. However, if the elapsed time cannot be ignored, for example, several hundred milliseconds until the request arrives, the average value of the client date and time immediately before sending the request and the client date and time at the time of receiving the response is used for the second token issue request. You may. In the example of FIG. 9, an error is returned if the error between the JWT issue date and time "iat" and the server date and time of the authentication and authorization server exceeds 30 seconds.

まず、スナップショット1の状態の処理について説明する。クライアント端末140は、認証認可サーバーA110に対して1回目のトークン発行要求を出す(S901)。この時、クライアント端末140は、サーバーA用日時オフセットが設定されていないことから、認証リクエストS901に含まれるJWT発行日時“iat”に、クライアント日時[12:00:50]を設定する(S901)。   First, the processing of the state of the snapshot 1 will be described. The client terminal 140 issues a first token issuance request to the authentication / authorization server A110 (S901). At this time, since the date and time offset for server A is not set, the client terminal 140 sets the client date and time [12:00:50] in the JWT issue date and time “iat” included in the authentication request S901 (S901). .

次に、認証認可サーバーA110はクライアント端末140から受信したリクエストに含まれるJWTの検証を行う。サーバーA日時[12:01:30]とJWT発行日時“iat”に設定された日時[12:00:50]間には40秒の差異があり規定の秒数を超えるため、認証認可サーバーAはエラーとして認証レスポンスを返信する(S902)。この時、認証認可サーバーAは認証レスポンスに自身のサーバー日時[12:01:30]を含める。   Next, the authentication / authorization server A 110 verifies the JWT included in the request received from the client terminal 140. Since there is a difference of 40 seconds between the server A date and time [12:01:30] and the date and time [12:00:50] set in the JWT issue date and time “iat”, which exceeds the specified number of seconds, the authentication and authorization server A Returns an authentication response as an error (S902). At this time, the authentication / authorization server A includes its own server date and time [12:01:30] in the authentication response.

クライアント端末140は、S902にて受信した認証レスポンスのサーバー日時[12:01:30]と自身のクライアント日時[12:00:50]から日時オフセット[+00:00:40]を算出する。クライアント端末140は、算出した日時オフセット[+00:00:40]を認証認可サーバーA110に対応する日時オフセットである、サーバーA用日時オフセットとして格納する。ここで、サーバーA用日時オフセットは日時オフセット記憶領域344内に記憶されるものとする。   The client terminal 140 calculates a date / time offset [+00: 00: 40] from the server date / time [12:01:30] of the authentication response received in S902 and its own client date / time [12:00:50]. The client terminal 140 stores the calculated date / time offset [+00: 00: 40] as the date / time offset for server A, which is the date / time offset corresponding to the authentication / authorization server A110. Here, it is assumed that the date and time offset for server A is stored in the date and time offset storage area 344.

続いて、スナップショット1から40秒経過後のスナップショット2における処理の流れについて説明する。スナップショット2ではクライアント端末140が認証認可サーバーA110に対して2回目のトークン発行要求を出す前に、認証認可サーバーB111に対して通信しようとする状態を表している。   Next, the flow of processing in snapshot 2 after a lapse of 40 seconds from snapshot 1 will be described. Snapshot 2 shows a state in which the client terminal 140 attempts to communicate with the authentication / authorization server B111 before issuing a second token issuing request to the authentication / authorization server A110.

クライアント端末140は、認証認可サーバーBに対して、サーバーB用日時オフセットが未設定であることからJWT発行日時“iat”に自身のクライアント日時[12:01:30]とした認証リクエストを送信する(S904)。   Since the date and time offset for server B has not been set, the client terminal 140 transmits an authentication request with its client date and time [12:01:30] to the JWT issue date and time “iat” because the date and time offset for server B has not been set. (S904).

認証認可サーバーB111は、受信した認証リクエスト内のJWT発行日時“iat”[12:01:30]と自身のサーバー日時[12:02:50]との間に、差異が80秒あることを確認する。その結果、既定の秒数を超えるため、エラーとして認証レスポンスをクライアント端末140に返信する(S905)。   The authentication / authorization server B111 confirms that there is a difference of 80 seconds between the JWT issue date / time “iat” [12:01:30] and the server date / time [12:02:50] in the received authentication request. I do. As a result, since the number of seconds exceeds the predetermined number of seconds, an authentication response is returned to the client terminal 140 as an error (S905).

クライアント端末140は認証レスポンスに含まれる認証レスポンスのサーバー日時[12:02:50]と自身のクライアント日時[12:01:30]から日時オフセット[+00:01:20]を算出する。クライアント端末140は、算出した日時オフセット[+00:00:40]を認証認可サーバーA110に対応する日時オフセットである、サーバーB用日時オフセットとして日時オフセット記憶領域344に格納する。   The client terminal 140 calculates a date / time offset [+00: 01: 20] from the server date / time [12:02:50] of the authentication response included in the authentication response and its own client date / time [12:01:30]. The client terminal 140 stores the calculated date / time offset [+00: 00: 40] in the date / time offset storage area 344 as a date / time offset for server B, which is a date / time offset corresponding to the authentication / authorization server A110.

スナップショット3では、クライアント端末140が認証認可サーバーAに対して2回目のトークン発行要求を行う(S908)。クライアント端末140はS908で送信する認証リクエスト内のJWT発行日時“iat”の算出のためにJWT作成日時推定処理S803を行う(S907)。具体的にはクライアント端末140のクライアント日時[12:02:10]に送信対象となるサーバーA用の日時オフセット[+00:00:40]を加算することで、JWT作成推定日時[12:02:50]を得る。   In the snapshot 3, the client terminal 140 makes a second token issuance request to the authentication / authorization server A (S908). The client terminal 140 performs JWT creation date / time estimation processing S803 to calculate the JWT issue date / time “iat” in the authentication request transmitted in S908 (S907). Specifically, by adding the date and time offset [+00: 00: 40] for the server A to be transmitted to the client date and time [12:02:10] of the client terminal 140, the JWT creation estimated date and time [12:02: 50].

認証認可サーバーA110は、S908にて送信された認証リクエストを受信し、認証リクエスト内のJWT発行日時“iat”と自身のサーバー日時を比較する。ここでは、JWT発行日時“iat”[12:02:50]と自身のサーバー日時[12:02:50]に差はないことから、JWT検証処理S604は成功する。   The authentication authorization server A110 receives the authentication request transmitted in S908, and compares the JWT issuance date and time “iat” in the authentication request with its own server date and time. Here, since there is no difference between the JWT issue date and time “iat” [12:02:50] and the server date and time [12:02:50] of the own device, the JWT verification process S604 succeeds.

認証認可サーバーA110はクライアント端末140に対してJWSアクセストークンを含む認証レスポンスを返信する(S909)。クライアント端末140はS909にて受信したJWSアクセストークンを使用することで、JWSアクセストークンのスコープに対応するリソースサーバーに対してリソース要求を行えるようになる。   The authentication / authorization server A 110 returns an authentication response including the JWS access token to the client terminal 140 (S909). By using the JWS access token received in S909, the client terminal 140 can make a resource request to the resource server corresponding to the scope of the JWS access token.

また、本実施例ではJWSアクセストークン取得に係る処理を記載した。しかし、JWSアクセストークン取得に係る処理だけではなく、認証認可サーバーに対してJWT発行日時“iat”を含むJWTを送信する他の処理についても同様の方法を適用してもよい。例えばOAuth2.0のクライアントのクライアントIDおよびクライアントシークレットを、認証認可サーバーが発行する場合、JWT発行日時“iat”の検証処理は、JWSアクセストークン発行と同様に行う。このクライアントIDおよびクライアントシークレット発行時に同様の方式を適用してもよい。   In this embodiment, the processing related to the acquisition of the JWS access token has been described. However, the same method may be applied not only to the processing relating to the acquisition of the JWS access token but also to other processing of transmitting the JWT including the JWT issue date / time “iat” to the authentication / authorization server. For example, when the client ID and client secret of the OAuth 2.0 client are issued by the authentication / authorization server, the verification processing of the JWT issuance date and time “iat” is performed in the same manner as the JWS access token issuance. A similar method may be applied when issuing the client ID and the client secret.

以上より、クライアント端末140は、複数の認可サーバーと通信する場合に、認可サーバーとの日時オフセットをクライアント端末140が適切に管理し、認可サーバーへの日時取得のための問い合わせを最小限にすることが出来る。結果、パフォーマンス劣化とサーバー負荷を低減することが出来る。   As described above, when the client terminal 140 communicates with a plurality of authorization servers, the client terminal 140 appropriately manages the date and time offset with the authorization server, and minimizes queries to the authorization server for date and time acquisition. Can be done. As a result, performance degradation and server load can be reduced.

[実施例2]
実施例1において、複数の認可サーバーと通信する場合に、認可サーバーの日時をクライアント端末140が個別に管理することで、日時取得のための問い合わせを最小限にする方法を示した。
[Example 2]
In the first embodiment, when communicating with a plurality of authorization servers, a method has been described in which the client terminal 140 individually manages the date and time of the authorization server, thereby minimizing inquiries for obtaining the date and time.

実施例1の方式では、日時取得のための問い合わせが、認証認可サーバーの日時に追加の誤差が発生しなければ、高々1回で済む。ところで、同じ地域のデータセンターや同じLAN内に存在する認証認可サーバーは、似通った日時同期、例えば同じNTPサーバーに同期、を行っている可能性が高い。しかし、実施例1の方式では、このような場合でも、クライアント日時またはサーバー日時に差異があった場合は、最低でも1回、日時取得のための問い合わせをしてしまう。   In the method according to the first embodiment, the query for obtaining the date and time can be performed at most once if no additional error occurs in the date and time of the authentication and authorization server. By the way, it is highly likely that authentication / authorization servers existing in a data center in the same area or in the same LAN perform similar date and time synchronization, for example, synchronization with the same NTP server. However, in the method of the first embodiment, even in such a case, if there is a difference between the client date and time or the server date and time, an inquiry for date and time acquisition is made at least once.

図10を用いて、このような課題を解決するための、グルーピングを伴うJWSアクセストークン発行と検証について説明する。なお、説明を省略する部分については実施例1と同様の構成である。   With reference to FIG. 10, JWS access token issuance and verification involving grouping for solving such a problem will be described. Note that the configuration of which the description is omitted is the same as that of the first embodiment.

まず、クライアント端末140は、自身が通信する予定の認証認可サーバー群を、特定の特徴に基づいてグルーピングし、その結果を初期グループとする(S1001)。初期グループ決定処理S1001について図11を用いて詳細に説明する。クライアント端末140は、グルーピングの済んでいる認証認可サーバーがあるかチェックする(S1101)。もしグルーピングが未決定の認証認可サーバーがあった場合、S1102に遷移する。一方で全ての認証認可サーバーのグルーピングが終わった場合、繰り返し処理を抜け、本処理から戻る。   First, the client terminal 140 groups the authentication / authorization server group that it intends to communicate with based on specific characteristics, and sets the result as an initial group (S1001). The initial group determination processing S1001 will be described in detail with reference to FIG. The client terminal 140 checks whether there is an authentication / authorization server that has been grouped (S1101). If there is an authentication / authorization server for which grouping has not been determined, the process proceeds to S1102. On the other hand, when the grouping of all the authentication / authorization servers is completed, the processing exits from the repetition processing and returns to the present processing.

クライアント端末140は、既にグループが存在するかチェックする。もし既にグループが作られていた場合S1103に遷移する。一方で、まだグループが作られていなかった場合S1104に遷移する(S1102)。   The client terminal 140 checks whether a group already exists. If a group has already been created, the process proceeds to S1103. On the other hand, if a group has not been created yet, the process transits to S1104 (S1102).

クライアント端末140は、グルーピング対象の認証認可サーバーが、既に決定済みのグループと共通の特徴を持つかどうか判定する。ここで特定の特徴とは、例えばトークン発行要求の際に送信するJWTの署名用証明書が共通である、および/またはFQDNの親ドメインが共通するかどうかなどを特徴としている。それらが共通する認証認可サーバー同士は同じグループとなる。もし、クライアント端末140が共通の特徴を持つグループがあると判定した場合、S1105に遷移する。一方で、共通の特徴を持つグループが無いと判定した場合S1104に遷移する(S1103)。   The client terminal 140 determines whether the authentication / authorization server to be grouped has the same characteristics as the already determined group. Here, the specific feature is, for example, whether the signature certificate of the JWT transmitted at the time of the token issuance request is common and / or whether the parent domain of the FQDN is common. Authentication / authorization servers that share them are in the same group. If the client terminal 140 determines that there is a group having common characteristics, the process proceeds to S1105. On the other hand, when it is determined that there is no group having the common feature, the process proceeds to S1104 (S1103).

クライアント端末140は、S1103にて共通の特徴を持つグループがあると判定した場合、該グループにグルーピング中の認可認証サーバーを追加する(S1105)。クライアント端末140は、S1102、S1103のいずれにも該当しなかった場合、グルーピング中の認証認可サーバーを唯一のサーバーとする、新規グループを作成する(S1104)。   If the client terminal 140 determines in step S1103 that there is a group having common characteristics, the client terminal 140 adds an authorized authentication server being grouped to the group (S1105). If neither of S1102 and S1103 is satisfied, the client terminal 140 creates a new group in which the authentication / authorization server being grouped is the only server (S1104).

図10に戻り、クライアント端末140は初期グループ決定後、認証認可サーバーAにトークン発行要求を行う。図10では、認証認可サーバーA110および認証認可サーバーB111が同じグループに入ったものとする。また、発行要求S601および認証認可サーバーA110のJWT検証処理S602は既に説明済みのため詳細を省略する。   Referring back to FIG. 10, after the initial group is determined, the client terminal 140 issues a token issue request to the authentication / authorization server A. In FIG. 10, it is assumed that the authentication and authorization server A110 and the authentication and authorization server B111 are in the same group. Also, the issuance request S601 and the JWT verification processing S602 of the authentication / authorization server A110 have already been described, so that the details are omitted.

クライアント端末140は、認証認可サーバーA110のエラーレスポンスに含まれるサーバー日時とクライアント日時から日時オフセットを算出する。クライアント端末140は算出した日時オフセットを認証認可サーバーA110の属するグループに対応する日時オフセット記憶領域344に記録する(S1002)。   The client terminal 140 calculates a date / time offset from the server date / time and the client date / time included in the error response of the authentication / authorization server A110. The client terminal 140 records the calculated date / time offset in the date / time offset storage area 344 corresponding to the group to which the authentication / authorization server A110 belongs (S1002).

続いてクライアント端末140は、認証認可サーバーB111に対して、1回目のトークン発行要求を行う。ここで、クライアント端末140は、トークン発行要求に含まれるJWT発行日時“iat”に、認証認可サーバーB111の属するグループに対応する日時オフセット記憶領域344から取得した日時オフセットを設定する(S1003)。   Subsequently, the client terminal 140 makes a first token issuance request to the authentication / authorization server B111. Here, the client terminal 140 sets the date / time offset acquired from the date / time offset storage area 344 corresponding to the group to which the authentication / authorization server B111 belongs, in the JWT issue date / time “iat” included in the token issue request (S1003).

前提として認証認可サーバーA110と認証認可サーバーB111は、初期グループ決定処理S1001にて同じグループに属すと決定しているため、S1002では認証認可サーバーA110が返信したサーバー日時に基づく日時オフセットが使用される。ここで、認証認可サーバーA110と認証認可サーバーB111のサーバー日時が同期しているかどうかに依存して、2つのフローに分かれる。もし、JWT発行日時“iat”とサーバー日時の差異が既定時間内である場合、認証認可サーバーB111はJWT検証処理S602で検証に成功するためJWSアクセストークンを返却する。   As a premise, since the authentication / authorization server A110 and the authentication / authorization server B111 have determined that they belong to the same group in the initial group determination processing S1001, a date / time offset based on the server date / time returned by the authentication / authorization server A110 is used in S1002. . Here, the flow is divided into two flows depending on whether or not the server date and time of the authentication and authorization server A110 and the authentication and authorization server B111 are synchronized. If the difference between the JWT issue date / time “iat” and the server date / time is within the predetermined time, the authentication / authorization server B111 returns the JWS access token because the verification is successful in the JWT verification process S602.

一方で、JWT発行日時“iat”とサーバー日時の差異が既定時間外だった場合、認証認可サーバーB111はJWT検証処理S602にて、JWT発行日時“iat”が原因で検証に失敗する。クライアント端末140は、受信したエラーレスポンスに含まれるサーバー日時と自身のクライアント日時から日時オフセットを算出する。この時、既に存在するグループに対応する日時オフセットの中で、算出した日時オフセットと最も日時オフセットの値が近いものを探す。   On the other hand, if the difference between the JWT issue date / time “iat” and the server date / time is outside the predetermined time, the authentication / authorization server B111 fails the verification in the JWT validation process S602 due to the JWT issue date / time “iat”. The client terminal 140 calculates a date and time offset from the server date and time included in the received error response and its own client date and time. At this time, among the date / time offsets corresponding to the already existing groups, the one with the closest date / time offset value to the calculated date / time offset is searched.

最も値が近かった日時オフセットと、算出した日時オフセットの値の差異が最大誤差時間以下だった場合、クライアント端末140は最も値が近かった日時オフセットに対応するグループに認証認可サーバーB111を追加する。すなわち、元々は認証認可サーバーA110のグループに属していた認証認可サーバーB111のグループが変更される。   If the difference between the date and time offset with the closest value and the calculated date and time offset is less than or equal to the maximum error time, the client terminal 140 adds the authentication and authorization server B111 to the group corresponding to the date and time offset with the closest value. That is, the group of the authentication and authorization server B111 that originally belonged to the group of the authentication and authorization server A110 is changed.

追加すべきグループが無かった場合、クライアント端末140は、認証認可サーバーB111を唯一含む、新規のグループを作成する。ここで、最大誤差時間は既定の定数であってもよいし、認証認可サーバーのJWT検証処理(S602)にて判定に用いられるJWT発行日時“iat”とサーバー日時の許容誤差時間であってもよい。   If there is no group to be added, the client terminal 140 creates a new group including only the authentication and authorization server B111. Here, the maximum error time may be a predetermined constant, or may be an allowable error time between the JWT issue date and time “iat” and the server date and time used for the determination in the JWT verification process (S602) of the authentication and authorization server. Good.

次に、図12を用いて図10で説明したJWSアクセストークン発行と検証の処理のフローについて、実際の日時と値を用いて、動作を具体的に説明する。図12では、初期には異なるグループに属する認証認可サーバー群が、実際の通信で動的に1つのグループに合成される例を示す。前提として、認証認可サーバーA110はグループAに属し、認証認可サーバーB111はグループBに属し、かつ認証認可サーバーA110と認証認可サーバーB111は互いに同期が取れており、クライアント日時のみ同期が取れていないものとする。   Next, the operation of the JWS access token issuance and verification processing flow described in FIG. 10 with reference to FIG. 12 will be specifically described using actual date and time and values. FIG. 12 shows an example in which the authentication / authorization server groups belonging to different groups are initially dynamically combined into one group in actual communication. As a premise, the authentication / authorization server A110 belongs to group A, the authentication / authorization server B111 belongs to group B, and the authentication / authorization server A110 and the authentication / authorization server B111 are synchronized with each other, and not synchronized only with the client date and time. And

スナップショット1においてS901、S902は図9と同一の処理のため詳細を省略する。クライアント端末140は、クライアント日時[12:00:50]とS902にて返信されたサーバー日時[12:01:30]から日時オフセット[+00:00:40]を算出する。クライアント端末140は、認証認可サーバーA110に対応するグループA用日時オフセットとして日時オフセット[+00:00:40]を記憶する(S1201)。   In snapshot 1, S901 and S902 are the same as those in FIG. The client terminal 140 calculates a date / time offset [+00: 00: 40] from the client date / time [12:00:50] and the server date / time [12:01:30] returned in S902. The client terminal 140 stores the date / time offset [+00: 00: 40] as the date / time offset for group A corresponding to the authentication / authorization server A110 (S1201).

続いてスナップショット2では、クライアント端末140が、認証認可サーバーB111に対してトークン発行要求を行う。前提として認証認可サーバーA110と認証認可サーバーB111は同じサーバー日時となっているため、JWT検証処理(S602)は失敗する。結果、認証認可サーバーB111はエラーレスポンスと共に自身のサーバー日時をクライアント端末140に返信する。   Subsequently, in snapshot 2, the client terminal 140 issues a token issue request to the authentication / authorization server B111. As a premise, since the authentication and authorization server A110 and the authentication and authorization server B111 have the same server date and time, the JWT verification processing (S602) fails. As a result, the authentication / authorization server B 111 returns its server date and time to the client terminal 140 together with an error response.

クライアント端末140は、返信されたサーバー日時と自身のクライアント日時から日時オフセットを算出し、最も近しいかつ、差異が最大誤差時間以下のグループ用日時オフセットを持つグループを探す。図12では前提として認証認可サーバーA110と認証認可サーバーB111は同じサーバー日時となっているため、グループA用日時オフセットが該当する。   The client terminal 140 calculates a date / time offset from the returned server date / time and its own client date / time, and searches for a group that is closest and has a date / time offset for a group whose difference is equal to or less than the maximum error time. In FIG. 12, since the authentication and authorization server A110 and the authentication and authorization server B111 have the same server date and time, the date and time offset for group A corresponds.

クライアント端末140は、該当したグループAに認証認可サーバーB111を移動させ、空となったグループBは削除する(S1202)。   The client terminal 140 moves the authentication / authorization server B111 to the corresponding group A, and deletes the empty group B (S1202).

スナップショット3では、クライアント端末140が認証認可サーバーBに対して2回目のトークン発行要求を行う。認証認可サーバーBの対応付けは、グループBからグループAに移動したため、クライアント端末140はグループA用日時オフセット[+00:00:40]と自身のクライアント日時[12:01:30]からJWT作成推定日時[12:02:50]を得る(S1203)。   In the snapshot 3, the client terminal 140 makes a second token issuance request to the authentication / authorization server B. Since the association of the authentication authorization server B has moved from the group B to the group A, the client terminal 140 estimates the JWT from the group A date / time offset [+00: 00: 40] and its own client date / time [12:01:30]. The date and time [12:02:50] is obtained (S1203).

その後、クライアント端末140はS1203で取得したJWT作成推定日時[12:02:50]を用いて2回目のトークン発行要求を行う。認証認可サーバーBはJWT検証処理(S602)にて、自身のサーバー日時[12:02:50]とクライアント端末140から受信した認証リクエストに含まれるJWT作成推定日時[12:02:50]が許容誤差日時以内であることからJWSアクセストークンを発行する。   Thereafter, the client terminal 140 makes a second token issuance request using the estimated JWT creation date and time [12:02:50] acquired in S1203. In the JWT verification processing (S602), the authentication authorization server B allows its own server date and time [12:02:50] and the estimated JWT creation date and time [12:02:50] included in the authentication request received from the client terminal 140. A JWS access token is issued because it is within the error date and time.

このように、初期グループ決定処理(S1001)で決定した初期グループに問題があった場合でも動的にグルーピングし直すことによって、日時同期が取れていると推測される認証認可サーバー群を同一のグループにすることが出来る。   In this way, even if there is a problem in the initial group determined in the initial group determination processing (S1001), the group is dynamically re-grouped, so that the authentication / authorization server groups that are assumed to be synchronized with the date and time are in the same group. It can be.

以上、実施例2によれば、初期に日時同期が取れていると推測されるサーバー群をグルーピングしグループに対応する日時オフセットを用いて日時を推定することで、不要な日時取得のための問い合わせを減らすことが出来る。さらに、動的にグルーピングをし続けることで環境の変化に応じて、適したグループ構成を維持することが出来る。   As described above, according to the second embodiment, by inquiring the unnecessary date and time acquisition by grouping the servers that are assumed to be initially synchronized with the date and estimating the date and time by using the date and time offset corresponding to the group. Can be reduced. Further, by continuing the grouping dynamically, it is possible to maintain an appropriate group configuration according to a change in the environment.

[その他の実施例]
本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施例の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
[Other Examples]
The present invention is also realized by executing the following processing. That is, software (program) for realizing the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program and reads the program. This is the process to be performed.

110 認証認可サーバーA
111 認証認可サーバーB
120 リソースサーバーA
121 リソースサーバーB
140 クライアント端末
110 Authentication / Authorization Server A
111 Authentication and authorization server B
120 Resource server A
121 Resource Server B
140 client terminal

Claims (10)

アクセストークンを発行することが可能な複数の認証認可サーバーと通信する情報処理装置であって、
前記情報処理装置に設定されている第1の日時を含むトークン発行要求を1つの認証認可サーバーに送信する送信手段と、
前記送信手段により送信された前記トークン発行要求に対する応答として、前記1つの認証認可サーバーに設定されている第2の日時を受信する受信手段と、
前記受信手段により受信された前記第2の日時と前記第1の日時とに基づき日時オフセットを算出し、前記1つの認証認可サーバーに関連付けて記憶する記憶手段と、を有し、
前記記憶手段は、前記複数の認証認可サーバーの夫々に対する日時オフセットを記憶することが可能であり、
前記送信手段は、前記複数の認証認可サーバーの何れか1つに対して2回目のトークン発行要求を送信する場合、前記記憶手段により記憶された日時オフセットの中から送信対象となる認証認可サーバーの日時オフセットを特定し、前記2回目のトークン発行要求には特定された前記日時オフセットから推定される第3の日時を含めて送信することを特徴とする情報処理装置。
An information processing device that communicates with a plurality of authentication / authorization servers capable of issuing an access token,
Transmitting means for transmitting a token issuance request including a first date and time set in the information processing apparatus to one authentication and authorization server;
Receiving means for receiving a second date and time set in the one authentication and authorization server as a response to the token issuance request transmitted by the transmitting means;
Storage means for calculating a date / time offset based on the second date / time and the first date / time received by the receiving means, and storing the date / time offset in association with the one authentication / authorization server;
The storage means can store a date and time offset for each of the plurality of authentication and authorization servers,
When transmitting the second token issuance request to any one of the plurality of authentication / authentication servers, the transmission unit transmits the authentication / authentication server to be transmitted from the date / time offset stored by the storage unit. An information processing apparatus, wherein a date and time offset is specified, and the second token issuance request is transmitted including a third date and time estimated from the specified date and time offset.
前記受信手段が受信する第2の日時は、前記1つの認証認可サーバーが前記第1の日時と前記第2の日時の誤差が一定以内ではないと判定した場合に送信される日時であることを特徴とする請求項1に記載の情報処理装置。   The second date and time received by the receiving means is a date and time transmitted when the one authentication and authorization server determines that an error between the first date and time and the second date and time is not within a certain range. The information processing apparatus according to claim 1, wherein: 前記受信手段は、前記1つの認証認可サーバーが前記トークン発行要求が正規な要求であり、かつ前記第1の日時と前記第2の日時の誤差が一定以内であると判定した場合に送信される前記アクセストークンを受信することを特徴とする請求項1または2に記載の情報処理装置。   The receiving means is transmitted when the one authentication / authorization server determines that the token issuance request is a legitimate request and that an error between the first date and time and the second date and time is within a certain value. The information processing device according to claim 1, wherein the access token is received. 前記記憶手段は、前記受信手段により前記アクセストークンを受信した場合、日時オフセットを記憶しないことを特徴とする請求項3に記載の情報処理装置。   4. The information processing apparatus according to claim 3, wherein the storage unit does not store a date and time offset when the access token is received by the receiving unit. 前記送信手段が前記複数の認証認可サーバーの何れか1つに対して2回目以降のトークン発行要求を送信する際、前記記憶手段により記憶された日時オフセットが記憶されていない場合、前記第1の日時を含むトークン発行要求を送信し、前記記憶手段により記憶された日時オフセットが記憶されている場合、前記第3の日時を含むトークン発行要求を送信することを特徴とする請求項1乃至4の何れか1項に記載の情報処理装置。   When the transmitting unit transmits a second or later token issuing request to any one of the plurality of authentication / authorization servers, if the date and time offset stored by the storage unit is not stored, the first The token issuance request including the third date and time is transmitted when the token issuance request including the date and time is transmitted and the date and time offset stored by the storage unit is stored. The information processing device according to claim 1. 前記複数の認証認可サーバーに含まれる夫々の認証認可サーバーをグルーピングするグルーピング手段を有し、
前記送信手段は、前記複数の認証認可サーバーの何れか1つに対して初めてトークン発行要求を送信する場合、前記記憶手段により記憶された日時オフセットの中から送信対象の認証認可サーバーが属するグループに対応する日時オフセットを特定し、前記トークン発行要求には特定された前記日時オフセットから推定される第3の日時を含めて送信することを特徴とする請求項1乃至5の何れか1項に情報処理装置。
Having grouping means for grouping each authentication and authorization server included in the plurality of authentication and authorization servers,
The transmitting means, when transmitting a token issuance request to any one of the plurality of authentication / authentication servers for the first time, selects a group to which the authentication / authentication server to be transmitted belongs from among the date / time offsets stored by the storage means. The information according to any one of claims 1 to 5, wherein a corresponding date / time offset is specified, and the token issuance request is transmitted including a third date / time estimated from the specified date / time offset. Processing equipment.
前記グルーピング手段は、共通の特徴を持つ認証認可サーバーを同じグループとしてグルーピングすることを特徴とする請求項6に記載の情報処理装置。   The information processing apparatus according to claim 6, wherein the grouping unit groups authentication and authorization servers having common features as the same group. 前記第3の日時は、前記第1の日時と前記日時オフセットとから算出した日時であることを特徴とする請求項1乃至7の何れか1項に記載の情報処理装置。   The information processing apparatus according to claim 1, wherein the third date and time is a date and time calculated from the first date and time and the date and time offset. アクセストークンを発行することが可能な複数の認証認可サーバーと通信する情報処理装置の制御方法であって、
前記情報処理装置に設定されている第1の日時を含むトークン発行要求を1つの認証認可サーバーに送信する送信ステップと、
前記送信ステップにおいて送信された前記トークン発行要求に対する応答として、前記1つの認証認可サーバーに設定されている第2の日時を受信する受信ステップと、
前記受信ステップにおいて受信された前記第2の日時と前記第1の日時とに基づき日時オフセットを算出し、前記1つの認証認可サーバーに関連付けて記憶する記憶ステップと、を含み、
前記記憶ステップでは、前記複数の認証認可サーバーの夫々に対する日時オフセットを記憶することが可能であり、
前記送信ステップでは、前記複数の認証認可サーバーの何れか1つに対して2回目のトークン発行要求を送信する場合、前記記憶ステップにおいて記憶された日時オフセットの中から送信対象となる認証認可サーバーの日時オフセットを特定し、前記2回目のトークン発行要求には特定された前記日時オフセットから推定される第3の日時を含めて送信することを特徴とする制御方法。
A method for controlling an information processing device that communicates with a plurality of authentication / authorization servers capable of issuing an access token,
Transmitting a token issuance request including a first date and time set in the information processing device to one authentication and authorization server;
A receiving step of receiving a second date and time set in the one authentication and authorization server as a response to the token issuance request transmitted in the transmitting step;
Storing a date / time offset based on the second date / time and the first date / time received in the receiving step, and storing the date / time offset in association with the one authentication / authorization server;
In the storing step, it is possible to store a date and time offset for each of the plurality of authentication and authorization servers,
In the transmitting step, when transmitting a second token issuing request to any one of the plurality of authentication / authentication servers, the authentication / authentication server to be transmitted is selected from the date / time offsets stored in the storage step. A control method comprising specifying a date and time offset, and transmitting the second token issuance request including a third date and time estimated from the specified date and time offset.
アクセストークンを発行することが可能な複数の認証認可サーバーと通信する情報処理装置の制御方法のプログラムであって、
前記情報処理装置に設定されている第1の日時を含むトークン発行要求を1つの認証認可サーバーに送信する送信ステップと、
前記送信ステップにおいて送信された前記トークン発行要求に対する応答として、前記1つの認証認可サーバーに設定されている第2の日時を受信する受信ステップと、
前記受信ステップにおいて受信された前記第2の日時と前記第1の日時とに基づき日時オフセットを算出し、前記1つの認証認可サーバーに関連付けて記憶する記憶ステップと、を含み、
前記記憶ステップでは、前記複数の認証認可サーバーの夫々に対する日時オフセットを記憶することが可能であり、
前記送信ステップでは、前記複数の認証認可サーバーの何れか1つに対して2回目のトークン発行要求を送信する場合、前記記憶ステップにおいて記憶された日時オフセットの中から送信対象となる認証認可サーバーの日時オフセットを特定し、前記2回目のトークン発行要求には特定された前記日時オフセットから推定される第3の日時を含めて送信することを特徴とするプログラム。
A program for a control method of an information processing device that communicates with a plurality of authentication and authorization servers capable of issuing an access token,
Transmitting a token issuance request including a first date and time set in the information processing device to one authentication and authorization server;
A receiving step of receiving a second date and time set in the one authentication and authorization server as a response to the token issuance request transmitted in the transmitting step;
Storing a date / time offset based on the second date / time and the first date / time received in the receiving step, and storing the date / time offset in association with the one authentication / authorization server;
In the storing step, it is possible to store a date and time offset for each of the plurality of authentication and authorization servers,
In the transmitting step, when transmitting a second token issuing request to any one of the plurality of authentication / authentication servers, the authentication / authentication server to be transmitted from the date / time offset stored in the storage step A program for identifying a date and time offset, and transmitting the second token issuance request including a third date and time estimated from the identified date and time offset.
JP2018131011A 2018-07-10 2018-07-10 Information processing device, control method, and program thereof Pending JP2020009259A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018131011A JP2020009259A (en) 2018-07-10 2018-07-10 Information processing device, control method, and program thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018131011A JP2020009259A (en) 2018-07-10 2018-07-10 Information processing device, control method, and program thereof

Publications (1)

Publication Number Publication Date
JP2020009259A true JP2020009259A (en) 2020-01-16

Family

ID=69151880

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018131011A Pending JP2020009259A (en) 2018-07-10 2018-07-10 Information processing device, control method, and program thereof

Country Status (1)

Country Link
JP (1) JP2020009259A (en)

Similar Documents

Publication Publication Date Title
JP6612358B2 (en) Method, network access device, application server, and non-volatile computer readable storage medium for causing a network access device to access a wireless network access point
JP7228977B2 (en) Information processing device, authorization system and verification method
US9608814B2 (en) System and method for centralized key distribution
US9215232B2 (en) Certificate renewal
JP6675163B2 (en) Authority transfer system, control method of authorization server, authorization server and program
JP2018163616A (en) Authentication authorization server, resource server, authentication approval system, authentication method and program
US9401911B2 (en) One-time password certificate renewal
US20100077208A1 (en) Certificate based authentication for online services
KR101405509B1 (en) Method and system for entity public key acquiring, certificate validation and authentication by introducing an online credible third party
US11444954B2 (en) Authentication/authorization server, client, service providing system, access management method, and medium
JP2017004301A (en) Authentication server system, method, program, and storage medium
EP3017582A1 (en) Method to enroll a certificate to a device using scep and respective management application
JP2016018507A (en) Data synchronization system, control method thereof, authorization server, and program thereof
JP2018092446A (en) Authentication approval system, information processing apparatus, authentication approval method, and program
US9635024B2 (en) Methods for facilitating improved user authentication using persistent data and devices thereof
US11165768B2 (en) Technique for connecting to a service
KR20210095093A (en) Method for providing authentification service by using decentralized identity and server using the same
JP2020035079A (en) System and data processing method
CA2969136A1 (en) Computer readable storage media for legacy integration and methods and systems for utilizing same
US10791119B1 (en) Methods for temporal password injection and devices thereof
JP2022528711A (en) Destination addressing associated with the distributed ledger
KR102372503B1 (en) Method for providing authentification service by using decentralized identity and server using the same
JP2020030759A (en) Authority transfer system, information processing apparatus, control method therefor, and program
JP2015505626A (en) Integrate server applications with many authentication providers
JP2020009259A (en) Information processing device, control method, and program thereof