repo.jdbc.json revision 7148faec4ad7bf860bf3610a4e32e5c2e22de890
{
"connection" : {
"dbType" : "POSTGRESQL",
"jndiName" : "",
"driverClass" : "org.postgresql.Driver",
"jdbcUrl" : "jdbc:postgresql://localhost:5432/openidm",
"username" : "openidm",
"password" : "openidm",
"defaultCatalog" : "openidm",
"maxBatchSize" : 100,
"maxTxRetry" : 5,
"enableConnectionPool" : true,
"connectionTimeoutInMs" : 30000
},
"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}",
"get-users-of-direct-role" : "select obj.fullobject::text from ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.objecttypes objtype ON objtype.id = obj.objecttypes_id INNER JOIN ${_dbSchema}.${_propTable} prop ON obj.id = prop.${_mainTable}_id where objtype.objecttype = ${_resource} AND prop.propKey LIKE '/roles/%' AND prop.propValue = ${role}",
"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}"
},
"explicitTables" : {
"get-users-of-direct-role" : "select objectid from ${_dbSchema}.${_table} where roles regexp concat('^(.*,)?',${role},'(,.*)?$')",
"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,
"properties": {
"/roles": {
"searchable": true
}
}
},
"scheduler" : {
"mainTable" : "schedulerobjects",
"propertiesTable" : "schedulerobjectproperties",
"searchableDefault" : false
},
"cluster" : {
"mainTable" : "clusterobjects",
"propertiesTable" : "clusterobjectproperties",
"searchableDefault" : false
},
"config" : {
"mainTable" : "configobjects",
"propertiesTable" : "configobjectproperties",
"searchableDefault" : false
}
},
"explicitMapping" : {
"link" : {
"table" : "links",
"objectToColumn" : {
"_id" : "objectid",
"_rev" : "rev",
"linkType" : "linktype",
"firstId" : "firstid",
"secondId" : "secondid",
"linkQualifier" : "linkqualifier"
}
},
"relationship" : {
"table": "relationships",
"objectToColumn" : {
"_id": "objectid",
"_rev": "rev",
"properties": {
"column": "properties",
"type": "JSON_MAP"
},
"firstId": "firstid",
"firstPropertyName": "firstpropname",
"secondId": "secondid"
}
},
"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" }
}
},
"audit/authentication" : {
"table" : "auditauthentication",
"objectToColumn" : {
"_id" : "objectid",
"transactionId" : "transactionid",
"timestamp" : "activitydate",
"authentication/id" : "userid",
"eventName" : "eventname",
"result" : "result",
"principal" : {"column" : "principals", "type" : "JSON_LIST"},
"context" : {"column" : "context", "type" : "JSON_MAP"},
"sessionId" : "sessionid",
"entries" : {"column" : "entries", "type" : "JSON_LIST"}
}
},
"audit/config" : {
"table" : "auditconfig",
"objectToColumn" : {
"_id" : "objectid",
"_rev" : "rev",
"transactionId" : "transactionid",
"timestamp" : "activitydate",
"eventName" : "eventname",
"authentication/id" : "userid",
"runas" : "runas",
"resourceOperation/uri" : "resource_uri",
"resourceOperation/protocol" : "resource_protocol",
"resourceOperation/operation/method" : "resource_method",
"resourceOperation/operation/detail" : "resource_detail",
"before" : "before",
"after" : "after",
"changedFields" : {"column" : "changedfields", "type" : "JSON_LIST"}
"internal/role" : {
"table" : "internalrole",
"objectToColumn" : {
"_id" : "objectid",
"_rev" : "rev",
"description" : "description"
}
},
"audit/activity" : {
"table" : "auditactivity",
"objectToColumn" : {
"_id" : "objectid",
"action" : "activity",
"timestamp" : "activitydate",
"transactionId" : "transactionid",
"eventName" : "eventname",
"authentication/id" : "userid",
"runAs" : "runas",
"resourceOperation/uri" : "resource_uri",
"resourceOperation/protocol" : "resource_protocol",
"resourceOperation/operation/method" : "resource_method",
"resourceOperation/operation/detail" : "resource_detail",
"before" : "subjectbefore",
"after" : "subjectafter",
"changedFields" : {"column" : "changedfields", "type" : "JSON_LIST"},
"passwordChanged" : "passwordchanged",
"revision" : "subjectrev",
"message" : "message",
"objectId" : "activityobjectid",
"status" : "status"
}
},
"audit/recon" : {
"table" : "auditrecon",
"objectToColumn" : {
"_id" : "objectid",
"transactionId" : "transactionid",
"timestamp" : "activitydate",
"eventName" : "eventname",
"authentication/id" : "userid",
"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",
"authentication/id" : "userid",
"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",
"action" : "activity",
"timestamp" : "activitydate",
"transactionId" : "transactionid",
"eventName" : "eventname",
"server/ip" : "server_ip",
"server/port" : "server_port",
"client/host" : "client_host",
"client/ip" : "client_ip",
"client/port" : "client_port",
"authentication/id" : "userid",
"authorizationId/id" : "principal",
"authorizationId/roles" : {"column" : "roles", "type" : "JSON_LIST"},
"authorizationId/component" : "auth_component",
"resourceOperation/uri" : "resource_uri",
"resourceOperation/protocol" : "resource_protocol",
"resourceOperation/operation/method" : "resource_method",
"resourceOperation/operation/detail" : "resource_detail",
"http/method" : "http_method",
"http/path" : "http_path",
"http/queryString" : "http_querystring",
"http/headers" : {"column" : "http_headers", "type" : "JSON_MAP"},
"response/status" : "status",
"response/elapsedTime" : "elapsedtime"
}
},
"security" : {
"table" : "security",
"objectToColumn" : {
"_id" : "objectid",
"_rev" : "rev",
"storeString" : "storestring"
}
},
"security/keys" : {
"table" : "securitykeys",
"objectToColumn" : {
"_id" : "objectid",
"_rev" : "rev",
"keyPair" : "keypair"
}
}
}
}
}