repo.jdbc.json revision d80484e88b4ea2ab827f133adf87f93a6e78f7c2
1008N/A{
1008N/A "connection" : {
1008N/A "dbType" : "MYSQL",
1008N/A "jndiName" : "",
1008N/A "driverClass" : "com.mysql.jdbc.Driver",
1008N/A "jdbcUrl" : "jdbc:mysql://localhost:3306/openidm?allowMultiQueries=true&characterEncoding=utf8",
1008N/A "username" : "openidm",
1008N/A "password" : "openidm",
1008N/A "defaultCatalog" : "openidm",
1008N/A "maxBatchSize" : 100,
1008N/A "maxTxRetry" : 5,
1008N/A "enableConnectionPool" : true,
1008N/A "connectionTimeoutInMs" : 30000
1008N/A },
1008N/A "queries" : {
1008N/A "genericTables" : {
1008N/A "credential-query" : "SELECT fullobject FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.${_propTable} prop ON obj.id = prop.${_mainTable}_id INNER JOIN ${_dbSchema}.objecttypes objtype ON objtype.id = obj.objecttypes_id WHERE prop.propkey='/userName' AND prop.propvalue = ${username} AND objtype.objecttype = ${_resource}",
1008N/A "find-by-id" : "SELECT fullobject FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.objecttypes objtype ON objtype.id = obj.objecttypes_id WHERE obj.objectid = ${id} AND objtype.objecttype = ${_resource}",
1008N/A "get-by-field-value" : "SELECT fullobject FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.${_propTable} prop ON obj.id = prop.${_mainTable}_id INNER JOIN ${_dbSchema}.objecttypes objtype ON objtype.id = obj.objecttypes_id WHERE prop.propkey=CONCAT('/', ${field}) AND prop.propvalue = ${value} AND objtype.objecttype = ${_resource}",
1008N/A "get-users-of-direct-role" : "select obj.fullobject 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}",
1008N/A "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}",
1008N/A "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}",
1008N/A "query-all" : "SELECT obj.fullobject 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}",
1008N/A "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}",
1008N/A "for-userName" : "SELECT fullobject FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.${_propTable} prop ON obj.id = prop.${_mainTable}_id INNER JOIN ${_dbSchema}.objecttypes objtype ON objtype.id = obj.objecttypes_id WHERE prop.propkey='/userName' AND prop.propvalue = ${uid} AND objtype.objecttype = ${_resource}",
1008N/A "credential-internaluser-query" : "SELECT credprop.${_mainTable}_id, credprop.propkey, credprop.propvalue FROM ${_dbSchema}.${_propTable} credprop INNER JOIN ${_dbSchema}.${_mainTable} obj ON obj.id = credprop.${_mainTable}_id INNER JOIN ${_dbSchema}.${_propTable} conditionprop ON obj.id = conditionprop.${_mainTable}_id INNER JOIN ${_dbSchema}.objecttypes objtype ON objtype.id = obj.objecttypes_id WHERE credprop.propkey='/userPassword' AND conditionprop.propkey='/_id' AND conditionprop.propvalue = ${username} AND objtype.objecttype = ${_resource}",
1008N/A "scan-tasks" : "SELECT fullobject FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.${_propTable} prop ON obj.id = prop.${_mainTable}_id LEFT OUTER JOIN ${_dbSchema}.${_propTable} complete ON obj.id = complete.${_mainTable}_id AND complete.propkey=${taskState.completed} INNER JOIN ${_dbSchema}.objecttypes objtype ON objtype.id = obj.objecttypes_id WHERE ( prop.propkey=${property} AND prop.propvalue < ${condition.before} AND objtype.objecttype = ${_resource} ) AND ( complete.propvalue is NULL )",
1008N/A
1008N/A "query-cluster-instances" : "SELECT fullobject FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.${_propTable} prop ON obj.id = prop.${_mainTable}_id INNER JOIN ${_dbSchema}.${_propTable} state ON obj.id = state.${_mainTable}_id WHERE (prop.propkey = '/timestamp' AND prop.propvalue <= ${timestamp}) AND (state.propkey = '/state' AND (state.propvalue = '1' OR state.propvalue = '2'))",
1008N/A
1008N/A "get-managed-users" : "SELECT obj.fullobject FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.objecttypes objTypes ON obj.objecttypes_id = objTypes.id and objTypes.objecttype = ${_resource} INNER JOIN ${_dbSchema}.${_propTable} orderby on obj.id = orderby.managedobjects_id and orderby.propkey = CONCAT('/',${orderBy}) ORDER BY CASE WHEN ${orderByDir} = 'asc' THEN orderby.propvalue END asc, CASE WHEN ${orderByDir} = 'desc' THEN orderby.propvalue END desc LIMIT ${int:_pageSize} OFFSET ${int:_pagedResultsOffset}",
1008N/A "get-managed-users-filtered" : "SELECT obj.fullobject FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.objecttypes objTypes ON obj.objecttypes_id = objTypes.id and objTypes.objecttype = ${_resource} INNER JOIN ${_dbSchema}.${_propTable} orderby on obj.id = orderby.managedobjects_id and orderby.propkey = CONCAT('/',${orderBy}) INNER JOIN ${_dbSchema}.${_propTable} userName on obj.id = userName.${_mainTable}_id and userName.propkey = '/userName' INNER JOIN ${_dbSchema}.${_propTable} givenName on obj.id = givenName.${_mainTable}_id and givenName.propkey = '/givenName' INNER JOIN ${_dbSchema}.${_propTable} sn on obj.id = sn.${_mainTable}_id and sn.propkey = '/sn' INNER JOIN ${_dbSchema}.${_propTable} mail on obj.id = mail.${_mainTable}_id and mail.propkey = '/mail' INNER JOIN ${_dbSchema}.${_propTable} accountStatus on obj.id = accountStatus.${_mainTable}_id and accountStatus.propkey = '/accountStatus' WHERE userName.propvalue LIKE concat(${userName},'%') AND mail.propvalue LIKE concat(${mail},'%') AND givenName.propvalue LIKE concat(${givenName},'%') AND sn.propvalue LIKE concat(${sn},'%') AND accountStatus.propvalue LIKE concat(${accountStatus},'%') ORDER BY CASE WHEN ${orderByDir} = 'asc' THEN orderby.propvalue END asc, CASE WHEN ${orderByDir} = 'desc' THEN orderby.propvalue END desc LIMIT ${int:_pageSize} OFFSET ${int:_pagedResultsOffset}",
1008N/A "get-managed-users-count" : "SELECT concat('{ \"total\":',COUNT(*),'}') as fullobject FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.objecttypes objTypes ON obj.objecttypes_id = objTypes.id and objTypes.objecttype = ${_resource}",
1008N/A "get-managed-users-filtered-count" : "SELECT concat('{ \"total\":',COUNT(*),'}') as fullobject FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.objecttypes objTypes ON obj.objecttypes_id = objTypes.id and objTypes.objecttype = ${_resource} INNER JOIN ${_dbSchema}.${_propTable} userName on obj.id = userName.${_mainTable}_id and userName.propkey = '/userName' INNER JOIN ${_dbSchema}.${_propTable} givenName on obj.id = givenName.${_mainTable}_id and givenName.propkey = '/givenName' INNER JOIN ${_dbSchema}.${_propTable} sn on obj.id = sn.${_mainTable}_id and sn.propkey = '/sn' INNER JOIN ${_dbSchema}.${_propTable} mail on obj.id = mail.${_mainTable}_id and mail.propkey = '/mail' INNER JOIN ${_dbSchema}.${_propTable} accountStatus on obj.id = accountStatus.${_mainTable}_id and accountStatus.propkey = '/accountStatus' WHERE userName.propvalue LIKE concat(${userName},'%') AND mail.propvalue LIKE concat(${mail},'%') AND givenName.propvalue LIKE concat(${givenName},'%') AND sn.propvalue LIKE concat(${sn},'%') AND accountStatus.propvalue LIKE concat(${accountStatus},'%')"
1008N/A },
1008N/A "explicitTables" : {
1008N/A "get-users-of-direct-role" : "select objectid from ${_dbSchema}.${_table} where find_in_set(${role},replace(substring(roles,2,(length(roles) - 2)),'\"',''))",
1008N/A "query-all-ids" : "SELECT objectid FROM ${_dbSchema}.${_table}",
1008N/A "query-all-ids-count" : "SELECT COUNT(objectid) AS total FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.objecttypes objtype ON obj.objecttypes_id = objtype.id WHERE objtype.objecttype = ${_resource}",
1008N/A "for-internalcredentials" : "select * FROM ${_dbSchema}.${_table} WHERE objectid = ${uid}",
1008N/A "get-notifications-for-user" : "select * FROM ${_dbSchema}.${_table} WHERE receiverId = ${userId} order by createDate desc",
1008N/A "for-userName" : "SELECT * FROM ${_dbSchema}.${_table} WHERE userName = ${uid}",
1008N/A
1008N/A "credential-query" : "SELECT * FROM ${_dbSchema}.${_table} WHERE objectid = ${username} and accountStatus = 'active'",
1008N/A "credential-internaluser-query" : "SELECT objectid, pwd, roles FROM ${_dbSchema}.${_table} WHERE objectid = ${username}",
1008N/A
1008N/A "links-for-firstId" : "SELECT * FROM ${_dbSchema}.${_table} WHERE linkType = ${linkType} AND firstid = ${firstId}",
1008N/A "links-for-secondId" : "SELECT * FROM ${_dbSchema}.${_table} WHERE linkType = ${linkType} AND secondid = ${secondId}",
1008N/A "links-for-linkType" : "SELECT * FROM ${_dbSchema}.${_table} WHERE linkType = ${linkType}",
1008N/A
1008N/A "scan-tasks" : "SELECT * FROM ${_dbSchema}.${_table} WHERE ${property} < ${condition.before} AND ${taskState.completed} is NULL",
1008N/A
1008N/A "audit-by-mapping" : "SELECT * FROM ${_dbSchema}.${_table} WHERE mapping = ${mappingName}",
1008N/A "audit-by-recon-id" : "SELECT * FROM ${_dbSchema}.${_table} WHERE reconId = ${reconId}",
1008N/A "audit-by-recon-id-type" : "SELECT * FROM ${_dbSchema}.${_table} WHERE reconId = ${reconId} AND entryType = ${entryType}",
1008N/A "audit-by-recon-id-situation" : "SELECT * FROM ${_dbSchema}.${_table} WHERE reconId = ${reconId} AND situation = ${situation}",
1008N/A "audit-by-activity-parent-action" : "SELECT * FROM ${_dbSchema}.${_table} WHERE parentactionid = ${parentActionId}",
1008N/A "query-all" : "SELECT * FROM ${_dbSchema}.${_table}",
1008N/A
1008N/A "get-managed-users" : "call ${_dbSchema}.getAllFromTable('${_dbSchema}','${_table}',${orderBy},${orderByDir},${int:_pageSize},${int:_pagedResultsOffset},'userName,givenName,sn,mail,accountStatus')",
1008N/A "get-managed-users-filtered" : "SELECT * FROM ${_dbSchema}.${_table} WHERE userName LIKE concat(${userName},'%') AND mail LIKE concat(${mail},'%') AND givenName LIKE concat(${givenName},'%') AND sn LIKE concat(${sn},'%') AND accountStatus LIKE concat(${accountStatus},'%') ORDER BY CASE WHEN ${orderByDir} = 'asc' THEN CASE ${orderBy} WHEN 'userName' THEN userName WHEN 'givenName' THEN givenName WHEN 'sn' THEN sn WHEN 'mail' THEN mail WHEN 'accountStatus' THEN accountStatus END END asc, CASE WHEN ${orderByDir} = 'desc' THEN CASE ${orderBy} WHEN 'userName' THEN userName WHEN 'givenName' THEN givenName WHEN 'sn' THEN sn WHEN 'mail' THEN mail WHEN 'accountStatus' THEN accountStatus END END desc LIMIT ${int:_pageSize} OFFSET ${int:_pagedResultsOffset}",
1008N/A "get-managed-users-count" : "SELECT COUNT(objectid) AS total FROM ${_dbSchema}.${_table}",
1008N/A "get-managed-users-filtered-count" : "SELECT COUNT(objectid) AS total FROM ${_dbSchema}.${_table} WHERE userName LIKE concat(${userName},'%') AND mail LIKE concat(${mail},'%') AND givenName LIKE concat(${givenName},'%') AND sn LIKE concat(${sn},'%') AND accountStatus LIKE concat(${accountStatus},'%')"
1008N/A }
1008N/A },
1008N/A "commands" : {
1008N/A "genericTables" : { },
1008N/A "explicitTables" : {
1008N/A "purge-by-recon-expired" : "DELETE r FROM ${_dbSchema}.${_table} r INNER JOIN (SELECT reconId FROM ${_dbSchema}.${_table} WHERE mapping LIKE ${includeMapping} AND mapping NOT LIKE ${excludeMapping} AND activitydate < ${timestamp} AND entryType = 'summary') AS x ON x.reconId = r.reconId",
1008N/A "purge-by-recon-number-of" : "set @num := 0, @mapping := ''; DELETE r FROM ${_dbSchema}.${_table} r INNER JOIN ( SELECT reconId, mapping, activitydate, @num := if(@mapping = mapping, @num + 1, 1) AS row_number, @mapping := mapping as m FROM ${_dbSchema}.${_table} WHERE mapping LIKE ${includeMapping} AND mapping NOT LIKE ${excludeMapping} AND entryType = 'summary' ORDER BY mapping, activitydate desc ) AS x ON r.reconId = x.reconId WHERE x.row_number > ${numberOf}"
1008N/A }
1008N/A },
1008N/A "resourceMapping" : {
1008N/A "default" : {
1008N/A "mainTable" : "genericobjects",
1008N/A "propertiesTable" : "genericobjectproperties",
1008N/A "searchableDefault" : true
1008N/A },
1008N/A "genericMapping" : {
1008N/A "managed/*" : {
1008N/A "mainTable" : "managedobjects",
1008N/A "propertiesTable" : "managedobjectproperties",
1008N/A "searchableDefault" : true
1008N/A },
1008N/A "managed/user" : {
1008N/A "mainTable" : "managedobjects",
1008N/A "propertiesTable" : "managedobjectproperties",
1008N/A "searchableDefault" : false,
1008N/A "properties" : {
1008N/A "/userName" : {
1008N/A "searchable" : true
1008N/A },
1008N/A "/givenName" : {
1008N/A "searchable" : true
1008N/A },
1008N/A "/sn" : {
1008N/A "searchable" : true
1008N/A },
1008N/A "/mail" : {
1008N/A "searchable" : true
1008N/A },
1008N/A "/accountStatus" : {
1008N/A "searchable" : true
1008N/A },
1008N/A "/roles" : {
1008N/A "searchable" : true
1008N/A },
1008N/A "/sunset" : {
1008N/A "searchable" : true
1008N/A }
1008N/A }
1008N/A },
1008N/A "scheduler" : {
1008N/A "mainTable" : "schedulerobjects",
1008N/A "propertiesTable" : "schedulerobjectproperties",
1008N/A "searchableDefault" : true
1008N/A },
1008N/A "cluster" : {
1008N/A "mainTable" : "clusterobjects",
1008N/A "propertiesTable" : "clusterobjectproperties",
1008N/A "searchableDefault" : true
1008N/A }
1008N/A },
1008N/A "explicitMapping" : {
1008N/A "link" : {
1008N/A "table" : "links",
1008N/A "objectToColumn" : {
1008N/A "_id" : "objectid",
1008N/A "_rev" : "rev",
1008N/A "linkType" : "linktype",
1008N/A "firstId" : "firstid",
1008N/A "secondId" : "secondid"
1008N/A }
1008N/A },
1008N/A "ui/notification" : {
1008N/A "table" : "uinotification",
1008N/A "objectToColumn" : {
1008N/A "_id" : "objectid",
1008N/A "_rev" : "rev",
1008N/A "requester" : "requester",
1008N/A "requesterId" : "requesterId",
1008N/A "receiverId" : "receiverId",
1008N/A "createDate" : "createDate",
1008N/A "notificationType" : "notificationType",
1008N/A "notificationSubtype" : "notificationSubtype",
1008N/A "message" : "message"
1008N/A }
1008N/A },
1008N/A "internal/user" : {
1008N/A "table" : "internaluser",
1008N/A "objectToColumn" : {
1008N/A "_id" : "objectid",
1008N/A "_rev" : "rev",
1008N/A "password" : "pwd",
1008N/A "roles" : "roles"
1008N/A }
1008N/A },
1008N/A "audit/activity" : {
1008N/A "table" : "auditactivity",
1008N/A "objectToColumn" : {
1008N/A "_id" : "objectid",
1008N/A "activityId" : "activityid",
1008N/A "timestamp" : "activitydate",
1008N/A "action" : "activity",
1008N/A "message" : "message",
1008N/A "objectId" : "subjectid",
1008N/A "rev" : "subjectrev",
1008N/A "rootActionId" : "rootactionid",
1008N/A "parentActionId" : "parentactionid",
1008N/A "requester" : "requester",
1008N/A "approver" : "approver",
1008N/A "before" : "subjectbefore",
1008N/A "after" : "subjectafter",
1008N/A "status" : "status",
1008N/A "changedFields" : "changedfields",
1008N/A "passwordChanged" : "passwordchanged"
1008N/A }
1008N/A },
1008N/A "audit/recon" : {
1008N/A "table" : "auditrecon",
1008N/A "objectToColumn" : {
1008N/A "_id" : "objectid",
1008N/A "entryType" : "entrytype",
1008N/A "rootActionId" : "rootactionid",
1008N/A "action" : "activity",
1008N/A "message" : "message",
1008N/A "reconciling" : "reconciling",
1008N/A "reconId" : "reconid",
1008N/A "reconAction" : "reconaction",
1008N/A "situation" : "situation",
1008N/A "sourceObjectId" : "sourceobjectid",
1008N/A "status" : "status",
1008N/A "targetObjectId" : "targetobjectid",
1008N/A "ambiguousTargetObjectIds" : "ambiguoustargetobjectids",
1008N/A "timestamp" : "activitydate",
1008N/A "actionId" : "actionid",
1008N/A "exception" : "exceptiondetail",
1008N/A "mapping" : "mapping",
1008N/A "messageDetail" : { "column" : "messagedetail", "type" : "JSON_MAP" }
1008N/A }
1008N/A },
1008N/A "audit/sync" : {
1008N/A "table" : "auditsync",
1008N/A "objectToColumn" : {
1008N/A "_id" : "objectid",
1008N/A "status" : "status",
1008N/A "situation" : "situation",
1008N/A "action" : "activity",
1008N/A "actionId" : "actionid",
1008N/A "rootActionId" : "rootactionid",
1008N/A "sourceObjectId" : "sourceobjectid",
1008N/A "targetObjectId" : "targetobjectid",
1008N/A "timestamp" : "activitydate",
1008N/A "mapping" : "mapping",
1008N/A "exception" : "exceptiondetail",
1008N/A "message" : "message",
1008N/A "messageDetail" : { "column" : "messagedetail", "type" : "JSON_MAP" }
1008N/A }
1008N/A },
1008N/A "audit/access" : {
1008N/A "table" : "auditaccess",
1008N/A "objectToColumn" : {
1008N/A "_id" : "objectid",
1008N/A "action" : "activity",
1008N/A "ip" : "ip",
1008N/A "principal" : "principal",
1008N/A "roles" : "roles",
1008N/A "status" : "status",
1008N/A "timestamp" : "activitydate"
1008N/A }
1008N/A },
1008N/A "security" : {
1008N/A "table" : "security",
1008N/A "objectToColumn" : {
1008N/A "_id" : "objectid",
1008N/A "_rev" : "rev",
1008N/A "storeString" : "storestring"
1008N/A }
1008N/A },
1008N/A "security/keys" : {
1008N/A "table" : "securitykeys",
1008N/A "objectToColumn" : {
1008N/A "_id" : "objectid",
1008N/A "_rev" : "rev",
1008N/A "keyPair" : "keypair"
1008N/A }
1008N/A }
1008N/A }
1008N/A }
1008N/A}
1008N/A