Application Programming Interface Guide > REST API > TDV Server REST APIs > Column-Based Security
 
Column-Based Security(列ベースのセキュリティ)API
列ベースのセキュリティポリシーは、TDVリソースに割り当て/削除/更新できます。リソースに対して実行できるオペレーションは次のとおりです。
GET /assignments
POST /assignments
PUT /assignments
DELETE/assignments
GET /enable
PUT /enable
GET /policies
POST /policies
PUT /policies
DELETE/policies
GET /policyDataTypeMap
GET /policyDataTypes
GET /ruleDataTypeMap
GET /assignments
このAPIは、cbs割り当てを取得するために使用されます。
パラメーター:
名前
パラメータータイプ
データタイプ
policyPath
 
query
string
resourcePath
 
query
string
resourceType
 
query
string
columnName
 
query
string
すべてのcbs割り当てを取得する例:
curl -X GET -u admin:admin "http://localhost:9400/rest/cbs/v1/assignments"
cbsポリシー「policy/cbs/cbs1」の割り当てを取得する例
curl -X GET -u admin:admin "http://localhost:9400/rest/cbs/v1/assignments?policyPath=/policy/cbs/cbs1"
リソース「/shared/examples/ViewOrder」の割り当てを取得する例
curl -X GET -u admin:admin "http://localhost:9400/rest/cbs/v1/assignments?resourcePath=/shared/examples/ViewOrder&resourceType=TABLE"
リソース「/shared/examples/ViewOrder」割り当てへのcbsポリシー「/policy/cbs/cbs1」割り当てを取得する例
curl -X GET -u admin:admin "http://localhost:9400/rest/cbs/v1/assignments?policyPath=/policy/cbs/cbs1&resourcePath=/shared/examples/ViewOrder&resourceType=TABLE"
リソース「/shared/examples/ViewOrder」列「companyName」割り当てへのcbsポリシー「/policy/cbs/cbs1」割り当てを取得する例
curl -X GET -u admin:admin "http://localhost:9400/rest/cbs/v1/assignments?policyPath=/policy/cbs/cbs1&resourcePath=/shared/examples/ViewOrder&resourceType=TABLE&columnName=companyName"
POST /assignments
このAPIは、cbs割り当てを追加するために使用されます。
パラメーター:
なし
リクエスト本文
値の例:スキーマ
[
{
"columnName": "string",
"paramMap": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"resourceType": "string",
"resourcePath": "string",
"policyPath": "string"
}
]
curl -X POST -u admin:admin "http://localhost:9400/rest/cbs/v1/assignments" -H "Content-Type:application/json" -d "[{ \"policyPath\": \"/policy/cbs/cbs1\",\"resourcePath\":\"/shared/examples/ViewOrder\", \"resourceType\":\"TABLE\",\"columnName\":\"CustomerContactPhone\",\"paramMap\":{}}]"
PUT /assignments
このAPIは、cbs割り当てを更新するために使用されます。
パラメーター:
なし
リクエスト本文
値の例:スキーマ
[
{
"columnName": "string",
"paramMap": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"resourceType": "string",
"resourcePath": "string",
"policyPath": "string"
}
]
curl -X PUT -u admin:admin "http://localhost:9400/rest/cbs/v1/assignments" -H "Content-Type:application/json" -d "[{ \"policyPath\": \"/policy/cbs/cbs1\",\"resourcePath\":\"/shared/examples/ViewOrder\", \"resourceType\":\"TABLE\",\"columnName\":\"CustomerContactPhone\",\"paramMap\":{}}]"
削除/assignments
このAPIは、cbs割り当てを削除するために使用されます。
パラメーター:
名前
説明
パラメータータイプ
データタイプ
resourcePath
 
query
String
resourceType
 
query
String
columnName
 
query
String
ビュー「/shared/examples/ViewOrder」列「CustomerContactPhone」に関連付けられたcbs割り当てを削除する例
curl -X DELETE -u admin:admin "http://localhost:9400/rest/cbs/v1/assignments?resourcePath=/shared/examples/ViewOrder&resourceType=TABLE&columnName=CustomerContactPhone"
ビュー「/shared/examples/ViewOrder」に関連付けられているcbs割り当てを削除する例
curl -X DELETE -u admin:admin "http://localhost:9400/rest/cbs/v1/assignments?resourcePath=/shared/examples/ViewOrder&resourceType=TABLE"
すべてのcbs割り当てを削除する例
curl -X DELETE -u admin:admin "http://localhost:9400/rest/cbs/v1/assignments"
GET /enable
このAPIは、cbsステータスを取得するために使用されます。
パラメーター:
なし
curl -X GET -u admin:admin "http://localhost:9400/rest/cbs/v1/enable"
PUT /enable
このAPIは、cbsを有効または無効にするために使用されます。
パラメーター:
名前
説明
パラメータータイプ
データタイプ
body
 
body
integer
cbsを有効にする例
curl -X PUT -u admin:admin "http://localhost:9400/rest/cbs/v1/enable" -H "Content-Type:application/json" -d "1"
cbsを無効にする例
curl -X PUT -u admin:admin "http://localhost:9400/rest/cbs/v1/enable" -H "Content-Type:application/json" -d "0"
GET /policyes
このAPIは、cbsポリシーを取得するために使用されます。
パラメーター:
名前
説明
パラメータータイプ
データタイプ
policyPath
 
query
string
すべてのcbsポリシーを取得する例
curl -X GET -u admin:admin "http://localhost:9400/rest/cbs/v1/policies"
cbsポリシー「/policy/cbs/cbs1」を取得する例
curl -X GET -u admin:admin "http://localhost:9400/rest/cbs/v1/policies?policyPath=/policy/cbs/cbs1"
POST /policies
このAPIは、cbsポリシーを作成するために使用されます。
パラメーター:
なし
リクエスト本文
値の例-スキーマ
[
{
"path": "string",
"dataType": "string",
"maskingRules": [
{
"domainName": "string",
"userGroupName": "string",
"isGroup": true,
"isDefaultRule": true,
"ruleType": "string",
"selectableString": "string"
}
],
"annotation": "string",
"parameters": [
"string"
],
"newPath": "string",
"isEnabled": true
}
]
cbsポリシー「/policy/cbs/cbs1」を作成する例
curl -X POST -u admin:admin "http://localhost:9400/rest/cbs/v1/policies" -H "Content-Type:application/json" -d "[{\"path\":\"/policy/cbs/cbs1\",\"dataType\":\"integer\", \"maskingRules\":[{\"isDefaultRule\": \"true\", \"ruleType\": \"PASS_THROUGH\",\"selectableString\": \"\"}],\"isEnabled\":\"true\" ,\"annotation\":\"the 1st cbs\" }]"
PUT /policies
このAPIは、cbsポリシーを更新するために使用されます。
パラメーター:
なし
リクエスト本文
値の例-スキーマ
[
{
"path": "string",
"dataType": "string",
"maskingRules": [
{
"domainName": "string",
"userGroupName": "string",
"isGroup": true,
"isDefaultRule": true,
"ruleType": "string",
"selectableString": "string"
}
],
"annotation": "string",
"parameters": [
"string"
],
"newPath": "string",
"isEnabled": true
}
]
cbsポリシー「/policy/cbs/cbs1」を更新する例
curl -X PUT -u admin:admin "http://localhost:9400/rest/cbs/v1/policies" -H "Content-Type:application/json" -d "[{\"path\":\"/policy/cbs/cbs1\",\"dataType\":\"integer\", \"maskingRules\":[{\"isDefaultRule\": \"true\", \"ruleType\": \"PASS_THROUGH\",\"selectableString\": \"\"}],\"isEnabled\":\"true\" ,\"annotation\":\"update the 1st cbs\" }]"
cbsポリシーの名前を「/policy/cbs/cbs1」から「/policy/cbs/cbs2」に変更する例
curl -X PUT -u admin:admin "http://localhost:9400/rest/cbs/v1/policies" -H "Content-Type:application/json" -d "[{\"path\":\"/policy/cbs/cbs1\",\"newPath\":\"/policy/cbs/cbs2\",\"dataType\":\"integer\", \"maskingRules\":[{\"isDefaultRule\": \"true\", \"ruleType\": \"PASS_THROUGH\",\"selectableString\": \"\"}],\"isEnabled\":\"true\" ,\"annotation\":\"update the 1st cbs\" }]"
削除/policies
このAPIは、cbsポリシーを削除するために使用されます。
パラメーター:
名前
説明
パラメータータイプ
データタイプ
policyPath
cbsポリシーパス
query
string
cbsポリシー「/policy/cbs/cbs1」を削除する例
curl -X DELETE -u admin:admin "http://localhost:9400/rest/cbs/v1/policies?policyPath=/policy/cbs/cbs1"
すべてのcbsポリシーを削除する例
curl -X DELETE -u admin:admin "http://localhost:9400/rest/cbs/v1/policys"
GET /policyDataTypeMap
このAPIは、互換性のあるポリシーと列のデータタイプマップを取得するために使用されます。
パラメーター:
なし
互換性のあるポリシーと列のデータタイプマップを取得する例
curl -X GET -u admin:admin "http://localhost:9400/rest/cbs/v1/policyDataTypeMap"
GET /policyDataTypes
このAPIは、サポートされているcbsルールタイプを取得するために使用されます。
パラメーター:
なし
サポートされているcbsルールタイプを取得する例
curl -X GET -u admin:admin "http://localhost:9400/rest/cbs/v1/policyDataTypes"
GET /ruleDataTypeMap
このAPIは、互換性のあるルールとポリシーのデータタイプマップを取得するために使用されます。
パラメーター:
なし
互換性のあるルールとポリシーのデータタイプマップを取得する例
curl -X GET -u admin:admin "http://localhost:9400/rest/cbs/v1/ruleDataTypeMap"