repo.jdbc.json revision d9b1fcb16f23fb4b520e5f13687b744deeebb03f
{
"dbType" : "POSTGRESQL",
"useDataSource" : "default",
"maxBatchSize" : 100,
"maxTxRetry" : 5,
"queries" : {
"genericTables" : {
"credential-query" : "SELECT fullobject::text FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.objecttypes objtype ON objtype.id = obj.objecttypes_id WHERE json_extract_path_text(fullobject, 'userName') = ${username} AND json_extract_path_text(fullobject, 'accountStatus') = 'active' AND objtype.objecttype = ${_resource}",
"find-by-id" : "SELECT fullobject::text FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.objecttypes objtype ON objtype.id = obj.objecttypes_id WHERE obj.objectid = ${id} AND objtype.objecttype = ${_resource}",
"get-by-field-value" : "SELECT fullobject::text FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.objecttypes objtype ON objtype.id = obj.objecttypes_id WHERE json_extract_path_text(fullobject, ${field}) = ${value} AND objtype.objecttype = ${_resource}",
"query-all-ids" : "SELECT obj.objectid FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.objecttypes objtype ON obj.objecttypes_id = objtype.id WHERE objtype.objecttype = ${_resource} LIMIT ${int:_pageSize} OFFSET ${int:_pagedResultsOffset}",
"query-all-ids-count" : "SELECT COUNT(obj.objectid) AS total FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.objecttypes objtype ON obj.objecttypes_id = objtype.id WHERE objtype.objecttype = ${_resource}",
"query-all" : "SELECT obj.fullobject::text FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.objecttypes objtype ON obj.objecttypes_id = objtype.id WHERE objtype.objecttype = ${_resource} LIMIT ${int:_pageSize} OFFSET ${int:_pagedResultsOffset}",
"query-all-count" : "SELECT COUNT(obj.fullobject) AS total FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.objecttypes objtype ON obj.objecttypes_id = objtype.id WHERE objtype.objecttype = ${_resource}",
"for-userName" : "SELECT fullobject::text FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.objecttypes objtype ON objtype.id = obj.objecttypes_id WHERE json_extract_path_text(fullobject, 'userName') = ${uid} AND objtype.objecttype = ${_resource}",
"scan-tasks" : "SELECT fullobject::text FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.objecttypes objtype ON objtype.id = obj.objecttypes_id WHERE (json_extract_path_text(fullobject, VARIADIC string_to_array(SUBSTR(${property},2),'/')) < ${condition.before} AND objtype.objecttype = ${_resource} ) AND ( json_extract_path_text(fullobject, VARIADIC string_to_array(SUBSTR(${taskState.completed},2),'/')) is NULL )",
"query-cluster-failed-instances" : "SELECT fullobject::text FROM ${_dbSchema}.${_mainTable} obj WHERE json_extract_path_text(fullobject, 'timestamp') <= ${timestamp} AND json_extract_path_text(fullobject, 'state') IN ('1','2')",
"query-cluster-instances" : "SELECT fullobject::text FROM ${_dbSchema}.${_mainTable} obj WHERE json_extract_path_text(fullobject, 'type') = 'state'",
"query-cluster-events" : "SELECT fullobject::text FROM ${_dbSchema}.${_mainTable} obj WHERE json_extract_path_text(fullobject, 'type') = 'event' AND json_extract_path_text(fullobject, 'instanceId') = ${instanceId}",
"find-relationships-for-resource" : "SELECT fullobject::text FROM ${_dbSchema}.relationships obj INNER JOIN ${_dbSchema}.objecttypes objtype ON objtype.id = obj.objecttypes_id AND objtype.objecttype = 'relationships' WHERE (((json_extract_path_text(obj.fullobject, '/firstId') = (${fullResourceId})) AND (json_extract_path_text(obj.fullobject, '/firstPropertyName') = (${resourceFieldName})))) OR (((json_extract_path_text(obj.fullobject, '/secondId') = (${fullResourceId})) AND (json_extract_path_text(obj.fullobject, '/secondPropertyName') = (${resourceFieldName}))))"
},
"explicitTables" : {
"query-all-ids" : "SELECT objectid FROM ${_dbSchema}.${_table}",
"for-internalcredentials" : "select * FROM ${_dbSchema}.${_table} WHERE objectid = ${uid}",
"get-notifications-for-user" : "select * FROM ${_dbSchema}.${_table} WHERE receiverId = ${userId} order by createDate desc",
"credential-query" : "SELECT * FROM ${_dbSchema}.${_table} WHERE objectid = ${username}",
"credential-internaluser-query" : "SELECT objectid, pwd, roles FROM ${_dbSchema}.${_table} WHERE objectid = ${username}",
"links-for-firstId" : "SELECT * FROM ${_dbSchema}.${_table} WHERE linkType = ${linkType} AND firstid = ${firstId}",
"links-for-secondId" : "SELECT * FROM ${_dbSchema}.${_table} WHERE linkType = ${linkType} AND secondid = ${secondId}",
"links-for-linkType" : "SELECT * FROM ${_dbSchema}.${_table} WHERE linkType = ${linkType}",
"scan-tasks" : "SELECT * FROM ${_dbSchema}.${_table} WHERE ${property} < ${condition.before} AND ${taskState.completed} is NULL",
"audit-by-mapping" : "SELECT * FROM ${_dbSchema}.auditrecon WHERE mapping = ${mappingName}",
"audit-by-recon-id" : "SELECT * FROM ${_dbSchema}.auditrecon WHERE reconId = ${reconId}",
"audit-by-recon-id-type" : "SELECT * FROM ${_dbSchema}.auditrecon WHERE reconId = ${reconId} AND entryType = ${entryType}",
"audit-by-recon-id-situation" : "SELECT * FROM ${_dbSchema}.auditrecon WHERE reconId = ${reconId} AND situation = ${situation}",
"audit-by-activity-parent-action" : "SELECT * FROM ${_dbSchema}.auditactivity WHERE parentactionid = ${parentActionId}",
"query-all" : "SELECT * FROM ${_dbSchema}.${_table}",
"get-recons" : "SELECT reconId, activitydate, mapping, message FROM ${_dbSchema}.auditrecon WHERE mapping LIKE ${includeMapping} AND mapping NOT LIKE ${excludeMapping} AND entryType = 'summary' ORDER BY activitydate DESC"
}
},
"commands" : {
"genericTables" : { },
"explicitTables" : {
"purge-by-recon-ids-to-keep" : "DELETE FROM ${_dbSchema}.auditrecon WHERE mapping LIKE ${includeMapping} AND mapping NOT LIKE ${excludeMapping} AND reconId NOT IN (${list:reconIds})",
"purge-by-recon-expired" : "DELETE FROM ${_dbSchema}.auditrecon WHERE mapping LIKE ${includeMapping} AND mapping NOT LIKE ${excludeMapping} AND activitydate < ${timestamp}"
}
},
"resourceMapping" : {
"default" : {
"mainTable" : "genericobjects",
"propertiesTable" : "genericobjectproperties",
"searchableDefault" : true
},
"genericMapping" : {
"managed/*" : {
"mainTable" : "managedobjects",
"propertiesTable" : "managedobjectproperties",
"searchableDefault" : true
},
"managed/user" : {
"mainTable" : "managedobjects",
"propertiesTable" : "managedobjectproperties",
"searchableDefault" : false
},
"scheduler" : {
"mainTable" : "schedulerobjects",
"propertiesTable" : "schedulerobjectproperties",
"searchableDefault" : false
},
"cluster" : {
"mainTable" : "clusterobjects",
"propertiesTable" : "clusterobjectproperties",
"searchableDefault" : false
},
"config" : {
"mainTable" : "configobjects",
"propertiesTable" : "configobjectproperties",
"searchableDefault" : false
},
"relationship": {
"mainTable" : "relationships",
"propertiesTable" : "relationshipproperties",
"searchableDefault" : false
},
"updates" : {
"mainTable" : "updateobjects",
"propertiesTable" : "updateobjectproperties",
"searchableDefault" : true
}
},
"explicitMapping" : {
"link" : {
"table" : "links",
"objectToColumn" : {
"_id" : "objectid",
"_rev" : "rev",
"linkType" : "linktype",
"firstId" : "firstid",
"secondId" : "secondid",
"linkQualifier" : "linkqualifier"
}
},
"ui/notification" : {
"table" : "uinotification",
"objectToColumn" : {
"_id" : "objectid",
"_rev" : "rev",
"requester" : "requester",
"requesterId" : "requesterId",
"receiverId" : "receiverId",
"createDate" : "createDate",
"notificationType" : "notificationType",
"notificationSubtype" : "notificationSubtype",
"message" : "message"
}
},
"internal/user" : {
"table" : "internaluser",
"objectToColumn" : {
"_id" : "objectid",
"_rev" : "rev",
"password" : "pwd",
"roles" : { "column" : "roles", "type" : "JSON_LIST" }
}
},
"internal/role" : {
"table" : "internalrole",
"objectToColumn" : {
"_id" : "objectid",
"_rev" : "rev",
"description" : "description"
}
},
"audit/authentication" : {
"table" : "auditauthentication",
"objectToColumn" : {
"_id" : "objectid",
"transactionId" : "transactionid",
"timestamp" : "activitydate",
"userId" : "userid",
"eventName" : "eventname",
"result" : "result",
"principal" : {"column" : "principals", "type" : "JSON_LIST"},
"context" : {"column" : "context", "type" : "JSON_MAP"},
"entries" : {"column" : "entries", "type" : "JSON_LIST"},
"trackingIds" : {"column" : "trackingids", "type" : "JSON_LIST"}
}
},
"audit/config" : {
"table" : "auditconfig",
"objectToColumn" : {
"_id" : "objectid",
"timestamp" : "activitydate",
"eventName" : "eventname",
"transactionId" : "transactionid",
"userId" : "userid",
"trackingIds" : {"column" : "trackingids", "type" : "JSON_LIST"},
"runas" : "runas",
"objectId" : "configobjectid",
"operation" : "operation",
"before" : "beforeObject",
"after" : "afterObject",
"changedFields": {
"column": "changedfields",
"type": "JSON_LIST"
},
"revision" : "rev"
}
},
"audit/activity" : {
"table" : "auditactivity",
"objectToColumn" : {
"_id" : "objectid",
"timestamp" : "activitydate",
"eventName" : "eventname",
"transactionId" : "transactionid",
"userId" : "userid",
"trackingIds" : {"column" : "trackingids", "type" : "JSON_LIST"},
"runAs" : "runas",
"objectId" : "activityobjectid",
"operation" : "operation",
"before" : "subjectbefore",
"after" : "subjectafter",
"changedFields" : {"column" : "changedfields", "type" : "JSON_LIST"},
"revision" : "subjectrev",
"passwordChanged" : "passwordchanged",
"message" : "message",
"status" : "status"
}
},
"audit/recon" : {
"table" : "auditrecon",
"objectToColumn" : {
"_id" : "objectid",
"transactionId" : "transactionid",
"timestamp" : "activitydate",
"eventName" : "eventname",
"userId" : "userid",
"trackingIds" : {"column" : "trackingids", "type" : "JSON_LIST"},
"action" : "activity",
"exception" : "exceptiondetail",
"linkQualifier": "linkqualifier",
"mapping" : "mapping",
"message" : "message",
"messageDetail" : {"column" : "messagedetail", "type" : "JSON_MAP"},
"situation" : "situation",
"sourceObjectId" : "sourceobjectid",
"status" : "status",
"targetObjectId" : "targetobjectid",
"reconciling" : "reconciling",
"ambiguousTargetObjectIds" : "ambiguoustargetobjectids",
"reconAction" : "reconaction",
"entryType" : "entrytype",
"reconId" : "reconid"
}
},
"audit/sync" : {
"table" : "auditsync",
"objectToColumn" : {
"_id" : "objectid",
"transactionId" : "transactionid",
"timestamp" : "activitydate",
"eventName" : "eventname",
"userId" : "userid",
"trackingIds" : {"column" : "trackingids", "type" : "JSON_LIST"},
"action" : "activity",
"exception" : "exceptiondetail",
"linkQualifier": "linkqualifier",
"mapping" : "mapping",
"message" : "message",
"messageDetail" : {"column" : "messagedetail", "type" : "JSON_MAP"},
"situation" : "situation",
"sourceObjectId" : "sourceobjectid",
"status" : "status",
"targetObjectId" : "targetobjectid"
}
},
"audit/access" : {
"table" : "auditaccess",
"objectToColumn" : {
"_id" : "objectid",
"timestamp" : "activitydate",
"eventName" : "eventname",
"transactionId" : "transactionid",
"userId" : "userid",
"trackingIds" : {"column" : "trackingids", "type" : "JSON_LIST"},
"server/ip" : "server_ip",
"server/port" : "server_port",
"client/ip" : "client_ip",
"client/port" : "client_port",
"request/protocol" : "request_protocol",
"request/operation" : "request_operation",
"request/detail" : {"column" : "request_detail", "type" : "JSON_MAP"},
"http/request/secure" : "http_request_secure",
"http/request/method" : "http_request_method",
"http/request/path" : "http_request_path",
"http/request/queryParameters" : {"column" : "http_request_queryparameters", "type" : "JSON_MAP"},
"http/request/headers" : {"column" : "http_request_headers", "type" : "JSON_MAP"},
"http/request/cookies" : {"column" : "http_request_cookies", "type" : "JSON_MAP"},
"http/response/headers" : {"column" : "http_response_headers", "type" : "JSON_MAP"},
"response/status" : "response_status",
"response/statusCode" : "response_statuscode",
"response/elapsedTime" : "response_elapsedtime",
"response/elapsedTimeUnits" : "response_elapsedtimeunits",
"roles" : "roles"
}
},
"security" : {
"table" : "security",
"objectToColumn" : {
"_id" : "objectid",
"_rev" : "rev",
"storeString" : "storestring"
}
},
"security/keys" : {
"table" : "securitykeys",
"objectToColumn" : {
"_id" : "objectid",
"_rev" : "rev",
"keyPair" : "keypair"
}
}
}
}
}