[go: up one dir, main page]

JP2022148161A - Access control method and access control program - Google Patents

Access control method and access control program Download PDF

Info

Publication number
JP2022148161A
JP2022148161A JP2021049734A JP2021049734A JP2022148161A JP 2022148161 A JP2022148161 A JP 2022148161A JP 2021049734 A JP2021049734 A JP 2021049734A JP 2021049734 A JP2021049734 A JP 2021049734A JP 2022148161 A JP2022148161 A JP 2022148161A
Authority
JP
Japan
Prior art keywords
access
software
container
data table
name
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
JP2021049734A
Other languages
Japanese (ja)
Inventor
千裕 加藤
Chihiro Kato
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2021049734A priority Critical patent/JP2022148161A/en
Publication of JP2022148161A publication Critical patent/JP2022148161A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

【課題】ソフトウェアの種別ごとにDBへのアクセスを制限できるようにする。【解決手段】コンピュータは、管理対象ノード上に設けられた第1コンテナで実行されているソフトウェアに一時的に割り当てられたポート番号を送信元とするデータテーブルへのアクセス要求を、管理対象ノードから受信する。するとコンピュータは、管理対象ノード上に設けられた第2コンテナから、ポート番号に対応するソフトウェアを示すソフトウェア名を取得する。そしてコンピュータは、取得したソフトウェア名と、データテーブルに対するアクセスを許可する許可対象ソフトウェアを示す許可対象ソフトウェア名が設定された許可情報とに基づいて、アクセス要求に応じたデータテーブルへのアクセスの許否を決定する。【選択図】図8An object of the present invention is to restrict access to a database for each software type. Kind Code: A1 A computer sends an access request to a data table, which originates from a port number temporarily assigned to software running in a first container provided on a managed node, from the managed node. receive. The computer then acquires the software name indicating the software corresponding to the port number from the second container provided on the managed node. Then, the computer decides whether to permit access to the data table in response to the access request based on the obtained software name and permission information in which the permitted software name indicating the permitted software to be permitted to access the data table is set. decide. [Selection drawing] Fig. 8

Description

本発明は、アクセス制御方法、およびアクセス制御プログラムに関する。 The present invention relates to an access control method and an access control program.

アプリケーションソフトウェアなどの様々なソフトウェアを実行する動作環境では、各ソフトウェアからデータベース(DB:DataBase)内のデータへのアクセスを適切に制限することは非常に重要である。特に第三者から提供された秘密情報を扱う場合には、過失によって秘密情報を漏洩してしまうと大きな問題に発展する恐れがある。そのため、規定や規則によってこれを抑制するだけでなく、コンピュータシステム内でのアクセス制御機構によりアクセスを制限できることが求められる。 In an operating environment in which various types of software such as application software are executed, it is very important to appropriately restrict access from each software to data in a database (DB: DataBase). In particular, when dealing with confidential information provided by a third party, if the confidential information is leaked due to negligence, it may develop into a serious problem. Therefore, it is required not only to suppress this by regulations and rules, but also to be able to restrict access by an access control mechanism within the computer system.

なおアクセス制御の対象となるソフトウェアは、コンテナと呼ばれる仮想実行環境で実行される場合がある。ソフトウェアを実行するコンテナは、オーケストレーションツールと呼ばれる管理用ソフトウェアを用いて管理される。オーケストレーションツールにおいては、クラスタ内部のネットワーク機構を制御するためのソフトウェアが併用されることが多い。ネットワーク機構を制御するためのソフトウェアとしては、例えばサイドカープロキシと呼ばれる機構がある。代表的なものとしては、例えば、Envoyと呼ばれるOSS(Open Source Software)がある。 Software subject to access control may be executed in a virtual execution environment called a container. Containers that run software are managed using management software called orchestration tools. Orchestration tools often use software to control the network mechanism inside the cluster. As software for controlling the network mechanism, there is a mechanism called a sidecar proxy, for example. A typical example is OSS (Open Source Software) called Envoy.

サイドカープロキシでは、ソフトウェアのポート番号を用いて、ソフトウェアからDBへのアクセスの抑制などの制御を行うことができる。すなわちネットワークを介したDBへのアクセスの場合、各ソフトウェアには通信用のポート番号が割り振られる。ポート番号が固定的に決まっているソフトウェアであれば、アクセス要求のポート番号に基づいて、そのソフトウェアに関するDBへのアクセス制御を行うことができる。 The sidecar proxy can use the port number of software to perform control such as suppression of access from software to the DB. That is, in the case of accessing the DB via the network, each piece of software is assigned a communication port number. If the software has a fixed port number, it is possible to control access to the DB for that software based on the port number of the access request.

また、データ管理のソフトウェアである関係データベース管理システム(RDBMS:Relational DataBase Management System)においても、データへのアクセス制御の機構は存在する。RDBMSではユーザごとにアクセスの権限を設定し、その権限に従ってデータのアクセス可否を判断する。この権限はテーブル単位、行単位、列単位など、多数の粒度での設定が可能である。 Also in a relational database management system (RDBMS), which is data management software, there is a mechanism for controlling access to data. In the RDBMS, access authority is set for each user, and data access is determined according to the authority. This privilege can be set at many granularities, such as per table, per row, and per column.

コンテナを管理する技術としては、例えばコンテナ間で行われる通信の監視結果を用いて不正動作を検出できる監視システムが提案されている。 As a technique for managing containers, for example, a monitoring system has been proposed that can detect unauthorized behavior using the results of monitoring communications between containers.

特開2020-115358号公報JP 2020-115358 A

コンテナ上で実行されているソフトウェアには、データ送信を行う際に、その時点で未使用のポート番号を用いて通信を行うソフトウェアが多数存在する。このように、ポート番号が通信の度に異なるソフトウェアがネットワーク経由でDBにアクセスする場合、従来技術では、ポート番号から、アクセス要求の送信元のソフトウェアの種別を判別することができない。そのため、ソフトウェアの種別ごとにDBへのアクセスを制限することが困難である。 Among the software running on the container, there is a large amount of software that communicates using port numbers that are not in use at the time of data transmission. In this way, when software with a different port number for each communication accesses the DB via the network, the conventional technology cannot determine the type of software that has sent the access request from the port number. Therefore, it is difficult to restrict access to the DB for each software type.

1つの側面では、本件は、ソフトウェアの種別ごとにDBへのアクセスを制限できるようにすることを目的とする。 In one aspect, the object of this case is to be able to restrict access to a DB for each software type.

1つの案では、コンピュータによる以下のようなアクセス制御方法が提供される。
コンピュータは、管理対象ノード上に設けられた第1コンテナで実行されているソフトウェアに一時的に割り当てられたポート番号を送信元とするデータテーブルへのアクセス要求を、管理対象ノードから受信すると、管理対象ノード上に設けられた第2コンテナから、ポート番号に対応するソフトウェアを示すソフトウェア名を取得する。そしてコンピュータは、取得したソフトウェア名と、データテーブルに対するアクセスを許可する許可対象ソフトウェアを示す許可対象ソフトウェア名が設定された許可情報とに基づいて、アクセス要求に応じたデータテーブルへのアクセスの許否を決定する。
In one proposal, the following access control method by computer is provided.
When the computer receives from the managed node an access request to the data table whose transmission source is the port number temporarily assigned to the software running in the first container provided on the managed node, the computer A software name indicating software corresponding to the port number is obtained from the second container provided on the target node. Then, the computer decides whether to permit access to the data table in response to the access request based on the obtained software name and permission information in which the permitted software name indicating the permitted software to be permitted to access the data table is set. decide.

1態様によれば、ソフトウェアの種別ごとにDBへのアクセスを制限できるようになる。 According to one aspect, access to the DB can be restricted for each software type.

第1の実施の形態に係るアクセス制御方法の一例を示す図である。1 illustrates an example of an access control method according to a first embodiment; FIG. 第2の実施の形態のシステム構成の一例を示す図である。It is a figure which shows an example of the system configuration|structure of 2nd Embodiment. ノードのハードウェアの一例を示す図である。FIG. 3 is a diagram illustrating an example of hardware of a node; アプリケーションごとのDBへのアクセス管理の一例を示す図である。FIG. 4 is a diagram illustrating an example of access management to a DB for each application; DBへのアクセス制御に関する参考技術の第1の例を示す図である。FIG. 3 is a diagram showing a first example of reference technology regarding access control to a DB; DBへのアクセス制御に関する参考技術の第2の例を示す図である。FIG. 10 is a diagram showing a second example of reference technology regarding access control to a DB; アプリケーション単位でのアクセス制御機能の一例を示すブロック図である。4 is a block diagram showing an example of an access control function for each application; FIG. DBへのアクセスの際の情報の流れを示す図である。FIG. 4 is a diagram showing the flow of information when accessing a DB; アプリケーションのファイルパスの取得手順の一例を示すフローチャートである。FIG. 11 is a flowchart showing an example of a procedure for acquiring a file path of an application; FIG. Pod一覧情報の一例を示す図である。FIG. 5 is a diagram showing an example of Pod list information; 接続先テーブル名の取得方法の一例を示す図である。It is a figure which shows an example of the acquisition method of a connection destination table name. カスタムリソースから取得する許可情報の一例を示す図である。FIG. 10 is a diagram illustrating an example of permission information acquired from a custom resource; FIG. 投機的なDBアクセス処理の一例を示すシーケンス図である。FIG. 10 is a sequence diagram showing an example of speculative DB access processing; クエリの実行に時間がかかる場合の投機的なDBアクセス処理の一例を示すシーケンス図である。FIG. 11 is a sequence diagram showing an example of speculative DB access processing when query execution takes a long time; 第3の実施の形態におけるアプリケーション単位でのアクセス制御機能の一例を示すブロック図である。FIG. 12 is a block diagram showing an example of an access control function for each application according to the third embodiment; FIG.

以下、本実施の形態について図面を参照して説明する。なお各実施の形態は、矛盾のない範囲で複数の実施の形態を組み合わせて実施することができる。
〔第1の実施の形態〕
まず、第1の実施の形態について説明する。
Hereinafter, this embodiment will be described with reference to the drawings. It should be noted that each embodiment can be implemented by combining a plurality of embodiments within a consistent range.
[First Embodiment]
First, a first embodiment will be described.

図1は、第1の実施の形態に係るアクセス制御方法の一例を示す図である。図1には、アクセス制御方法を情報処理装置10によって実施した場合の例を示している。情報処理装置10は、例えばコンピュータであり、アクセス制御プログラムを実行することにより、アクセス制御方法を実施することができる。情報処理装置10は、記憶部11と処理部12とを有する。記憶部11は、情報処理装置10が有するメモリ、またはストレージ装置である。処理部12は、例えば情報処理装置10が有するプロセッサ、または演算回路である。 FIG. 1 is a diagram showing an example of an access control method according to the first embodiment. FIG. 1 shows an example in which an information processing apparatus 10 implements an access control method. The information processing apparatus 10 is, for example, a computer, and can implement an access control method by executing an access control program. The information processing device 10 has a storage unit 11 and a processing unit 12 . The storage unit 11 is a memory included in the information processing device 10 or a storage device. The processing unit 12 is, for example, a processor or an arithmetic circuit included in the information processing device 10 .

情報処理装置10は、管理対象ノード1にネットワークを介して接続されている。管理対象ノード1は、情報処理装置10がアクセス制御を行うDB内のデータを使用するコンピュータである。管理対象ノード1には、複数のPod2a,2bが設けられている。Pod2aには、複数の第1コンテナ3a,3bが含まれる。Pod2bには、第2コンテナ4が含まれる。 The information processing device 10 is connected to the managed node 1 via a network. The managed node 1 is a computer that uses data in a DB whose access is controlled by the information processing device 10 . A managed node 1 is provided with a plurality of Pods 2a and 2b. Pod 2a includes a plurality of first containers 3a and 3b. Pod 2 b includes a second container 4 .

Pod2a内の第1コンテナ3a,3bは、それぞれ情報処理装置10が管理するDB内のデータを利用するソフトウェア5a,5bを実行する。同一のPod2aに含まれる第1コンテナ3a,3bは、ネットワークを介した通信におけるアドレス(例えばIPアドレス)は共通である。またソフトウェア5a,5bそれぞれには固定的なポート番号は割り当てられておらず、ソフトウェア5a,5bの実行過程でネットワークを介した通信が発生すると、その都度、空いているポート番号が割り当てられる。ソフトウェア5aのソフトウェア名は「sw_1」である。ソフトウェア5bのソフトウェア名は「sw_2」である。 The first containers 3a and 3b in the Pod 2a execute software 5a and 5b that use data in the DB managed by the information processing device 10, respectively. The first containers 3a and 3b included in the same Pod 2a have a common address (for example, IP address) in communication via the network. Moreover, no fixed port number is assigned to each of the software 5a and 5b, and a free port number is assigned each time communication via the network occurs during the execution process of the software 5a and 5b. The software name of the software 5a is "sw_1". The software name of the software 5b is "sw_2".

Pod2b内の第2コンテナ4は、監視ソフトウェア6を実行する。第2コンテナ4は、監視ソフトウェア6を実行することで、第1コンテナ3a,3bのネットワークを介した通信を監視する。例えば第2コンテナ4は、監視ソフトウェア6を実行することにより、ポート番号を使用して通信を行っているソフトウェアのソフトウェア名を取得することができる。Pod2a,2bが管理対象ノード1のオペレーティングシステム(OS:Operating System)とネットワークネームスペースを共有している場合、第2コンテナ4は、OSから、ポート番号に対応するソフトウェアを示すソフトウェア名を取得することができる。 A second container 4 in Pod 2 b runs monitoring software 6 . The second container 4 monitors communications of the first containers 3a and 3b via the network by executing monitoring software 6. FIG. For example, by executing the monitoring software 6, the second container 4 can acquire the software name of the software communicating using the port number. When Pods 2a and 2b share a network namespace with the operating system (OS) of the managed node 1, the second container 4 acquires from the OS a software name indicating software corresponding to the port number. be able to.

記憶部11は、例えばDBを構成する複数のデータテーブル11a,11bを記憶する。データテーブル11aのデータテーブル名は「tbl_1」である。データテーブル11bのデータテーブル名は「tbl_2」である。 The storage unit 11 stores, for example, a plurality of data tables 11a and 11b forming a DB. The data table name of the data table 11a is "tbl_1". The data table name of the data table 11b is "tbl_2".

各データテーブル11a,11b内のデータは、用途が定められていることがある。用途が定められたデータを利用できるソフトウェアを、そのデータを定められた用途でのみ利用するソフトウェアに制限することができれば、そのデータが想定外の用途で使用されることを抑止できる。図1の例では、データテーブル11a内のデータは、いずれのソフトウェア5a,5bでも利用できるようにし、データテーブル11b内のデータはソフトウェア5bからのみ利用できるようにする場合を想定する。 Data in each of the data tables 11a and 11b may have a defined purpose. If it is possible to restrict software that can use data for which usage is specified to software that uses the data only for the specified usage, it is possible to prevent the data from being used for unexpected usage. In the example of FIG. 1, it is assumed that the data in the data table 11a can be used by both software 5a and 5b, and the data in the data table 11b can be used only by the software 5b.

処理部12は、ソフトウェア5a,5bの種別ごとのアクセス制御を行う。ソフトウェア5a,5bの種別は、ソフトウェア名で判別できる。
例えば処理部12は、第1コンテナ3a,3bで実行されているソフトウェア5a,5bに一時的に割り当てられたポート番号を送信元とするデータテーブル11a,11bへのアクセス要求7a~7dを、管理対象ノード1から受信する。アクセス要求7aは、第1コンテナ3aがソフトウェア5aを実行することで発生した、データテーブル11a内のデータへのアクセス要求である。アクセス要求7bは、第1コンテナ3aがソフトウェア5aを実行することで発生した、データテーブル11b内のデータへのアクセス要求である。アクセス要求7cは、第1コンテナ3bがソフトウェア5bを実行することで発生した、データテーブル11a内のデータへのアクセス要求である。アクセス要求7dは、第1コンテナ3bがソフトウェア5bを実行することで発生した、データテーブル11b内のデータへのアクセス要求である。
The processing unit 12 performs access control for each type of the software 5a, 5b. The types of the software 5a and 5b can be identified by their software names.
For example, the processing unit 12 manages access requests 7a to 7d to the data tables 11a and 11b whose transmission sources are the port numbers temporarily assigned to the software 5a and 5b executed in the first containers 3a and 3b. Receive from target node 1. The access request 7a is a request to access data in the data table 11a generated by the execution of the software 5a by the first container 3a. The access request 7b is a request to access data in the data table 11b generated by the execution of the software 5a by the first container 3a. The access request 7c is a request to access data in the data table 11a generated by the execution of the software 5b by the first container 3b. The access request 7d is a request to access data in the data table 11b generated by the execution of the software 5b by the first container 3b.

処理部12は、いずれかのアクセス要求7a~7dを受信すると、管理対象ノード1上に設けられた第2コンテナ4から、受信したアクセス要求の送信元のポート番号に対応するソフトウェアを示すソフトウェア名を取得する。処理部12は、取得したソフトウェア名と許可情報12aとに基づいて、アクセス要求に応じたデータテーブルへのアクセスの許否を決定する。許可情報12aには、データテーブル11a,11bそれぞれに対するアクセスを許可する許可対象ソフトウェアを示す許可対象ソフトウェア名が設定されている。例えば処理部12は、第2コンテナ4から取得したソフトウェア名が、アクセス要求のアクセス先のデータテーブルに対応する許可対象ソフトウェア名のいずれかと一致する場合、アクセスを許可するものと決定する。また処理部12は、第2コンテナ4から取得したソフトウェア名が、アクセス要求のアクセス先のデータテーブルに対応する許可対象ソフトウェア名のいずれとも一致しない場合、アクセスを不許可にするものと決定する。 When the processing unit 12 receives any of the access requests 7a to 7d, the processing unit 12 sends the software name indicating the software corresponding to the port number of the transmission source of the received access request from the second container 4 provided on the managed node 1. to get The processing unit 12 determines permission or denial of access to the data table in response to the access request based on the obtained software name and permission information 12a. In the permission information 12a, a permitted software name indicating permitted software to be permitted to access each of the data tables 11a and 11b is set. For example, if the software name obtained from the second container 4 matches any of the permitted software names corresponding to the data table of the access destination of the access request, the processing unit 12 determines that the access is permitted. If the software name obtained from the second container 4 does not match any of the permitted software names corresponding to the data table of the access destination of the access request, the processing unit 12 decides to disallow access.

処理部12は、アクセスを許可すると決定した場合、アクセス要求に応じたデータテーブルへのアクセスを実施する。また処理部12は、アクセスを不許可にすると決定した場合、アクセス要求に応じたデータテーブルへのアクセスを抑止する。 When the processing unit 12 determines to permit access, the processing unit 12 accesses the data table according to the access request. When the processing unit 12 determines to disallow access, the processing unit 12 suppresses access to the data table in response to the access request.

例えば許可情報12aには、データテーブル11aへのアクセスを許可するソフトウェアの許可対象ソフトウェア名として、ソフトウェア5a,5bそれぞれのソフトウェア名「sw_1,sw_2」が設定されている。またデータテーブル11bへのアクセスを許可するソフトウェアの許可対象ソフトウェア名として、ソフトウェア5bのソフトウェア名「sw_2」のみが設定されている。この場合、アクセス要求7a,7c,7dに応じたアクセスは許可される。他方、ソフトウェア5aの実行により発生したデータテーブル11bへのアクセスは不許可となり、アクセスは拒否される。 For example, in the permission information 12a, software names "sw_1, sw_2" of the software 5a and 5b are set as permitted software names of software permitted to access the data table 11a. Also, only the software name "sw_2" of the software 5b is set as the permitted software name of the software permitted to access the data table 11b. In this case, access is permitted according to the access requests 7a, 7c, and 7d. On the other hand, the access to the data table 11b generated by the execution of the software 5a is not permitted, and the access is denied.

このように処理部12は、第1コンテナ3a,3bと同じ管理対象ノード1内に実装されている第2コンテナ4からポート番号に対応するソフトウェア名を取得することで、一時的に割り当てられたポート番号を使用しているソフトウェアを認識できる。その結果、ポート番号を用いて、データテーブルに対するソフトウェアごとのアクセス制限を行うことができる。 In this way, the processing unit 12 acquires the software name corresponding to the port number from the second container 4 installed in the same managed node 1 as the first containers 3a and 3b, and temporarily assigned the software name. Recognize software using port numbers. As a result, the port number can be used to restrict access to the data table for each software.

なおPod2a,2bが管理対象ノード1のOSとネットワークネームスペースを共有している場合、第2コンテナ4は、ポート番号に対応するソフトウェア名をOSから容易に取得できる。これにより、ポート番号に対応するソフトウェア名の取得処理を効率的に行うことができる。 Note that when the Pods 2a and 2b share a network namespace with the OS of the managed node 1, the second container 4 can easily acquire the software name corresponding to the port number from the OS. This enables efficient acquisition processing of the software name corresponding to the port number.

Pod2a,2bが管理対象ノード1のOSとネットワークネームスペースを共有していない場合もある。この場合、例えばPod2a内に第1コンテナ3a,3bとネットワークのアドレスを共有する第3コンテナが設けられる。第3コンテナは、ポート番号に対応するソフトウェア5a,5bの実行ファイルのファイルシステム内でのファイル識別番号を取得する。ファイル識別番号は、たとえばinode番号である。第2コンテナ4は、第3コンテナからファイル識別番号を取得し、OSから、ファイル識別番号に対応する実行ファイルのファイルパスを取得する。そして第2コンテナ4は、取得したファイルパスをソフトウェア名としてコンピュータに送信する。 Pods 2 a and 2 b may not share the network namespace with the OS of managed node 1 . In this case, for example, a third container sharing a network address with the first containers 3a and 3b is provided in the Pod 2a. The third container acquires the file identification number within the file system of the executable file of the software 5a, 5b corresponding to the port number. A file identification number is, for example, an inode number. The second container 4 acquires the file identification number from the third container, and acquires the file path of the execution file corresponding to the file identification number from the OS. The second container 4 then transmits the acquired file path to the computer as a software name.

管理対象ノード1のOSは、通常、1つのファイルシステムによってファイルを管理する。OS上で動作するPod2a,2bそれぞれが使用するファイルも、OSが有する共通のファイルシステムで管理される。ファイルシステムでは、各ファイルにファイル識別番号が付与されており、ファイル識別番号は管理対象ノード1内で一意である。そのため、ソフトウェアの実行ファイルのファイル識別番号が分かれば、該当ソフトウェアの実行ファイルのファイルパスを取得できる。ファイルパスには実行ファイルのファイル名が含まれており、そのファイル名は、対応するソフトウェアのソフトウェア名として使用できる。従ってポート番号に対応するソフトウェアのファイル識別番号を利用することで、Pod2a,2bが管理対象ノード1のOSとネットワークネームスペースを共有していない場合でも、ポート番号に対応するソフトウェア名の取得が可能となる。 The OS of the managed node 1 normally manages files using one file system. Files used by Pods 2a and 2b operating on the OS are also managed by a common file system of the OS. In the file system, each file is assigned a file identification number, and the file identification number is unique within the managed node 1 . Therefore, if the file identification number of the executable file of the software is known, the file path of the executable file of the software can be acquired. The file path contains the filename of the executable file, which can be used as the software name for the corresponding software. Therefore, by using the file identification number of the software corresponding to the port number, it is possible to acquire the software name corresponding to the port number even if Pods 2a and 2b do not share the network namespace with the OS of the managed node 1. becomes.

DB内のデータテーブル11a,11bごとにアクセス制限を行うには、許可情報12aにおいてデータテーブルとソフトウェアの組ごとに、アクセスを許可するか否かを定義することとなる。例えば許可情報12aには、アクセス対象のデータテーブル11a,11bを示すアクセス対象データテーブル名と、アクセス対象のデータテーブルへのアクセスを許可する許可対象ソフトウェアを示す許可対象ソフトウェア名との組が、複数設定される。この場合、処理部12は、アクセス要求7a~7dに基づいて、アクセス対象のデータテーブル11a,11bを示すデータテーブル名を取得する。そして処理部12は、取得したデータテーブル名とソフトウェア名との組に対応するアクセス対象データテーブル名と許可対象ソフトウェア名との組が許可情報に設定されている場合、アクセスを許可すると決定する。 In order to restrict access to each of the data tables 11a and 11b in the DB, it is necessary to define whether or not access is permitted for each set of data table and software in the permission information 12a. For example, the permission information 12a includes a plurality of sets of access target data table names indicating the access target data tables 11a and 11b and permission target software names indicating permission target software permitted to access the access target data tables. set. In this case, the processing unit 12 acquires data table names indicating the data tables 11a and 11b to be accessed based on the access requests 7a to 7d. Then, the processing unit 12 determines to permit the access when the set of the access target data table name and the permission target software name corresponding to the obtained set of the data table name and the software name is set in the permission information.

アクセス要求7a~7dにはアクセス対象のデータテーブルのデータテーブル名が含まれている。従って、アクセス要求7a~7dからデータテーブル名を抽出することは可能である。ただし、アクセス要求7a~7dのデータフォーマットには様々な種類があり、処理部12においてすべてのアクセス要求7a~7dの内容を解析できるようにするのが難しい場合がある。その場合、処理部12は、データテーブルを管理しているDB管理システムから、アクセス要求7a~7dについての実行計画を取得してもよい。実行計画は、アクセス先のデータテーブルのデータテーブル名が明確に記載されている。そこで処理部12は、実行計画からアクセス要求に応じたアクセス先であるデータテーブルの名称を取得する。このようにアクセス要求7a~7dの実行計画からデータテーブル名を取得することで、アクセス要求7a~7dのデータフォーマットの仕様に依存せずに、確実にアクセス先のデータテーブル11a,11bのデータテーブル名を取得することができる。 The access requests 7a to 7d contain the data table name of the data table to be accessed. Therefore, it is possible to extract the data table name from the access requests 7a-7d. However, there are various types of data formats for the access requests 7a to 7d, and it may be difficult for the processing unit 12 to analyze the contents of all the access requests 7a to 7d. In that case, the processing unit 12 may acquire execution plans for the access requests 7a to 7d from the DB management system that manages the data tables. The execution plan clearly states the data table name of the data table to be accessed. Therefore, the processing unit 12 acquires the name of the data table, which is the access destination corresponding to the access request, from the execution plan. By obtaining the data table names from the execution plans of the access requests 7a to 7d in this way, the data tables of the data tables 11a and 11b to be accessed can be reliably executed independently of the data format specifications of the access requests 7a to 7d. name can be obtained.

処理部12は、アクセス要求7a~7dに応じたデータテーブルへのアクセスを、投機的に実行してもよい。その場合、処理部12は、ソフトウェア名の取得と並行して、アクセス要求7a~7dに応じたデータテーブル11a,11bへのアクセス処理を実行する。処理部12は、取得したソフトウェア名に基づいてアクセスを許可すると決定した場合、アクセス処理の結果をアクセス要求の送信元のソフトウェアに送信する。また処理部12は、取得したソフトウェア名に基づいてアクセスを許可しないと決定した場合、アクセス処理の結果のアクセス要求の送信元のソフトウェアへの送信を抑止する。このように並列で処理を行うことにより、ソフトウェアごとにアクセス制限による処理効率の低下を抑止することができる。 The processing unit 12 may speculatively access the data table according to the access requests 7a to 7d. In this case, the processing unit 12 executes access processing to the data tables 11a and 11b in response to the access requests 7a to 7d in parallel with acquiring the software name. If the processing unit 12 determines to permit access based on the acquired software name, the processing unit 12 transmits the result of the access processing to the source software of the access request. When the processing unit 12 determines not to permit access based on the acquired software name, the processing unit 12 suppresses the transmission of the access request as a result of the access processing to the source software. By performing processing in parallel in this way, it is possible to prevent a decrease in processing efficiency due to access restrictions for each piece of software.

アクセス処理に時間を要する場合、処理部12は、アクセス処理の結果を取得する前にアクセスを許可しないと決定する可能性がある。この場合、処理部12は、アクセス処理をキャンセルしてもよい。例えば処理部12は、データテーブル11a,11bへのアクセスを行うDBシステムへ、アクセス処理のキャンセルを示すメッセージを送信する。これにより、投機的処理によって生じるアクセス処理の処理負荷の増加量を抑止することができる。 If the access process takes a long time, the processing unit 12 may decide not to permit access before obtaining the result of the access process. In this case, the processing unit 12 may cancel the access process. For example, the processing unit 12 transmits a message indicating cancellation of access processing to the DB system that accesses the data tables 11a and 11b. This makes it possible to suppress an increase in the processing load of access processing caused by speculative processing.

〔第2の実施の形態〕
次に第2の実施の形態について説明する。第2の実施の形態のシステムでは、アプリケーションソフトウェア(以下、アプリケーションと呼ぶ)ごとのDBへのアクセス管理を投機的に実行することで、アクセス管理に伴うDBのアクセス遅延を抑止する。
[Second embodiment]
Next, a second embodiment will be described. The system according to the second embodiment speculatively executes DB access management for each application software (hereinafter referred to as an application), thereby suppressing DB access delays associated with access management.

図2は、第2の実施の形態のシステム構成の一例を示す図である。第2の実施の形態では、ネットワーク20を介して2台のノード100,200,300が接続されている。ノード100は、コンテナを用いてアプリケーションからDBへのアクセスを管理する。ノード200は、コンテナを用いてアプリケーションを実行する。ノード300は、ノード100とノード200で実行されているコンテナを管理する。 FIG. 2 is a diagram showing an example of a system configuration according to the second embodiment. In the second embodiment, two nodes 100 , 200 and 300 are connected via network 20 . The node 100 uses containers to manage access from applications to DBs. The node 200 executes applications using containers. Node 300 manages containers running on nodes 100 and 200 .

図3は、ノードのハードウェアの一例を示す図である。ノード100は、プロセッサ101によって装置全体が制御されている。プロセッサ101には、バス109を介してメモリ102と複数の周辺機器が接続されている。プロセッサ101は、マルチプロセッサであってもよい。プロセッサ101は、例えばCPU(Central Processing Unit)、MPU(Micro Processing Unit)、またはDSP(Digital Signal Processor)である。プロセッサ101がプログラムを実行することで実現する機能の少なくとも一部を、ASIC(Application Specific Integrated Circuit)、PLD(Programmable Logic Device)などの電子回路で実現してもよい。 FIG. 3 is a diagram illustrating an example of node hardware. A node 100 is entirely controlled by a processor 101 . A memory 102 and a plurality of peripheral devices are connected to the processor 101 via a bus 109 . Processor 101 may be a multiprocessor. The processor 101 is, for example, a CPU (Central Processing Unit), MPU (Micro Processing Unit), or DSP (Digital Signal Processor). At least part of the functions realized by the processor 101 executing the program may be realized by an electronic circuit such as an ASIC (Application Specific Integrated Circuit) or a PLD (Programmable Logic Device).

メモリ102は、ノード100の主記憶装置として使用される。メモリ102には、プロセッサ101に実行させるOSのプログラムやアプリケーションプログラムの少なくとも一部が一時的に格納される。また、メモリ102には、プロセッサ101による処理に利用する各種データが格納される。メモリ102としては、例えばRAM(Random Access Memory)などの揮発性の半導体記憶装置が使用される。 Memory 102 is used as the main storage device of node 100 . The memory 102 temporarily stores at least part of an OS program and application programs to be executed by the processor 101 . In addition, the memory 102 stores various data used for processing by the processor 101 . As the memory 102, for example, a volatile semiconductor memory device such as a RAM (Random Access Memory) is used.

バス109に接続されている周辺機器としては、ストレージ装置103、GPU(Graphics Processing Unit)104、入力インタフェース105、光学ドライブ装置106、機器接続インタフェース107およびネットワークインタフェース108がある。 Peripheral devices connected to the bus 109 include a storage device 103 , a GPU (Graphics Processing Unit) 104 , an input interface 105 , an optical drive device 106 , a device connection interface 107 and a network interface 108 .

ストレージ装置103は、内蔵した記録媒体に対して、電気的または磁気的にデータの書き込みおよび読み出しを行う。ストレージ装置103は、コンピュータの補助記憶装置として使用される。ストレージ装置103には、OSのプログラム、アプリケーションプログラム、および各種データが格納される。なお、ストレージ装置103としては、例えばHDD(Hard Disk Drive)やSSD(Solid State Drive)を使用することができる。 The storage device 103 electrically or magnetically writes data to and reads data from a built-in recording medium. The storage device 103 is used as an auxiliary storage device for the computer. The storage device 103 stores an OS program, application programs, and various data. As the storage device 103, for example, an HDD (Hard Disk Drive) or an SSD (Solid State Drive) can be used.

GPU104は画像処理を行う演算装置であり、グラフィックコントローラとも呼ばれる。GPU104には、モニタ21が接続されている。GPU104は、プロセッサ101からの命令に従って、画像をモニタ21の画面に表示させる。モニタ21としては、有機EL(Electro Luminescence)を用いた表示装置や液晶表示装置などがある。 The GPU 104 is an arithmetic unit that performs image processing, and is also called a graphic controller. A monitor 21 is connected to the GPU 104 . The GPU 104 displays an image on the screen of the monitor 21 according to instructions from the processor 101 . Examples of the monitor 21 include a display device using an organic EL (Electro Luminescence), a liquid crystal display device, and the like.

入力インタフェース105には、キーボード22とマウス23とが接続されている。入力インタフェース105は、キーボード22やマウス23から送られてくる信号をプロセッサ101に送信する。なお、マウス23は、ポインティングデバイスの一例であり、他のポインティングデバイスを使用することもできる。他のポインティングデバイスとしては、タッチパネル、タブレット、タッチパッド、トラックボールなどがある。 A keyboard 22 and a mouse 23 are connected to the input interface 105 . The input interface 105 transmits signals sent from the keyboard 22 and mouse 23 to the processor 101 . Note that the mouse 23 is an example of a pointing device, and other pointing devices can also be used. Other pointing devices include touch panels, tablets, touchpads, trackballs, and the like.

光学ドライブ装置106は、レーザ光などを利用して、光ディスク24に記録されたデータの読み取り、または光ディスク24へのデータの書き込みを行う。光ディスク24は、光の反射によって読み取り可能なようにデータが記録された可搬型の記録媒体である。光ディスク24には、DVD(Digital Versatile Disc)、DVD-RAM、CD-ROM(Compact Disc Read Only Memory)、CD-R(Recordable)/RW(ReWritable)などがある。 The optical drive device 106 reads data recorded on the optical disc 24 or writes data on the optical disc 24 using laser light or the like. The optical disc 24 is a portable recording medium on which data is recorded so as to be readable by light reflection. The optical disc 24 includes DVD (Digital Versatile Disc), DVD-RAM, CD-ROM (Compact Disc Read Only Memory), CD-R (Recordable)/RW (ReWritable), and the like.

機器接続インタフェース107は、ノード100に周辺機器を接続するための通信インタフェースである。例えば機器接続インタフェース107には、メモリ装置25やメモリリーダライタ26を接続することができる。メモリ装置25は、機器接続インタフェース107との通信機能を搭載した記録媒体である。メモリリーダライタ26は、メモリカード27へのデータの書き込み、またはメモリカード27からのデータの読み出しを行う装置である。メモリカード27は、カード型の記録媒体である。 The device connection interface 107 is a communication interface for connecting peripheral devices to the node 100 . For example, the device connection interface 107 can be connected to the memory device 25 and the memory reader/writer 26 . The memory device 25 is a recording medium equipped with a communication function with the device connection interface 107 . The memory reader/writer 26 is a device that writes data to the memory card 27 or reads data from the memory card 27 . The memory card 27 is a card-type recording medium.

ネットワークインタフェース108は、ネットワーク20に接続されている。ネットワークインタフェース108は、ネットワーク20を介して、他のコンピュータまたは通信機器との間でデータの送受信を行う。ネットワークインタフェース108は、例えばスイッチやルータなどの有線通信装置にケーブルで接続される有線通信インタフェースである。またネットワークインタフェース108は、基地局やアクセスポイントなどの無線通信装置に電波によって通信接続される無線通信インタフェースであってもよい。 Network interface 108 is connected to network 20 . Network interface 108 transmits and receives data to and from other computers or communication devices via network 20 . The network interface 108 is a wired communication interface that is connected by a cable to a wired communication device such as a switch or router. Also, the network interface 108 may be a wireless communication interface that communicates with a wireless communication device such as a base station or an access point via radio waves.

ノード100は、以上のようなハードウェアによって、第2の実施の形態の処理機能を実現することができる。ノード200,300も、図3に示したノード100と同様のハードウェアにより実現することができる。なお、第1の実施の形態に示した情報処理装置10も、図3に示したノード100と同様のハードウェアにより実現することができる。 The node 100 can implement the processing functions of the second embodiment with the above hardware. Nodes 200 and 300 can also be realized by hardware similar to node 100 shown in FIG. Note that the information processing apparatus 10 shown in the first embodiment can also be realized by hardware similar to the node 100 shown in FIG.

ノード100は、例えばコンピュータ読み取り可能な記録媒体に記録されたプログラムを実行することにより、第2の実施の形態の処理機能を実現する。ノード100に実行させる処理内容を記述したプログラムは、様々な記録媒体に記録しておくことができる。例えば、ノード100に実行させるプログラムをストレージ装置103に格納しておくことができる。プロセッサ101は、ストレージ装置103内のプログラムの少なくとも一部をメモリ102にロードし、プログラムを実行する。またノード100に実行させるプログラムを、光ディスク24、メモリ装置25、メモリカード27などの可搬型記録媒体に記録しておくこともできる。可搬型記録媒体に格納されたプログラムは、例えばプロセッサ101からの制御により、ストレージ装置103にインストールされた後、実行可能となる。またプロセッサ101が、可搬型記録媒体から直接プログラムを読み出して実行することもできる。 The node 100 implements the processing functions of the second embodiment, for example, by executing a program recorded on a computer-readable recording medium. A program describing the processing content to be executed by the node 100 can be recorded in various recording media. For example, a program to be executed by the node 100 can be stored in the storage device 103 . The processor 101 loads at least part of the program in the storage device 103 into the memory 102 and executes the program. The program to be executed by the node 100 can also be recorded in a portable recording medium such as the optical disk 24, memory device 25, memory card 27, or the like. A program stored in a portable recording medium can be executed after being installed in the storage device 103 under the control of the processor 101, for example. Alternatively, the processor 101 can read and execute the program directly from the portable recording medium.

ここで、第2の実施の形態によって実現しようとするアプリケーションごとのDBへのアクセス管理について説明する。
図4は、アプリケーションごとのDBへのアクセス管理の一例を示す図である。ノード100はDB110を有している。DB110内にRDBMSによって個人情報(住所、氏名)を含む機密情報が保持されている。RDBMSでは、データが複数のデータテーブルに分けて格納されている。各データテーブルには、そのデータテーブルごとに定められたデータ定義に合致するデータが格納される。RDBMSではデータテーブルは一つ以上存在し、それぞれのテーブルに依存関係がある場合もある。
Here, the access management to the DB for each application to be realized by the second embodiment will be described.
FIG. 4 is a diagram illustrating an example of DB access management for each application. Node 100 has DB 110 . Confidential information including personal information (address, name) is held in the DB 110 by RDBMS. In the RDBMS, data are divided and stored in a plurality of data tables. Each data table stores data conforming to the data definition defined for each data table. One or more data tables exist in an RDBMS, and each table may have a dependent relationship.

図4の例では、DB110内に登録者情報テーブル111と購入情報テーブル112とがある。登録者情報テーブル111には、登録者ID、登録者、年齢、都道府県の欄が設けられており、各欄に対応するデータを含む複数のレコードが登録されている。購入情報テーブル112には、購入ID、登録者ID、商品ID、および日時の欄が設けられており、各欄に対応するデータを含む複数のレコードが登録されている。登録者情報テーブル111と購入情報テーブル112とは、登録者IDを介して互いに関係付けられている。 In the example of FIG. 4, the DB 110 has a registrant information table 111 and a purchase information table 112 . The registrant information table 111 has columns of registrant ID, registrant, age, and prefecture, and a plurality of records including data corresponding to each column are registered. The purchase information table 112 has columns of purchase ID, registrant ID, product ID, and date and time, and a plurality of records including data corresponding to each column are registered. The registrant information table 111 and the purchase information table 112 are related to each other via the registrant ID.

ノード200は、コンテナ211,212を用いてDB110へアクセスする。コンテナ211,212は、コンテナオーケストレーションツールで管理されているものとする。コンテナオーケストレーションツールでは、Pod単位でコンテナを管理する。コンテナ211,212は、ユーザアプリPod210に含まれている。 The node 200 accesses the DB 110 using containers 211 and 212 . The containers 211 and 212 are assumed to be managed by a container orchestration tool. The container orchestration tool manages containers on a Pod basis. Containers 211 and 212 are included in user application Pod 210 .

ユーザアプリPod210内のコンテナ211,212のように同一のPod内のコンテナは、共有のストレージアクセス環境・ネットワークアクセス環境を持ち、同じネットワーク名前空間を使用する。そのため、互いに簡単に通信が出来る。多くの場合、メインの動作を行うプログラムが入ったコンテナ一つに、それをサポートするヘルパープログラム(ログ収集、プロキシ、コントローラ、バックアップなど)を実行するコンテナがいくつか入ったものがPodとして使用される。このようなヘルパープログラムを実行するコンテナを、サイドカーコンテナと呼ぶ。 Containers within the same Pod, such as the containers 211 and 212 within the user application Pod 210, have a shared storage access environment/network access environment and use the same network namespace. Therefore, they can easily communicate with each other. Pods are often used with a single container that contains a program that does the main work and several containers that run supporting helper programs (log collectors, proxies, controllers, backups, etc.). be. A container that executes such a helper program is called a sidecar container.

ノード200はユーザアプリPod210を有している。ユーザアプリPod210は、アプリケーションを実行させるための実行単位である。ユーザアプリPod210は、複数のコンテナ211,212を有する。コンテナ211では、アプリケーション211aが実行されている。コンテナ212では、アプリケーション212aが実行されている。 The node 200 has a user application Pod210. A user application Pod 210 is an execution unit for executing an application. A user application Pod 210 has a plurality of containers 211 and 212 . An application 211a is running in the container 211 . An application 212a is running in the container 212 .

例えばアプリケーション212aは、DB110から読み出したデータの匿名化を行うアプリケーションであるものとする。登録者情報テーブル111には、ユーザの個人情報が含まれているため、登録者情報テーブル111から読み出したデータは、匿名化処理を行った後に利用するのが適切である。そこでノード100は、アプリケーション212aからのみ登録者情報テーブル111にアクセス可能となるように、アクセスを制御する。この場合、アプリケーション211aは、アプリケーション212aを介して、登録者情報テーブル111内のデータにアクセス可能となる。なお、購入情報テーブル112には個人情報が含まれていないため、ノード100は、両方のアプリケーション211a,212aから購入情報テーブル112へのアクセスが可能となるように制御する。 For example, the application 212a is assumed to be an application that anonymizes data read from the DB 110 . Since the registrant information table 111 contains the user's personal information, it is appropriate to use the data read out from the registrant information table 111 after performing anonymization processing. Therefore, the node 100 controls access so that the registrant information table 111 can be accessed only from the application 212a. In this case, the application 211a can access data in the registrant information table 111 via the application 212a. Since the purchase information table 112 does not contain personal information, the node 100 controls so that both applications 211a and 212a can access the purchase information table 112. FIG.

このようにノード100は、テーブル単位で、アプリケーションごとに異なるアクセス制限を課すようにアクセス制御を行う。以下、図5、図6を参照して、アプリケーションごとに異なるアクセス制限を課すようなアクセス制御を行うことの困難性について説明する。 In this way, the node 100 performs access control so as to impose different access restrictions for each application on a table-by-table basis. The difficulty of performing access control that imposes different access restrictions for each application will be described below with reference to FIGS. 5 and 6. FIG.

図5は、DBへのアクセス制御に関する参考技術の第1の例を示す図である。図5には、サイドカーコンテナを用いたコンテナオーケストレーションツールによって、DB110へのアクセスを制御する例が示されている。サイドカーコンテナとしてプロキシコンテナ900を挿入することで、プロキシコンテナ900を介した通信について、フィルタリングや統計情報の保存を行うことができる。例えばプロキシコンテナ900は、DB110へのアクセス要求の送信元のIP(Internet Protocol)アドレスとポート番号とに基づいてフィルタリングを行うことができる。送信元のIPアドレスとポート番号は、アクセス要求の送信に用いられたパケットのヘッダから取得できる。ただし図5に示すプロキシコンテナ900は、ポート番号に対応するアプリケーション211a,212aの識別情報(アプリケーション名など)を取得する機能を持たないものとする。 FIG. 5 is a diagram showing a first example of a reference technique regarding access control to a DB. FIG. 5 shows an example of controlling access to the DB 110 by a container orchestration tool using a sidecar container. By inserting the proxy container 900 as a sidecar container, it is possible to perform filtering and store statistical information about communication via the proxy container 900 . For example, the proxy container 900 can perform filtering based on the source IP (Internet Protocol) address and port number of the access request to the DB 110 . The source IP address and port number can be obtained from the header of the packet used to transmit the access request. However, it is assumed that the proxy container 900 shown in FIG. 5 does not have the function of acquiring the identification information (such as the application name) of the applications 211a and 212a corresponding to the port numbers.

Pod単位でコンテナ211,212を管理している場合、Pod単位でIPアドレスが割り振られる。そのためプロキシコンテナ900を用いて送信元のIPアドレスとポート番号でフィルタリングを行う場合、IPアドレスだけでは同一のユーザアプリPod210内のアプリケーション211a,212aを識別することができない。送信元ポート番号は別々に振られているが、特別に送信元が設定しない限りは空いているポート番号が用いられている。すなわちアプリケーション211a,212aそれぞれが使用するポート番号は動的に変更され、プロキシコンテナ900においてアクセス要求のポート番号から、そのアクセス要求の送信元のアプリケーションの種別の判別は不可能である。 When the containers 211 and 212 are managed in Pod units, IP addresses are assigned in Pod units. Therefore, when filtering is performed using the IP address and port number of the transmission source using the proxy container 900, the applications 211a and 212a in the same user application Pod 210 cannot be identified only by the IP address. The source port numbers are assigned separately, but a free port number is used unless the source specifically sets it. That is, the port number used by each of the applications 211a and 212a is dynamically changed, and it is impossible for the proxy container 900 to determine the type of the source application of the access request from the port number of the access request.

またプロキシコンテナ900では、IPアドレスとポート番号だけではアクセス先となるデータテーブルを把握することができない。そのためプロキシコンテナ900によるDB110内のテーブルごとに、アプケーションに応じたアクセスの許否を判断するには、送信元のIPアドレスとポート番号に対応するアプリケーションの種別が把握できるだけでは不十分である。 Also, in the proxy container 900, the data table to be accessed cannot be grasped only by the IP address and port number. For this reason, it is not sufficient to know the type of application corresponding to the IP address and port number of the transmission source in order to determine whether or not to permit access according to the application for each table in the DB 110 of the proxy container 900 .

図6は、DBへのアクセス制御に関する参考技術の第2の例を示す図である。図6には、RDBMSにおけるユーザ単位でのアクセス制御機能を用いて、アプリケーション単位でのアクセス制御を可能とする例が示されている。 FIG. 6 is a diagram showing a second example of a reference technique regarding access control to a DB. FIG. 6 shows an example of enabling access control on a per-application basis using the access control function on a per-user basis in RDBMS.

RDBMSは、テーブルごとに、そのテーブルに対するアクセスを許容するユーザを制限する機構を持っている。そこでPod作成者30は、アプリケーション211a,212aを、別々のユーザアカウントで実行する。例えばアプリケーション211aは「ユーザB」のユーザアカウントで実行され、アプリケーション212aは「ユーザA」のユーザアカウントで実行されている。 RDBMS has a mechanism for limiting users who are allowed to access each table. Therefore, the Pod creator 30 executes the applications 211a and 212a with separate user accounts. For example, the application 211a is executed under the user account of "user B", and the application 212a is executed under the user account of "user A".

RDBMSには、登録者情報テーブル111に設定されているデータ(登録者情報)にアクセス可能なユーザとして、「ユーザA」が設定される。また購入情報テーブル112に設定されているデータ(購入情報)にアクセス可能なユーザとして、「ユーザA、ユーザB」が設定される。このようにRDBMSには、各テーブルについて、ユーザ単位でのアクセス権限を定義することができる。そしてRDBMSは、アクセス可能なユーザのアカウントで実行されているアプリケーションからのアクセスであれば、データへのアクセスを許容する。 “User A” is set in the RDBMS as a user who can access data (registrant information) set in the registrant information table 111 . Also, “user A, user B” are set as users who can access data (purchase information) set in the purchase information table 112 . In this way, in the RDBMS, it is possible to define access rights for each table on a user-by-user basis. The RDBMS then allows access to the data from an application running under an accessible user's account.

図6の例では、「ユーザB」のアカウントで実行されているアプリケーション211aは、購入情報テーブル112へのアクセスは可能であるが、登録者情報テーブル111へのアクセスは不可能となる。他方、「ユーザA」のアカウントで実行されているアプリケーション212aは、登録者情報テーブル111と購入情報テーブル112との両方へアクセス可能である。このようにRDBMSにおけるユーザのアカウントのアクセス権限管理を用いれば、ユーザのアカウントとアプリケーションとを関連付けることで、アプリケーション単位でのアクセス制御が可能となる。 In the example of FIG. 6, the application 211a running under the account of “user B” can access the purchase information table 112 but cannot access the registrant information table 111 . On the other hand, the application 212 a running under the account of “user A” can access both the registrant information table 111 and the purchase information table 112 . By using access authority management for user accounts in the RDBMS in this way, it is possible to control access for each application by associating user accounts with applications.

しかし、RDBMSは、アクセスの要求元のアプリケーションのユーザアカウントを判別することはできても、これがどのアプリケーションに使われているかを把握することはできない。そのため、Pod作成者30が、RDBMSへのアプリケーションテーブルとユーザアカウントと関係付けの設定を誤った場合、アクセスを拒否するべきアプリケーションからのテーブルへのアクセスが許可されてしまう可能性がある。 However, although the RDBMS can determine the user account of the application requesting access, it cannot ascertain which application is using it. Therefore, if the Pod creator 30 makes a mistake in setting the relationship between the application table in the RDBMS and the user account, there is a possibility that an application that should be denied access will be allowed to access the table.

しかも複数のアプリケーション211a,212aそれぞれに個別のユーザアカウントを割り当てる場合、Pod作成者30一人が、アプリケーション211a,212aそれぞれを実行するための複数のユーザアカウントを管理することとなる。アプケーション数が多数になると、アプリケーションとユーザアカウントとの関連付けの設定ミスが発生しやすくなる。さらに、アプケーションの実行に使用するユーザアカウントがPod作成者30のアカウントに制限されることはシステムの運用の柔軟性を低下させることとなり、汎用的に用いることができる手段ではない。 Moreover, when individual user accounts are assigned to the multiple applications 211a and 212a, one Pod creator 30 manages multiple user accounts for executing the applications 211a and 212a. As the number of applications increases, misconfiguration of association between applications and user accounts is more likely to occur. Furthermore, limiting the user account used for application execution to the account of the Pod creator 30 reduces the flexibility of system operation, and is not a means that can be used for general purposes.

以上のように、プロキシによるIPアドレスとポート番号による制限ではアプリケーション単位での各テーブルへのアクセス許否の判別ができないという問題がある。他方、テーブルごとのアクセス制御はRDBMSのユーザをアプリケーションに紐づけでアクセス管理を行うのは、システムの運用や管理を難しくすることとなり不適切である。 As described above, there is a problem that it is not possible to determine whether access to each table is permitted or not for each application with restrictions based on IP addresses and port numbers by proxies. On the other hand, the access control for each table is not suitable for performing access management by linking RDBMS users to applications because it makes system operation and management difficult.

そこで第2の実施の形態に示すシステムでは、Pod作成者30への過度な負担をかけずに、アプリケーション単位でのアクセス制御を実現する。なお第2の実施の形態ではDB110をRDBMSで管理しているが、DB110の構造はRDBMSに限定されない。例えばNoSQLとよばれるドキュメントDB、グラフDBといった種類でアクセス制御されているDBに対しても、第2の実施の形態に示すアプリケーション単位でのアクセス制御を適用することができる。 Therefore, in the system shown in the second embodiment, access control is realized for each application without imposing an excessive burden on the Pod creator 30 . Although the DB 110 is managed by RDBMS in the second embodiment, the structure of DB 110 is not limited to RDBMS. For example, the application-by-application access control shown in the second embodiment can be applied to DBs whose access is controlled by types such as document DBs and graph DBs called NoSQL.

図7は、アプリケーション単位でのアクセス制御機能の一例を示すブロック図である。ノード100は、DB110とPod120とを有する。DB110は、RDBMSで管理される。DB110とPod120とは、ノード100のプロセッサ101がプログラムを実行することで実現される機能である。 FIG. 7 is a block diagram showing an example of an access control function for each application. Node 100 has DB 110 and Pod 120 . The DB 110 is managed by RDBMS. The DB 110 and the Pods 120 are functions implemented by the processor 101 of the node 100 executing programs.

Pod120には、プロキシコンテナ121とDBコンテナ122とを有する。プロキシコンテナ121は、コンテナ間通信を途中でキャッチし、送信元のアプリケーションと通信の内容(クエリ)に基づいて、許可された通信かどうかを判断し、アクセス制御を行う。DBコンテナ122は、RDBMSによってDB110内のデータを管理する。 Pod 120 has proxy container 121 and DB container 122 . The proxy container 121 catches inter-container communication in the middle, determines whether or not the communication is permitted based on the source application and the content of the communication (query), and performs access control. The DB container 122 manages data in the DB 110 by RDBMS.

プロキシコンテナ121は、プロキシ部121a、アプリ情報取得部121b、許可情報取得部121c、接続先テーブル取得部121d、および許否判断部121eを有する。 The proxy container 121 has a proxy unit 121a, an application information acquisition unit 121b, a permission information acquisition unit 121c, a connection destination table acquisition unit 121d, and a permission/denial determination unit 121e.

プロキシ部121aは、アプリケーション211a,212aからのDB110へのアクセス要求であるクエリを取得する。プロキシ部121aは、取得したクエリをDBコンテナ122に転送し、アクセス可能なテーブルへのアクセスの場合に、アクセス結果をクエリの送信元のアプリケーションに送信する。 The proxy unit 121a acquires a query, which is an access request to the DB 110 from the applications 211a and 212a. The proxy unit 121a transfers the acquired query to the DB container 122, and in the case of accessing an accessible table, transmits the access result to the application that sent the query.

アプリ情報取得部121bは、ノード300内のAPI(Application Programming Interface)サーバ310から監視用コンテナ221の位置情報を取得する。そしてアプリ情報取得部121bは、クエリの送信元のポート番号に対応するアプリケーションの情報を監視用コンテナ221に問い合わせる。アプリ情報取得部121bは、取得したアプリケーションの情報を許否判断部121eに送信する。 The application information acquisition unit 121 b acquires the location information of the monitoring container 221 from the API (Application Programming Interface) server 310 in the node 300 . Then, the application information acquisition unit 121b inquires of the monitoring container 221 about the information of the application corresponding to the port number of the transmission source of the query. The application information acquisition unit 121b transmits the acquired application information to the permission/refusal determination unit 121e.

許可情報取得部121cは、ノード300内のカスタムリソース320から、アクセスを許可するDB110内のテーブルとアプリケーションとの対応関係を示す許可情報を取得する。許可情報取得部121cは、取得した許可情報を許否判断部121eに送信する。 The permission information acquisition unit 121c acquires, from the custom resource 320 in the node 300, permission information indicating the correspondence relationship between the table in the DB 110 to which access is permitted and the application. The permission information acquisition unit 121c transmits the acquired permission information to the permission determination unit 121e.

接続先テーブル取得部121dは、DBコンテナ122から、クエリに応じたアクセスの対象となるデータテーブルの名前(接続先テーブル名)を取得する。接続先テーブル取得部121dは、取得した接続先テーブル名を許否判断部121eに送信する。 The connection destination table acquisition unit 121d acquires the name of the data table (connection destination table name) to be accessed according to the query from the DB container 122 . The connection destination table acquisition unit 121d transmits the acquired connection destination table name to the permission determination unit 121e.

許否判断部121eは、クエリの送信元のポート番号に対応するアプリケーションの情報、許可情報、および接続先テーブル名に基づいて、クエリに応じたアクセスを許可するか否かを判定する。許否判断部121eは、判定結果をプロキシ部121aに送信する。 The permission/refusal determination unit 121e determines whether or not to permit access according to the query, based on the application information corresponding to the port number of the transmission source of the query, the permission information, and the connection destination table name. The permission/refusal determination unit 121e transmits the determination result to the proxy unit 121a.

ノード200は、OS201上でコンテナエンジン202が実行され、コンテナエンジン202によってユーザアプリPod210と監視用Pod220とが生成されている。OS201、コンテナエンジン202、ユーザアプリPod210、および監視用Pod220は、ノード200のプロセッサがプログラムを実行することにより実現される機能である。なお、図7では省略しているが、ノード100においてもOS上で実行されているコンテナエンジンによってPod120が生成されている。 In the node 200, a container engine 202 is executed on an OS 201, and a user application Pod 210 and a monitoring Pod 220 are generated by the container engine 202. FIG. The OS 201, the container engine 202, the user application Pod 210, and the monitoring Pod 220 are functions implemented by the processor of the node 200 executing programs. Although omitted in FIG. 7, the Pod 120 is generated by the container engine running on the OS in the node 100 as well.

監視用Pod220は、監視用コンテナ221を有している。監視用コンテナ221は、内部アプリ情報取得部221aを有する。内部アプリ情報取得部221aは、OS201を介して、特定のポート番号を使用しているアプリケーションのファイルパス(アプリケーションのプログラムファイルのディレクトリパスとファイル名)を取得する。例えば監視用コンテナ221はノード200のOS201と名前空間(namespace)を共有し、root権限(システム管理者用のシステム内のすべての操作が可能な権限)を持つよう設定される。監視用コンテナ221内の内部アプリ情報取得部221aは、名前空間を共有するアプリケーションについて、lsofコマンドを用いてポート番号とPID(プロセスID)の対応を調べる。lsofコマンドは、プロセスが開いているファイルのリストを取得するコマンドである。そして内部アプリ情報取得部221aは、アプリケーションのプログラムへのリンクが示されたファイル「/proc/[PID]/exe」にアクセスしてPIDに対応するアプリケーションのファイルパスを得ることができる。 The monitoring Pod 220 has a monitoring container 221 . The monitoring container 221 has an internal application information acquisition unit 221a. The internal application information acquisition unit 221a acquires, via the OS 201, the file path (the directory path and file name of the program file of the application) of the application using the specific port number. For example, the monitoring container 221 shares a namespace with the OS 201 of the node 200 and is set to have root authority (authorization for all operations within the system for system administrators). The internal application information acquisition unit 221a in the monitoring container 221 uses the lsof command to check the correspondence between port numbers and PIDs (process IDs) for applications that share a namespace. The lsof command is a command to obtain a list of files opened by a process. Then, the internal application information acquisition unit 221a can access the file "/proc/[PID]/exe" indicating the link to the application program and obtain the file path of the application corresponding to the PID.

ノード300は、APIサーバ310とカスタムリソース320とを有する。APIサーバ310とカスタムリソース320とは、ノード300のプロセッサがプログラムを実行することにより実現される機能である。 Node 300 has API server 310 and custom resource 320 . The API server 310 and the custom resource 320 are functions implemented by the processor of the node 300 executing programs.

APIサーバ310は、コンテナオーケストレーションツールで提供されるAPIであり、各コンテナの位置(コンテナを実行してるノード)などの情報を管理する。カスタムリソース320は、コンテナオーケストレーションツールの拡張APIであり、Pod作成者が用意した任意の機能である。例えばカスタムリソース320は、データテーブルと、そのデータテーブルへのアクセスを許可するアプリケーションとの対応関係を示す許可情報を有する。そしてカスタムリソース320は、許可情報の取得要求に応じて、許可情報をプロキシコンテナ121に送信する。 The API server 310 is an API provided by a container orchestration tool, and manages information such as the location of each container (node executing the container). The custom resource 320 is an extension API of the container orchestration tool, and is an arbitrary function prepared by the Pod creator. For example, the custom resource 320 has permission information indicating a correspondence relationship between a data table and an application permitted to access the data table. Then, the custom resource 320 transmits permission information to the proxy container 121 in response to the permission information acquisition request.

なお、図7に示した各要素間を接続する線は通信経路の一部を示すものであり、図示した通信経路以外の通信経路も設定可能である。
図8は、DBへのアクセスの際の情報の流れを示す図である。例えばコンテナ212内のアプリケーション212aから、アプリケーションからのアクセスが許可されているテーブル内のデータを参照するクエリが出力されているものとする。出力されたクエリは、プロキシコンテナ121内のプロキシ部121aに送信される。プロキシ部121aは、アプリ情報取得部121bへクエリの送信元のIPアドレスとポート番号とを送信する。またプロキシ部121aは、接続先テーブル取得部121dにクエリを送信する。
The lines connecting the elements shown in FIG. 7 indicate part of the communication paths, and communication paths other than the illustrated communication paths can be set.
FIG. 8 is a diagram showing the flow of information when accessing a DB. For example, it is assumed that the application 212a within the container 212 outputs a query that refers to data within a table to which the application is permitted to access. The output query is sent to the proxy unit 121a within the proxy container 121. FIG. The proxy unit 121a transmits the IP address and port number of the transmission source of the query to the application information acquisition unit 121b. The proxy unit 121a also transmits a query to the connection destination table acquisition unit 121d.

アプリ情報取得部121bは、APIサーバ310へ監視用コンテナ221の位置の問合せを送信する。APIサーバ310は、監視用コンテナ221の位置を示す位置情報をアプリ情報取得部121bに送信する。アプリ情報取得部121bは、監視用コンテナ221に、クエリの送信元のポート番号を送信する。監視用コンテナ221内の内部アプリ情報取得部221aは、OS201からポート番号に対応するアプリケーションのファイルパスを取得し、そのファイルパスをアプリ情報取得部121bに送信する。アプリ情報取得部121bは、取得したファイルパスを許否判断部121eに送信する。 The application information acquisition unit 121b transmits an inquiry about the location of the monitoring container 221 to the API server 310 . The API server 310 transmits position information indicating the position of the monitoring container 221 to the application information acquisition unit 121b. The application information acquisition unit 121 b transmits the port number of the query transmission source to the monitoring container 221 . The internal application information acquisition unit 221a in the monitoring container 221 acquires the file path of the application corresponding to the port number from the OS 201, and transmits the file path to the application information acquisition unit 121b. The application information acquisition unit 121b transmits the acquired file path to the permission determination unit 121e.

許可情報取得部121cは、カスタムリソース320に許可情報の問合せを送信する。カスタムリソース320は、許可情報取得部121cに許可情報を送信する。許可情報取得部121cは、取得した許可情報を許否判断部121eに送信する。 The permission information acquisition unit 121c transmits a permission information inquiry to the custom resource 320 . The custom resource 320 transmits permission information to the permission information acquisition unit 121c. The permission information acquisition unit 121c transmits the acquired permission information to the permission determination unit 121e.

接続先テーブル取得部121dは、プロキシ部121aから送られたクエリのExplainコマンドをDBコンテナ122に送信する。DBコンテナ122は、クエリの接続先テーブル名を含むExplain結果を接続先テーブル取得部121dに送信する。接続先テーブル取得部121dは、接続先テーブルを示す情報を許否判断部121eに送信する。 The connection destination table acquisition unit 121d transmits to the DB container 122 the Explain command of the query sent from the proxy unit 121a. The DB container 122 transmits the explain result including the connection destination table name of the query to the connection destination table acquisition unit 121d. The connection destination table acquisition unit 121d transmits information indicating the connection destination table to the permission/refusal determination unit 121e.

許否判断部121eは、ファイルパス、許可情報、接続先テーブル名に基づいて、クエリによるアクセスの許否を判断し、判断結果(許可または不許可)をプロキシ部121aに送信する。プロキシ部121aは、クエリをDBコンテナ122に送信する。DBコンテナ122は、RDBMSによりクエリに応じたDB110へのアクセスを行い、アクセス結果をプロキシ部121aに送信する。プロキシ部121aは、アクセスが許可と判断された場合、取得したアクセス結果をアプリケーション212aに送信する。 The permission/refusal determination unit 121e determines permission/refusal of access based on the query based on the file path, permission information, and connection destination table name, and transmits the determination result (permission or non-permission) to the proxy unit 121a. The proxy unit 121a transmits the query to the DB container 122. FIG. The DB container 122 accesses the DB 110 according to the query using the RDBMS, and transmits the access result to the proxy unit 121a. The proxy unit 121a transmits the obtained access result to the application 212a when it is determined that the access is permitted.

図7、図8に示すようなアクセス制御機能によれば、プロキシコンテナ121によってDB110へのクエリが途中でキャッチされ、送信元のアプリケーションの通信の内容(クエリ)に基づいて、送信元のアプリケーションと接続先テーブルとが特定される。そして、特定されたアプリケーションから接続先テーブルへのアクセスを許可する許可情報が設定されていれば、クエリに基づくDB110へのアクセス結果が、クエリの送信元のアプリケーションに送信される。 According to the access control function as shown in FIGS. 7 and 8, the query to the DB 110 is caught by the proxy container 121 on the way, and based on the communication content (query) of the application of the transmission source, A connection destination table is specified. If permission information permitting access to the connection destination table from the identified application is set, the result of access to the DB 110 based on the query is transmitted to the application that sent the query.

なお、クエリの送信元のアプリケーションのIPアドレスは変更される可能性がある。そこでプロキシコンテナ121は、クエリの送信元のノード200内の監視用コンテナ221を介してクエリに送信元のポート番号に対応するアプリケーションのファイルパスを取得する。これにより、送信元のアプリケーションを一意に特定することができる。 Note that the IP address of the application that sent the query may change. Therefore, the proxy container 121 acquires the file path of the application corresponding to the port number of the transmission source of the query via the monitoring container 221 in the node 200 of the transmission source of the query. This makes it possible to uniquely identify the source application.

図9は、アプリケーションのファイルパスの取得手順の一例を示すフローチャートである。以下、図9に示す処理をステップ番号に沿って説明する。
[ステップS101]プロキシコンテナ121では、アプリ情報取得部121bがプロキシ部121aから、クエリの送信元のIPアドレスとポート番号を受信する。
FIG. 9 is a flow chart showing an example of a procedure for acquiring a file path of an application. The processing shown in FIG. 9 will be described below along with the step numbers.
[Step S101] In the proxy container 121, the application information acquisition unit 121b receives the IP address and port number of the query transmission source from the proxy unit 121a.

[ステップS102]アプリ情報取得部121bは、APIサーバ310から監視用Pod220の情報を取得する。例えばアプリ情報取得部121bは、APIサーバ310からAPIサーバ310で管理しているすべてのPodを示すPod一覧情報を取得する。アプリ情報取得部121bは、取得したPod一覧情報から、クエリの送信元と同じノードに設けられている監視用Pod220の情報を抽出する。抽出される情報には、監視用Pod220のIPアドレスが含まれる。 [Step S<b>102 ] The application information acquisition unit 121 b acquires information on the monitoring Pod 220 from the API server 310 . For example, the application information acquisition unit 121b acquires Pod list information indicating all Pods managed by the API server 310 from the API server 310 . The application information acquisition unit 121b extracts information on the monitoring Pod 220 provided in the same node as the query transmission source from the acquired Pod list information. The extracted information includes the IP address of the monitoring Pod 220 .

図10は、Pod一覧情報の一例を示す図である。Pod一覧情報31には、例えばPodの名前(NAME)に対応付けて、PodのIPアドレス(IP)、Podを実行しているノードの名称(NODE)などが示されている。アプリ情報取得部121bは、クエリの送信元のIPアドレスとPod一覧情報31のIPの列とを照合して、IPアドレスが一致するレコードを特定する。Pod一覧情報31は、特定したレコードのNODE列の値(ノードの名称)を参照することで、クエリの送信元のアプリケーションを含むPodがどのノードで動作しているのかを認識する。すなわち、ポート番号に対応するファイルパスの問合せ先の監視用Podが、どのノードの監視用Podなのかが判明する。 FIG. 10 is a diagram illustrating an example of Pod list information. The Pod list information 31 indicates, for example, the IP address (IP) of the Pod, the name (NODE) of the node executing the Pod, etc., in association with the name (NAME) of the Pod. The application information acquisition unit 121b collates the IP address of the transmission source of the query with the IP column of the Pod list information 31 to identify a record with a matching IP address. The Pod list information 31 refers to the NODE column value (node name) of the specified record to recognize the node on which the Pod including the query transmission source application is operating. That is, it is possible to determine which node's monitoring Pod is the monitoring Pod to which the inquiry about the file path corresponding to the port number belongs.

Pod一覧情報31に示されているPodの名前は、例えば「-」の左側が任意に指定する名前であり、「-」の右側はシステムにより自動で付与されるハッシュ値である。そこで監視用Podの任意に設定できる名前を例えば「checkapp」と統一しておけば、アプリ情報取得部121bは、NAMEの列の値に基づいて、各ノード内のPodのうち、どのPodが監視用Podなのかを判断できる。アプリ情報取得部121bは、特定したレコードのNAMME列とNODE列の情報から目的の監視用コンテナ221を含む監視用Pod220を特定する。 The Pod name shown in the Pod list information 31 is, for example, an arbitrarily specified name on the left side of "-", and a hash value automatically given by the system on the right side of "-". Therefore, if the arbitrarily set name of the monitoring Pod is unified with, for example, "checkapp", the application information acquisition unit 121b determines which Pod is the monitoring Pod among the Pods in each node based on the value of the NAME column. It can be determined whether it is a Pod for use. The application information acquisition unit 121b identifies the monitoring Pod 220 including the target monitoring container 221 from the information in the NAME column and the NODE column of the identified record.

以下、図9の説明に戻る。
[ステップS103]アプリ情報取得部121bは、監視用コンテナ221に送信元のポート番号を送信する。
Hereinafter, the explanation will return to FIG.
[Step S<b>103 ] The application information acquisition unit 121 b transmits the source port number to the monitoring container 221 .

[ステップS104]監視用コンテナ221では、内部アプリ情報取得部221aがポート番号に対応するPIDをOS201から取得する。例えば内部アプリ情報取得部221aは、lsofコマンドをOS201に実行させ、アプリ情報取得部121bから取得したポート番号で実行中のプロセスのPIDを取得する。 [Step S<b>104 ] In the monitoring container 221 , the internal application information acquisition unit 221 a acquires the PID corresponding to the port number from the OS 201 . For example, the internal application information acquisition unit 221a causes the OS 201 to execute the lsof command, and acquires the PID of the process being executed with the port number acquired from the application information acquisition unit 121b.

[ステップS105]内部アプリ情報取得部221aは、PIDに対応するプログラムのファイルパスを取得する。例えば内部アプリ情報取得部221aは、プロキシコンテナ121にファイル「/proc/[PID]/exe」([PID]はステップS104で取得したPID)にアクセスし、ファイル内の情報を取得する。このファイルは、PIDに対応する実行ファイルへのシンボリックリンクであり、該当ファイルのファイルパスが含まれている。 [Step S105] The internal application information acquisition unit 221a acquires the file path of the program corresponding to the PID. For example, the internal application information acquisition unit 221a accesses the file "/proc/[PID]/exe" ([PID] is the PID acquired in step S104) in the proxy container 121 and acquires information in the file. This file is a symbolic link to the executable file corresponding to the PID and contains the file path of that file.

[ステップS106]内部アプリ情報取得部221aは、プロキシコンテナ121に、指定されたポート番号に対応するアプリケーションのファイルパスを送信する。
このようにして、ポート番号に対応するアプリケーションのファイルパスを取得することができる。これにより、アプリケーションからクエリが送信されるごとにポート番号が異なっていても、プロキシコンテナ121においてクエリの送信元のアプリケーションを正しく認識できる。
[Step S<b>106 ] The internal application information acquisition unit 221 a transmits the file path of the application corresponding to the specified port number to the proxy container 121 .
In this way, the file path of the application corresponding to the port number can be obtained. As a result, even if the port number differs each time a query is sent from an application, the proxy container 121 can correctly recognize the application that sent the query.

テーブルへのアプリケーションごとのアクセス制御を行うため、プロキシコンテナ121は、クエリの送信元のアプリケーションの把握に加え、アクセスのために接続する接続先テーブル名を取得する。 In order to control access to a table for each application, the proxy container 121 acquires the connection destination table name to be connected for access, in addition to grasping the application that sent the query.

なお、メッセージ内のクエリから正確な情報を取り出すためには、パーサを用いてクエリを解析することとなる。しかし、クエリにはDBごとに様々な方言があり、これらすべてのDBに応じたパーサをプロキシコンテナ121に実装するのは困難であり、拡張性を妨げる可能性もある。 Note that a parser is used to analyze the query in order to extract the correct information from the query in the message. However, queries have various dialects for each DB, and it is difficult to implement a parser corresponding to all these DBs in the proxy container 121, and it may hinder extensibility.

そこでプロキシコンテナ121は、クエリに対するExplainコマンドという比較的解析が簡単な情報を用いてアクセス先のテーブルを取得する。クエリに対するExplain構文は基本的に後付けが容易なため、クエリを解析せずにすむ。また、Explain結果はyamlやJSON(JavaScript Object Notation)などの半構造データで返すことが可能なRDBMSが多く、Explainコマンドを用いれば容易に接続先テーブル名を抽出できる。 Therefore, the proxy container 121 acquires the table to be accessed using the explain command for the query, which is information that is relatively easy to analyze. Explain syntax for queries is basically easy to retrofit, so you don't have to parse the query. In addition, many RDBMSs can return explain results as semi-structured data such as yaml and JSON (JavaScript Object Notation), and the name of the connection destination table can be easily extracted using the explain command.

図11は、接続先テーブル名の取得方法の一例を示す図である。アプリケーション212aからクエリ41がプロキシコンテナ121に送信されると、プロキシコンテナ121内の接続先テーブル取得部121dは、クエリ41の内容を含むExplainコマンド42を生成する。Explainコマンド42は、命令文「Explain」に続けて、クエリ41の内容を記載したものである。接続先テーブル取得部121dは、生成したExplainコマンド42をDBコンテナ122に送信する。 FIG. 11 is a diagram illustrating an example of a method of acquiring a connection destination table name. When the application 212 a sends the query 41 to the proxy container 121 , the connection destination table acquisition unit 121 d inside the proxy container 121 generates an explain command 42 including the contents of the query 41 . The explain command 42 describes the contents of the query 41 following the statement "Explain". The connection destination table acquisition unit 121 d transmits the generated Explain command 42 to the DB container 122 .

DBコンテナ122は、Explainコマンド42を受信すると、Explainコマンド42内に示されるクエリ41の実行計画を生成する。そしてDBコンテナ122は、実行計画をExplain結果43としてプロキシコンテナ121に送信する。 Upon receiving the explain command 42 , the DB container 122 generates an execution plan for the query 41 indicated in the explain command 42 . The DB container 122 then transmits the execution plan as an explain result 43 to the proxy container 121 .

図11に示されているのはPostgreSQLでのExplain結果43である。このExplain結果43には、接続先テーブルの名称「”Relation Name”:”t”,」が含まれている。プロキシコンテナ121は、Explain結果43から、接続先テーブルの名称の記述を、接続先テーブル名として抽出する。 Shown in FIG. 11 is the explain result 43 in PostgreSQL. This explain result 43 includes the name of the connection destination table ""Relation Name":"t",". The proxy container 121 extracts the description of the name of the connection destination table from the explain result 43 as the connection destination table name.

このようにプロキシコンテナ121は、Explainのコマンド文字列に、クエリ41の内容を追加するだけでExplainコマンド42を生成できる。すなわちクエリそのものを解析する場合は文字列を解釈しなければならないが、Explainコマンド42でJSON形式の実行計画をExplain結果43として取得できる。JSON形式の実行計画は、既存のJSONライブラリにより解析できる。そこでプロキシコンテナ121は、JSONライブラリを用いて、Explain結果43における「Plan」内の「Relation Name」の値を読み込む。読み込んだ値が、接続先テーブルの名称である。このようにExplainコマンド42を用いることで、接続先テーブルを容易に判断できる。 In this manner, the proxy container 121 can generate the explain command 42 simply by adding the content of the query 41 to the explain command string. That is, when analyzing the query itself, the character string must be interpreted, but the explain command 42 can acquire the execution plan in JSON format as the explain result 43 . Execution plans in JSON format can be parsed by existing JSON libraries. Therefore, the proxy container 121 uses the JSON library to read the value of “Relation Name” in “Plan” in the Explain result 43 . The read value is the name of the connection destination table. By using the explain command 42 in this manner, the connection destination table can be easily determined.

Explainコマンド42による実行計画の出力機能は多くのDBに実装されており、NoSQLであるMongoDBや、グラフDBのNeo4jなども例外ではない。すなわち、Explainコマンド42を用いた接続先テーブルの判定はRDBMSに限らず、その他の様々なDBでも同様に可能である。 The execution plan output function by the explain command 42 is implemented in many DBs, and MongoDB, which is NoSQL, and Neo4j, which is a graph DB, are no exception. That is, determination of the connection destination table using the explain command 42 is not limited to RDBMS, and can be similarly performed in various other DBs.

接続先テーブルに対してアクセスを許可するアプリケーションの種別を示す許可情報は、Pod作成者30によってカスタムリソース320に予め定義される。プロキシコンテナ121は、カスタムリソース320から許可情報を取得することで、接続先テーブルへのアクセスが許可されているアプリケーションを認識できる。 Permission information indicating the type of application permitted to access the connection destination table is predefined in the custom resource 320 by the Pod creator 30 . By acquiring permission information from the custom resource 320, the proxy container 121 can recognize applications permitted to access the connection destination table.

図12は、カスタムリソースから取得する許可情報の一例を示す図である。例えばプロキシコンテナ121は、カスタムリソース320から、すべてのデータテーブルについての許可情報51,52,・・・を取得する。許可情報51,52,・・・は、アクセス制限をかけるRDB1つに対して1つ作成される。許可情報51,52,・・・には、RDBのサービス名、RDBのポート番号、許可するアプリケーションのファイルパス、許可するテーブル名などが含まれる。 FIG. 12 is a diagram illustrating an example of permission information acquired from custom resources. For example, the proxy container 121 obtains permission information 51, 52, . One piece of permission information 51, 52, . . . is created for one RDB to which access is restricted. The permission information 51, 52, .

プロキシコンテナ121は、クエリ41の送信元のアプリケーションのファイルパスと接続先テーブルの名前との組を、許可情報51,52,・・・と照合することで、アクセスの許否を判断する。 The proxy container 121 compares the set of the file path of the application that sent the query 41 and the name of the connection destination table with the permission information 51, 52, .

なお、監視用コンテナ221との通信や、テーブル取得のためのExplainコマンド42の実行は、DBへのアクセス処理において無視できないオーバーヘッドとなる可能性がある。そこでプロキシコンテナ121は通信の投機的実行を行う。 Note that communication with the monitoring container 221 and execution of the explain command 42 for obtaining a table may become overhead that cannot be ignored in the DB access process. Therefore, the proxy container 121 performs communication speculative execution.

図13は、投機的なDBアクセス処理の一例を示すシーケンス図である。プロキシコンテナ121は、DBへのクエリを受信すると、アプリケーションのファイルパスの取得処理、接続先テーブル名の取得処理、許可情報の取得処理、およびDB110に対するクエリの実行処理を並列に行う。 FIG. 13 is a sequence diagram illustrating an example of speculative DB access processing. Upon receiving a query to the DB, the proxy container 121 performs, in parallel, application file path acquisition processing, connection destination table name acquisition processing, permission information acquisition processing, and query execution processing for the DB 110 .

アプリケーションのファイルパスの取得処理は、4つのステップS11~S14に分かれている。まずプロキシコンテナ121は、APIサーバ310に監視用コンテナ221の位置の問合せを送信する(ステップS11)。APIサーバ310は、問合せ結果として、例えばPod一覧情報をプロキシコンテナ121に送信する(ステップS12)。プロキシコンテナ121は、問合せ結果に基づいて監視用コンテナ221の位置を認識し、監視用コンテナ221にクエリの送信元のポート番号に対応するアプリケーションを問い合わせる(ステップS13)。監視用コンテナ221は、アプリケーションのファイルパスをプロキシコンテナ121に送信する(ステップS14)。以上が、アプリケーションのファイルパスの取得処理である。 The application file path acquisition process is divided into four steps S11 to S14. First, the proxy container 121 sends an inquiry about the location of the monitoring container 221 to the API server 310 (step S11). The API server 310 transmits, for example, Pod list information to the proxy container 121 as a query result (step S12). The proxy container 121 recognizes the location of the monitoring container 221 based on the inquiry result, and inquires of the monitoring container 221 about the application corresponding to the port number of the query transmission source (step S13). The monitoring container 221 transmits the file path of the application to the proxy container 121 (step S14). The above is the processing for acquiring the file path of the application.

接続先テーブル名の取得処理は、2つのステップS21~S22に分かれている。まずプロキシコンテナ121は、DBコンテナ122に、クエリの内容を含むExplainコマンドを送信する(ステップS21)。DBコンテナ122は、Explainコマンドに応じて、クエリの実行計画(接続先テーブル名を含む)を示すExplain結果をプロキシコンテナ121に送信する(ステップS22)。以上が、接続先テーブル名の取得処理である。 The connection destination table name acquisition process is divided into two steps S21 and S22. First, the proxy container 121 transmits an explain command including the content of the query to the DB container 122 (step S21). In response to the explain command, the DB container 122 sends an explain result indicating the query execution plan (including the connection destination table name) to the proxy container 121 (step S22). The above is the connection destination table name acquisition processing.

許可情報の取得処理は、2つのステップS31~S32に分かれている。まずプロキシコンテナ121は、カスタムリソース320に許可情報を要求する(ステップS31)。カスタムリソース320は、DB110内のすべてのデータテーブルに関する許可情報群をプロキシコンテナ121に送信する(ステップS32)。以上が、許可情報の取得処理である。 Permission information acquisition processing is divided into two steps S31 and S32. First, the proxy container 121 requests permission information from the custom resource 320 (step S31). The custom resource 320 sends permission information groups regarding all data tables in the DB 110 to the proxy container 121 (step S32). The above is the acquisition processing of the permission information.

クエリの実行処理は、2つのステップS41~S42に分かれている。まずプロキシコンテナ121は、DBコンテナ122に対してクエリを送信することで、クエリの実行を要求する(ステップS41)。DBコンテナ122は、クエリのアクセス先のデータテーブルへの接続を行い、該当データテーブルに対してクエリに応じた処理を実行し、実行結果をプロキシコンテナ121に送信する(ステップS42)。クエリがデータの参照を要求していれば、実行結果にはクエリに応じたデータが含まれる。クエリがDB110内でのデータの操作(更新、削除など)を要求していれば、操作処理の成否を示す情報が実行結果に含まれる。以上が、クエリの実行処理である。 The query execution process is divided into two steps S41 and S42. First, the proxy container 121 requests execution of the query by sending the query to the DB container 122 (step S41). The DB container 122 connects to the data table accessed by the query, executes processing corresponding to the query on the data table, and transmits the execution result to the proxy container 121 (step S42). If the query requires data to be referenced, the execution result will contain the data according to the query. If the query requests data manipulation (update, deletion, etc.) within the DB 110, the execution result includes information indicating whether the manipulation process was successful. The above is the query execution processing.

プロキシコンテナ121は、アプリケーションのファイルパスの取得処理、接続先テーブル名の取得処理、および許可情報の取得処理が完了すると、アクセスの許否を判断する。プロキシコンテナ121は、アクセスの許否の判断の前にクエリの実行結果を受信した場合、アクセスの許否が判断できるようになるまでアプリケーションへの応答を待機する。そしてプロキシコンテナ121は、クエリに基づく接続先テーブルへのアクセスが許可されたアクセスであると判断できた場合、クエリの実行結果を、クエリの送信元のアプリケーションに送信する(ステップS51)。またプロキシコンテナ121は、クエリに基づく接続先テーブルへのアクセスが許可されていないアクセスであると判断した場合、権限エラーを示すメッセージを、クエリの送信元のアプリケーションに送信する(ステップS52)。 The proxy container 121 determines whether or not to permit access when the application file path acquisition process, the connection destination table name acquisition process, and the permission information acquisition process are completed. If the proxy container 121 receives a query execution result before judging access permission or denial, the proxy container 121 waits for a response to the application until it becomes possible to judge access permission or denial. Then, when the proxy container 121 determines that the access to the connection destination table based on the query is permitted, the proxy container 121 transmits the execution result of the query to the application that sent the query (step S51). If the proxy container 121 determines that access to the connection destination table based on the query is not permitted, it sends a message indicating an authority error to the application that sent the query (step S52).

図13に示した例は、クエリが短時間で実行できた場合を想定したものである。クエリの実行に長時間を要する場合、クエリの実行が終了するよりも先にアクセスの許否の判断結果が得られる場合がある。この場合において、アクセスが不許可であれば、クエリの実行を中止することで、無駄な処理の発生を最小限に抑えることができる。 The example shown in FIG. 13 assumes that the query can be executed in a short time. If it takes a long time to execute a query, the access permission/denial decision may be obtained before the execution of the query is completed. In this case, if the access is not permitted, it is possible to minimize the occurrence of wasteful processing by canceling query execution.

図14は、クエリの実行に時間がかかる場合の投機的なDBアクセス処理の一例を示すシーケンス図である。アプリケーションのファイルパスの取得処理、接続先テーブル名の取得処理、許可情報の取得処理、およびDB110に対するクエリの実行処理を並列に行う点は、図13と同様である。またアプリケーションのファイルパスの取得処理、接続先テーブル名の取得処理、および許可情報の取得処理の内容も図13と同様である。クエリの実行処理については、クエリの実行の要求(ステップS41)までは、図13と同様である。 FIG. 14 is a sequence diagram illustrating an example of speculative DB access processing when query execution takes a long time. Similar to FIG. 13, the application file path acquisition process, the connection destination table name acquisition process, the permission information acquisition process, and the query execution process for the DB 110 are performed in parallel. The contents of the application file path acquisition process, the connection destination table name acquisition process, and the permission information acquisition process are also the same as in FIG. Query execution processing is the same as in FIG. 13 up to the query execution request (step S41).

プロキシコンテナ121は、クエリの実行が終了するよりも先に許可されたアクセスであると判断した場合、DBコンテナ122からの実行結果の受信を待つ。その後、DBコンテナ122は、クエリの実行が終了すると実行結果をプロキシコンテナ121に送信する(ステップS43)。そしてプロキシコンテナ121は、クエリの実行結果を、クエリの送信元のアプリケーションに送信する(ステップS53)。 If the proxy container 121 determines that the access is permitted before the query execution ends, it waits for the execution result from the DB container 122 . After that, the DB container 122 sends the execution result to the proxy container 121 when execution of the query is finished (step S43). Then, the proxy container 121 transmits the execution result of the query to the application that sent the query (step S53).

他方、プロキシコンテナ121は、クエリの実行が終了するよりも先に不許可のアクセスであると判断した場合、クエリの実行終了を待たずに、DBコンテナ122に対してクエリの実行のキャンセルを示すメッセージを送信する(ステップS44)。そしてプロキシコンテナ121は、権限エラーを示すメッセージを、クエリの送信元のアプリケーションに送信する(ステップS54)。 On the other hand, if the proxy container 121 determines that the access is unauthorized before the query execution ends, the proxy container 121 indicates cancellation of the query execution to the DB container 122 without waiting for the query execution end. A message is transmitted (step S44). The proxy container 121 then sends a message indicating an authority error to the application that sent the query (step S54).

このような処理を行うことにより、本来の通信処理に加わるオーバーヘッドを最小限にしつつ、アプリケーションごとのアクセス制御を実現することが可能となる。
以上のように、第2の実施の形態のシステムでは、プロキシコンテナ121は、クエリの送信元の情報に基づいてPIDやアプリケーションのファイルパスまで調査し、RDBMSへの問合せを用いて接続先テーブル名を入手する。これにより「IPアドレスとポート番号による制限ではアプリケーション単位の切り分けや送信先テーブルの判別ができない」という第1の課題が解決される。さらにプロキシコンテナ121は、ユーザとデータテーブルの対応関係ではなく、アプリケーションとデータテーブルの対応関係を示す許可情報を直接チェックする。これにより、「テーブルごとのアクセス制御はRDBMSのユーザをアプリケーションに紐づけるだけでは十分でない」という第2の課題も解決される。
By performing such processing, it is possible to implement access control for each application while minimizing the overhead added to the original communication processing.
As described above, in the system of the second embodiment, the proxy container 121 investigates the PID and the file path of the application based on the information of the query transmission source, and uses the query to the RDBMS to determine the connection destination table name. to obtain. This solves the first problem that "restrictions based on IP addresses and port numbers make it impossible to separate application units and determine transmission destination tables." Furthermore, the proxy container 121 directly checks the permission information indicating the correspondence between the application and the data table, not the correspondence between the user and the data table. This also solves the second problem that access control for each table is not sufficient to link RDBMS users to applications.

〔第3の実施の形態〕
第3の実施の形態は、ノード200においてOS201と他のPodとのネームスペースの共有化が図られていない場合においても、ポート番号に対応するアプリケーションを特定できるようにしたものである。以下、第3の実施の形態における第2の実施の形態との相違点について説明する。
[Third Embodiment]
The third embodiment makes it possible to specify an application corresponding to a port number even when the node 200 does not share a namespace between the OS 201 and other Pods. Differences between the third embodiment and the second embodiment will be described below.

第2の実施の形態では、ノード200内のPodのIPアドレス、ポート番号のネームスペース(ネットワークネームスペース)がOS201のネームスペースと一致していることが前提となっている。この前提が満たされれば、送信元ポート番号をOS201のポート番号一覧と照合する(lsofコマンドによる検索)ことでPIDを辿ることができ、第2の実施の形態で示した手順でのアクセス制御が可能となる。 In the second embodiment, it is assumed that the namespace (network namespace) of the Pod IP address and port number in the node 200 matches the namespace of the OS 201 . If this premise is satisfied, the PID can be traced by comparing the source port number with the port number list of the OS 201 (search by the lsof command), and the access control according to the procedure shown in the second embodiment can be performed. It becomes possible.

ネットワークネームスペースが一致しているという前提を満たすために、Pod作成者30は、コンテナ作成時のオプションにおいて、ネットワークネームスペースをOS201と共有するというオプションを使う。例えばkubernetesの場合では、Pod(機能別にまとまったコンテナ群)を作成するときに「HostNetwork」というオプションをつけることで、ネットワークネームスペースを一致させることが可能である。ただしネットワークネームスペースの共有は、セキュリティリスクを高めてしまうため、この設定ができない場合がある。 In order to satisfy the premise that the network namespaces match, the Pod creator 30 uses the option of sharing the network namespace with the OS 201 in the options when creating the container. For example, in the case of kubernetes, it is possible to match the network namespace by adding an option "HostNetwork" when creating a Pod (a group of containers grouped by function). However, sharing network namespaces increases the security risk, so this setting may not be possible.

第2の実施の形態では監視用コンテナ221がポート番号からアプリを特定するが、これはユーザアプリPod210とOS201のネットワークネームスペースが一致していないと成立しない。何故なら送信元のアプリケーションのポート番号はユーザアプリPod210内のネットワークネームスペースのみで利用されるポート番号であり、ホストOSであるOS201のネットワークネームスペースから見ることができないためである。 In the second embodiment, the monitoring container 221 identifies the application from the port number. This is because the port number of the source application is used only in the network namespace within the user application Pod 210 and cannot be seen from the network namespace of the OS 201, which is the host OS.

そこで第3の実施の形態では、ユーザアプリPod210内に情報取得用コンテナを追加し、情報取得用のコンテナを介して、ポート番号に対応するアプリケーションのファイルパスの取得を可能とする。 Therefore, in the third embodiment, an information acquisition container is added in the user application Pod 210, and the file path of the application corresponding to the port number can be acquired via the information acquisition container.

図15は、第3の実施の形態におけるアプリケーション単位でのアクセス制御機能の一例を示すブロック図である。第3の実施の形態では、ユーザアプリPod210内に情報取得コンテナ213が追加されている点が第2の実施の形態と異なる。またポート番号に対応するアプリケーションのファイルパスの取得処理以外の処理は、第2の実施の形態と同様である。以下、第3の実施の形態におけるポート番号に対応するアプリケーションのファイルパスの取得処理について説明する。 FIG. 15 is a block diagram showing an example of an access control function for each application according to the third embodiment. The third embodiment differs from the second embodiment in that an information acquisition container 213 is added within the user application Pod 210 . Processing other than obtaining the file path of the application corresponding to the port number is the same as in the second embodiment. The process of acquiring the file path of the application corresponding to the port number in the third embodiment will be described below.

プロキシコンテナ121は、アプリケーション212aからクエリを取得すると、クエリを含むパケットからIPアドレスとポート番号を取得する。そしてプロキシコンテナ121は、取得したIPアドレスを有するユーザアプリPod210内の情報取得コンテナ213に対して、クエリの送信元のポート番号に対応するアプリケーション問合せを送信する。なお情報取得コンテナ213のパケット受信用のポート番号は固定的に決めてあり、プロキシコンテナ121には、情報取得コンテナ213のパケット受信用のポート番号が予め登録されている。 When the proxy container 121 obtains a query from the application 212a, it obtains the IP address and port number from the packet containing the query. Then, the proxy container 121 transmits an application query corresponding to the port number of the query transmission source to the information acquisition container 213 in the user application Pod 210 having the acquired IP address. The packet reception port number of the information acquisition container 213 is fixed, and the packet reception port number of the information acquisition container 213 is registered in the proxy container 121 in advance.

情報取得コンテナ213は、アプリケーション問合せで指定されたポート番号に基づいて、そのポート番号に対応するinode番号を取得する。inode番号は、ファイルシステムで管理されているファイル、ディレクトリそれぞれに関する情報(inode)の識別番号である。ポート番号には、そのポート番号を用いた通信に使用するファイル(例えば受信データのバッファ)が存在し、そのファイルにinode番号が付与されている。inode番号はネームスペースに関わらずノード200内で一意である。 Based on the port number specified by the application inquiry, the information acquisition container 213 acquires the inode number corresponding to the port number. The inode number is an identification number of information (inode) regarding each of the files and directories managed by the file system. A port number has a file (for example, a received data buffer) used for communication using that port number, and an inode number is assigned to the file. An inode number is unique within a node 200 regardless of namespace.

情報取得コンテナ213は、監視用コンテナ221内の内部アプリ情報取得部221aに、inodeに対応するアプリケーションの問合せを行う。内部アプリ情報取得部221aは、指定されたinode番号を/procディレクトリ内で検索し、inode番号とアプリケーションのファイルパスとの対応関係を取得する。内部アプリ情報取得部221aは、取得したアプリケーションのファイルパスを情報取得コンテナ213に送信する。情報取得コンテナ213は、受信したアプリケーションのファイルパスをプロキシコンテナ121に送信する。 The information acquisition container 213 inquires of the internal application information acquisition unit 221a in the monitoring container 221 about the application corresponding to the inode. The internal application information acquisition unit 221a searches the /proc directory for the designated inode number, and acquires the correspondence between the inode number and the file path of the application. The internal application information acquisition unit 221 a transmits the acquired file path of the application to the information acquisition container 213 . The information acquisition container 213 transmits the received file path of the application to the proxy container 121 .

このようにしてプロキシコンテナ121は、ノード200内のPodとOS201とのネットワークネームスペースの共有化が図られていない場合であっても、ポート番号に対応するアプリケーションのファイルパスを取得することができる。 In this way, the proxy container 121 can acquire the file path of the application corresponding to the port number even when the Pod in the node 200 and the OS 201 do not share the network namespace. .

また図15の例では、情報取得コンテナ213のデータ受信用のポート番号はあらかじめ決められている。そのため、プロキシコンテナ121は、APIサーバに問合せに行かずに、情報取得コンテナ213との通信を確立できる。また情報取得コンテナ213は、同じホスト内での接続に使われる通信形式であるUNIX(登録商標)ドメインソケットを使って、同じノード200内の監視用コンテナ221へのアクセスが可能である。以上より、APIサーバへの通信は不要となる。 Also, in the example of FIG. 15, the port number for data reception of the information acquisition container 213 is determined in advance. Therefore, the proxy container 121 can establish communication with the information acquisition container 213 without querying the API server. Also, the information acquisition container 213 can access the monitoring container 221 within the same node 200 using a UNIX (registered trademark) domain socket, which is a communication format used for connection within the same host. As described above, communication to the API server is unnecessary.

〔その他の実施の形態〕
第2の実施の形態では、クエリを受信するごとに、監視用コンテナ221の位置問い合わせを行っているが、監視用コンテナ221の位置を一度取得したら、Pod一覧情報31をキャッシュとして保持しておいてもよい。これにより、以降のクエリの受信時には、APIサーバ310への監視用コンテナ221の位置の問合せを省略することができる。
[Other embodiments]
In the second embodiment, an inquiry about the location of the monitoring container 221 is made each time a query is received. You can This makes it possible to omit the inquiry of the location of the monitoring container 221 to the API server 310 when subsequent queries are received.

また第2の実施の形態では、クエリを受信するごとに、許可情報の取得処理を行っているが、許可情報を一度取得したら、許可情報をキャッシュとして保持しておいてもよい。これにより、以降のクエリの受信時には、カスタムリソース320からの許可情報の取得処理を省略することができる。 In addition, in the second embodiment, the permission information acquisition process is performed each time a query is received, but once the permission information is acquired, the permission information may be held as a cache. As a result, when subsequent queries are received, the process of obtaining permission information from the custom resource 320 can be omitted.

以上、実施の形態を例示したが、実施の形態で示した各部の構成は同様の機能を有する他のものに置換することができる。また、他の任意の構成物や工程が付加されてもよい。さらに、前述した実施の形態のうちの任意の2以上の構成(特徴)を組み合わせたものであってもよい。 Although the embodiment has been illustrated above, the configuration of each unit shown in the embodiment can be replaced with another one having the same function. Also, any other components or steps may be added. Furthermore, any two or more configurations (features) of the above-described embodiments may be combined.

1 管理対象ノード
2a,2b Pod
3a,3b 第1コンテナ
4 第2コンテナ
5a,5b ソフトウェア
6 監視ソフトウェア
7a~7d アクセス要求
10 情報処理装置
11 記憶部
11a,11b データテーブル
12 処理部
12a 許可情報
1 managed node 2a, 2b Pod
3a, 3b first container 4 second container 5a, 5b software 6 monitoring software 7a-7d access request 10 information processing device 11 storage unit 11a, 11b data table 12 processing unit 12a permission information

Claims (8)

コンピュータが、
管理対象ノード上に設けられた第1コンテナで実行されているソフトウェアに一時的に割り当てられたポート番号を送信元とするデータテーブルへのアクセス要求を、前記管理対象ノードから受信すると、前記管理対象ノード上に設けられた第2コンテナから、前記ポート番号に対応する前記ソフトウェアを示すソフトウェア名を取得し、
取得した前記ソフトウェア名と、前記データテーブルに対するアクセスを許可する許可対象ソフトウェアを示す許可対象ソフトウェア名が設定された許可情報とに基づいて、前記アクセス要求に応じた前記データテーブルへのアクセスの許否を決定する、
アクセス制御方法。
the computer
When a data table access request originating from a port number temporarily assigned to software running in a first container provided on a managed node is received from the managed node, Acquiring a software name indicating the software corresponding to the port number from a second container provided on the node;
Permission or denial of access to the data table in response to the access request is determined based on the obtained software name and permission information in which the permitted software name indicating the permitted software to be permitted to access the data table is set. decide,
Access control method.
前記第2コンテナは、前記管理対象ノードのオペレーティングシステムから前記ポート番号に対応する前記ソフトウェアを示す前記ソフトウェア名を取得し、取得した前記ソフトウェア名を前記コンピュータに送信する、
請求項1記載のアクセス制御方法。
The second container acquires the software name indicating the software corresponding to the port number from the operating system of the managed node, and transmits the acquired software name to the computer.
The access control method according to claim 1.
前記第1コンテナとネットワークのアドレスを共有する第3コンテナが、前記ポート番号に対応する前記ソフトウェアの実行ファイルのファイルシステム内でのファイル識別番号を取得し、
前記第2コンテナは、前記第3コンテナから前記ファイル識別番号を取得し、オペレーティングシステムから、前記ファイル識別番号に対応する前記実行ファイルのファイルパスを取得し、取得した前記ファイルパスを前記ソフトウェア名として前記コンピュータに送信する、
請求項1または2に記載のアクセス制御方法。
A third container sharing a network address with the first container obtains a file identification number within a file system of the software executable file corresponding to the port number;
The second container obtains the file identification number from the third container, obtains the file path of the executable file corresponding to the file identification number from the operating system, and uses the obtained file path as the software name. transmit to said computer;
3. The access control method according to claim 1 or 2.
前記アクセス要求に基づいて、アクセス対象の前記データテーブルを示すデータテーブル名を取得し、
前記許可情報には、データベースに含まれるアクセス対象データテーブルを示すアクセス対象データテーブル名と、前記アクセス対象データテーブルへのアクセスを許可する許可対象ソフトウェアを示す前記許可対象ソフトウェア名との組が設定されており、
アクセスの許否の決定では、取得した前記データテーブル名と前記ソフトウェア名との組に対応する前記アクセス対象データテーブル名と前記許可対象ソフトウェア名との組が前記許可情報に設定されている場合、アクセスを許可すると決定する、
請求項1ないし3のいずれかに記載のアクセス制御方法。
obtaining a data table name indicating the data table to be accessed based on the access request;
The permission information includes a set of an access target data table name indicating an access target data table contained in a database and the permission target software name indicating permission target software permitted to access the access target data table. and
In determining whether or not to permit access, if a set of the access target data table name and the permission target software name corresponding to the acquired set of the data table name and the software name is set in the permission information, access is permitted. decide to allow
4. The access control method according to any one of claims 1 to 3.
前記データテーブル名の取得では、前記データテーブルを管理しているデータベース管理システムから、前記アクセス要求についての実行計画を取得し、前記実行計画から前記データテーブル名を取得する、
請求項4記載のアクセス制御方法。
Acquiring the data table name includes acquiring an execution plan for the access request from a database management system managing the data table, and acquiring the data table name from the execution plan.
5. The access control method according to claim 4.
前記ソフトウェア名の取得と並行して、前記アクセス要求に応じた前記データテーブルへのアクセス処理を実行し、
取得した前記ソフトウェア名に基づいてアクセスを許可すると決定した場合、前記アクセス処理の結果を前記アクセス要求の送信元の前記ソフトウェアに送信し、
取得した前記ソフトウェア名に基づいてアクセスを許可しないと決定した場合、前記アクセス処理の結果の前記アクセス要求の送信元の前記ソフトウェアへの送信を抑止する、
請求項1ないし5のいずれかに記載のアクセス制御方法。
In parallel with acquiring the software name, executing access processing to the data table according to the access request,
if it is determined to permit access based on the acquired software name, sending the result of the access processing to the software that sent the access request;
when it is determined that access is not permitted based on the obtained software name, suppressing transmission of the result of the access process to the software that is the source of the access request;
6. The access control method according to any one of claims 1 to 5.
前記アクセス処理の結果を取得する前にアクセスを許可しないと決定した場合、前記アクセス処理をキャンセルする、
請求項6記載のアクセス制御方法。
canceling the access process if it is determined that the access is not permitted before obtaining the result of the access process;
7. The access control method according to claim 6.
コンピュータに、
管理対象ノード上に設けられた第1コンテナで実行されているソフトウェアに一時的に割り当てられたポート番号を送信元とするデータテーブルへのアクセス要求を、前記管理対象ノードから受信すると、前記管理対象ノード上に設けられた第2コンテナから、前記ポート番号に対応する前記ソフトウェアを示すソフトウェア名を取得し、
取得した前記ソフトウェア名と、前記データテーブルに対するアクセスを許可する許可対象ソフトウェアを示す許可対象ソフトウェア名が設定された許可情報とに基づいて、前記アクセス要求に応じた前記データテーブルへのアクセスの許否を決定する、
処理を実行させるアクセス制御プログラム。
to the computer,
When a data table access request originating from a port number temporarily assigned to software running in a first container provided on a managed node is received from the managed node, Acquiring a software name indicating the software corresponding to the port number from a second container provided on the node;
Permission or denial of access to the data table in response to the access request is determined based on the obtained software name and permission information in which the permitted software name indicating the permitted software to be permitted to access the data table is set. decide,
The access control program that causes the action to take place.
JP2021049734A 2021-03-24 2021-03-24 Access control method and access control program Pending JP2022148161A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021049734A JP2022148161A (en) 2021-03-24 2021-03-24 Access control method and access control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021049734A JP2022148161A (en) 2021-03-24 2021-03-24 Access control method and access control program

Publications (1)

Publication Number Publication Date
JP2022148161A true JP2022148161A (en) 2022-10-06

Family

ID=83463488

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021049734A Pending JP2022148161A (en) 2021-03-24 2021-03-24 Access control method and access control program

Country Status (1)

Country Link
JP (1) JP2022148161A (en)

Similar Documents

Publication Publication Date Title
US8498995B1 (en) Optimizing data retrieval during event data query processing
US9697379B2 (en) Database virtualization
CN104252501B (en) A kind of computing device and method executing database manipulation order
US11138311B2 (en) Distributed security introspection
US12488048B2 (en) Accessing data using a user-defined function (UDF)
US12438824B2 (en) Protecting integration between resources of different services using service-generated dependency tags
US10205679B2 (en) Resource object resolution management
CN103971059B (en) Cookie local storage and usage method
US8380806B2 (en) System and method for absolute path discovery by a storage virtualization system
US20240012819A1 (en) PROCESSING EXTERNAL FUNCTIONS USING USER-DEFINED FUNCTIONS (UDFs)
CN115935328A (en) Resource access control method, device, equipment and storage medium
US20230281332A1 (en) Access control method, access control program, and information processing apparatus
JP2022148161A (en) Access control method and access control program
CN112528339A (en) Data desensitization method based on Cach é database and electronic equipment
US12489797B2 (en) Systems, methods, and devices for improved security policy distribution in a cloud-computing environment
KR101318234B1 (en) Data cache method and device for database system
WO2020153053A1 (en) Database management service providing system
JP6607044B2 (en) Server device, distributed file system, distributed file system control method, and program
CN116860862B (en) Front-end caching method of low-code platform and related equipment
US20250094418A1 (en) Dynamic pivot implementation using object aggregation
JP4492569B2 (en) File operation control device, file operation control system, file operation control method, and file operation control program