diff --git a/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api/pom.xml b/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api/pom.xml index 2d8a1dc40c..23bb4eece2 100644 --- a/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api/pom.xml +++ b/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core grafana-mgt - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common/pom.xml b/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common/pom.xml index a759665e92..4839960ae1 100644 --- a/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common/pom.xml +++ b/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core grafana-mgt - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core/pom.xml b/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core/pom.xml index 39354b7456..0c336eadda 100644 --- a/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core/pom.xml +++ b/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core grafana-mgt - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/analytics-mgt/grafana-mgt/pom.xml b/components/analytics-mgt/grafana-mgt/pom.xml index 7bc9db7e86..1e498a9cbd 100644 --- a/components/analytics-mgt/grafana-mgt/pom.xml +++ b/components/analytics-mgt/grafana-mgt/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core analytics-mgt - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/analytics-mgt/pom.xml b/components/analytics-mgt/pom.xml index bc9ce9529f..320c3bd644 100644 --- a/components/analytics-mgt/pom.xml +++ b/components/analytics-mgt/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core.parent io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.analytics.extension/pom.xml b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.analytics.extension/pom.xml index 951f3813a2..d5195bca96 100644 --- a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.analytics.extension/pom.xml +++ b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.analytics.extension/pom.xml @@ -20,7 +20,7 @@ apimgt-extensions io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT 4.0.0 diff --git a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.annotations/pom.xml b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.annotations/pom.xml index 8fc927f575..eb33dc54e7 100644 --- a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.annotations/pom.xml +++ b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.annotations/pom.xml @@ -22,7 +22,7 @@ apimgt-extensions io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.application.extension.api/pom.xml b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.application.extension.api/pom.xml index 00bad68142..c3ff3a43e8 100644 --- a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.application.extension.api/pom.xml +++ b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.application.extension.api/pom.xml @@ -21,7 +21,7 @@ apimgt-extensions io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.application.extension/pom.xml b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.application.extension/pom.xml index 5dc47782f4..f5b8cc9bda 100644 --- a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.application.extension/pom.xml +++ b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.application.extension/pom.xml @@ -22,7 +22,7 @@ apimgt-extensions io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.extension.rest.api/pom.xml b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.extension.rest.api/pom.xml index 0529a0a238..b7dc08b380 100644 --- a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.extension.rest.api/pom.xml +++ b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.extension.rest.api/pom.xml @@ -22,7 +22,7 @@ apimgt-extensions io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.keymgt.extension.api/pom.xml b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.keymgt.extension.api/pom.xml index 02f206b74a..4d34bce5f8 100644 --- a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.keymgt.extension.api/pom.xml +++ b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.keymgt.extension.api/pom.xml @@ -21,7 +21,7 @@ apimgt-extensions io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT 4.0.0 diff --git a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.keymgt.extension/pom.xml b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.keymgt.extension/pom.xml index 2dad4adae3..6b2581ae08 100644 --- a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.keymgt.extension/pom.xml +++ b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.keymgt.extension/pom.xml @@ -21,7 +21,7 @@ apimgt-extensions io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.webapp.publisher/pom.xml b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.webapp.publisher/pom.xml index 15141fa9f2..4582e37e13 100644 --- a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.webapp.publisher/pom.xml +++ b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.webapp.publisher/pom.xml @@ -22,7 +22,7 @@ apimgt-extensions io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.webapp.publisher/src/main/java/io/entgra/device/mgt/core/apimgt/webapp/publisher/APIPublisherServiceImpl.java b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.webapp.publisher/src/main/java/io/entgra/device/mgt/core/apimgt/webapp/publisher/APIPublisherServiceImpl.java index c6c9003b07..7bcb38002a 100644 --- a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.webapp.publisher/src/main/java/io/entgra/device/mgt/core/apimgt/webapp/publisher/APIPublisherServiceImpl.java +++ b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.webapp.publisher/src/main/java/io/entgra/device/mgt/core/apimgt/webapp/publisher/APIPublisherServiceImpl.java @@ -716,16 +716,16 @@ public class APIPublisherServiceImpl implements APIPublisherService { } private void updatePermissions(String role, List permissions) throws UserStoreException { + if (role == null || permissions == null) return; AuthorizationManager authorizationManager = APIPublisherDataHolder.getInstance().getUserRealm() .getAuthorizationManager(); if (log.isDebugEnabled()) { log.debug("Updating the role '" + role + "'"); } - if (permissions != null && !permissions.isEmpty()) { - authorizationManager.clearRoleAuthorization(role); - for (String permission : permissions) { - authorizationManager.authorizeRole(role, permission, CarbonConstants.UI_PERMISSION_ACTION); - } + authorizationManager.clearRoleAuthorization(role); + for (String permission : permissions) { + authorizationManager.authorizeRole(role, permission, CarbonConstants.UI_PERMISSION_ACTION); + authorizationManager.refreshAllowedRolesForResource(permission); } } diff --git a/components/apimgt-extensions/pom.xml b/components/apimgt-extensions/pom.xml index e9e07fb3b9..59b57165b0 100644 --- a/components/apimgt-extensions/pom.xml +++ b/components/apimgt-extensions/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.common/pom.xml b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.common/pom.xml index 74d2f7aecf..c0e2fb95cf 100644 --- a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.common/pom.xml +++ b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.common/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core application-mgt - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/pom.xml b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/pom.xml index 5ebd2d7226..9ebf07202e 100644 --- a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/pom.xml +++ b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core application-mgt - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/SubscriptionManagerImpl.java b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/SubscriptionManagerImpl.java index 5dea673b5e..02a7606b45 100644 --- a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/SubscriptionManagerImpl.java +++ b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/SubscriptionManagerImpl.java @@ -186,23 +186,26 @@ public class SubscriptionManagerImpl implements SubscriptionManager { try { // Only for iOS devices int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true); - if (DeviceTypes.IOS.toString().equalsIgnoreCase(APIUtil.getDeviceTypeData(applicationDTO - .getDeviceTypeId()).getName())) { - // TODO: replace getAssetByAppId with the correct one in DAO - // Check if the app trying to subscribe is a VPP asset. - VppAssetDTO storedAsset = vppApplicationDAO.getAssetByAppId(applicationDTO.getId(), tenantId); - if (storedAsset != null) { // This is a VPP asset - List users = new ArrayList<>(); - List devices = applicationSubscriptionInfo.getDevices();// get - // subscribed device list, so that we can extract the users of those devices. - for (Device device : devices) { - VppUserDTO user = vppApplicationDAO.getUserByDMUsername(device.getEnrolmentInfo() - .getOwner(), PrivilegedCarbonContext.getThreadLocalCarbonContext() - .getTenantId(true)); - users.add(user); + // Ignore checking device type if app is a web clip + if(!applicationDTO.getType().equals("WEB_CLIP")){ + if (DeviceTypes.IOS.toString().equalsIgnoreCase(APIUtil.getDeviceTypeData(applicationDTO + .getDeviceTypeId()).getName())) { + // TODO: replace getAssetByAppId with the correct one in DAO + // Check if the app trying to subscribe is a VPP asset. + VppAssetDTO storedAsset = vppApplicationDAO.getAssetByAppId(applicationDTO.getId(), tenantId); + if (storedAsset != null) { // This is a VPP asset + List users = new ArrayList<>(); + List devices = applicationSubscriptionInfo.getDevices();// get + // subscribed device list, so that we can extract the users of those devices. + for (Device device : devices) { + VppUserDTO user = vppApplicationDAO.getUserByDMUsername(device.getEnrolmentInfo() + .getOwner(), PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getTenantId(true)); + users.add(user); + } + VPPApplicationManager vppManager = APIUtil.getVPPManager(); + vppManager.addAssociation(storedAsset, users); } - VPPApplicationManager vppManager = APIUtil.getVPPManager(); - vppManager.addAssociation(storedAsset, users); } } } catch (BadRequestException e) { diff --git a/components/application-mgt/pom.xml b/components/application-mgt/pom.xml index 005789d0a6..4c68896de0 100644 --- a/components/application-mgt/pom.xml +++ b/components/application-mgt/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.api/pom.xml b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.api/pom.xml index ad742cd285..5002509b66 100644 --- a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.api/pom.xml +++ b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.api/pom.xml @@ -22,7 +22,7 @@ certificate-mgt io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.cert.admin.api/pom.xml b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.cert.admin.api/pom.xml index 0b0f530259..fb8dc0520f 100644 --- a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.cert.admin.api/pom.xml +++ b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.cert.admin.api/pom.xml @@ -22,7 +22,7 @@ certificate-mgt io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/pom.xml b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/pom.xml index 2e5bb73e23..3a46fa2008 100644 --- a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/pom.xml +++ b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core certificate-mgt - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/AbstractCertificateDAOImpl.java b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/AbstractCertificateDAOImpl.java index a5ec99203e..9116acb94c 100644 --- a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/AbstractCertificateDAOImpl.java +++ b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/AbstractCertificateDAOImpl.java @@ -53,8 +53,8 @@ public abstract class AbstractCertificateDAOImpl implements CertificateDAO{ try { conn = this.getConnection(); stmt = conn.prepareStatement( - "INSERT INTO DM_DEVICE_CERTIFICATE (SERIAL_NUMBER, CERTIFICATE, TENANT_ID, USERNAME)" - + " VALUES (?,?,?,?)"); + "INSERT INTO DM_DEVICE_CERTIFICATE (SERIAL_NUMBER, CERTIFICATE, TENANT_ID, USERNAME, DEVICE_IDENTIFIER)" + + " VALUES (?,?,?,?,?)"); PrivilegedCarbonContext threadLocalCarbonContext = PrivilegedCarbonContext. getThreadLocalCarbonContext(); String username = threadLocalCarbonContext.getUsername(); @@ -70,6 +70,7 @@ public abstract class AbstractCertificateDAOImpl implements CertificateDAO{ stmt.setBytes(2, bytes); stmt.setInt(3, certificate.getTenantId()); stmt.setString(4, username); + stmt.setString(5, certificate.getDeviceIdentifier()); stmt.addBatch(); } stmt.executeBatch(); diff --git a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/GenericCertificateDAOImpl.java b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/GenericCertificateDAOImpl.java index 455942b305..92891754ed 100644 --- a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/GenericCertificateDAOImpl.java +++ b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/GenericCertificateDAOImpl.java @@ -64,11 +64,11 @@ public class GenericCertificateDAOImpl extends AbstractCertificateDAOImpl { "WHERE TENANT_ID = ?"; if (StringUtils.isNotEmpty(serialNumber)) { - sql += " AND SERIAL_NUMBER = ?"; + sql += " AND SERIAL_NUMBER LIKE ?"; } if (StringUtils.isNotEmpty(deviceIdentifier)) { - sql += " AND DEVICE_IDENTIFIER = ?"; + sql += " AND DEVICE_IDENTIFIER LIKE ?"; } if (StringUtils.isNotEmpty(username)) { @@ -80,11 +80,11 @@ public class GenericCertificateDAOImpl extends AbstractCertificateDAOImpl { int paramIdx = 2; if (StringUtils.isNotEmpty(serialNumber)) { - stmt.setString(paramIdx++, serialNumber); + stmt.setString(paramIdx++, "%" + serialNumber + "%"); } if (StringUtils.isNotEmpty(deviceIdentifier)) { - stmt.setString(paramIdx++, deviceIdentifier); + stmt.setString(paramIdx++, "%" + deviceIdentifier + "%"); } if (StringUtils.isNotEmpty(username)) { @@ -125,12 +125,12 @@ public class GenericCertificateDAOImpl extends AbstractCertificateDAOImpl { "WHERE TENANT_ID = ? "; if (StringUtils.isNotEmpty(serialNumber)) { - query += "AND SERIAL_NUMBER = ? "; + query += "AND SERIAL_NUMBER LIKE ? "; isCertificateSerialNumberProvided = true; } if (StringUtils.isNotEmpty(deviceIdentifier)) { - query += "AND DEVICE_IDENTIFIER = ? "; + query += "AND DEVICE_IDENTIFIER LIKE ? "; isCertificateDeviceIdentifierProvided = true; } @@ -145,10 +145,10 @@ public class GenericCertificateDAOImpl extends AbstractCertificateDAOImpl { int paramIdx = 1; stmt.setInt(paramIdx++, tenantId); if (isCertificateSerialNumberProvided) { - stmt.setString(paramIdx++, serialNumber); + stmt.setString(paramIdx++, "%" + serialNumber + "%"); } if (isCertificateDeviceIdentifierProvided) { - stmt.setString(paramIdx++, deviceIdentifier); + stmt.setString(paramIdx++, "%" + deviceIdentifier + "%"); } if (isCertificateUsernameProvided) { stmt.setString(paramIdx++, "%" + username + "%"); diff --git a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/OracleCertificateDAOImpl.java b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/OracleCertificateDAOImpl.java index cbb689977b..9fd87d6ed0 100644 --- a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/OracleCertificateDAOImpl.java +++ b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/OracleCertificateDAOImpl.java @@ -64,12 +64,12 @@ public class OracleCertificateDAOImpl extends AbstractCertificateDAOImpl { "FROM DM_DEVICE_CERTIFICATE " + "WHERE TENANT_ID = ? "; if (StringUtils.isNotEmpty(serialNumber)) { - query += "AND SERIAL_NUMBER = ? "; + query += "AND SERIAL_NUMBER LIKE ? "; isCertificateSerialNumberProvided = true; } if (StringUtils.isNotEmpty(deviceIdentifier)) { - query += "AND DEVICE_IDENTIFIER = ? "; + query += "AND DEVICE_IDENTIFIER LIKE ? "; isCertificateDeviceIdentifierProvided = true; } @@ -84,10 +84,10 @@ public class OracleCertificateDAOImpl extends AbstractCertificateDAOImpl { int paramIdx = 1; stmt.setInt(paramIdx++, tenantId); if (isCertificateSerialNumberProvided) { - stmt.setString(paramIdx++, serialNumber); + stmt.setString(paramIdx++, "%" + serialNumber + "%"); } if (isCertificateDeviceIdentifierProvided) { - stmt.setString(paramIdx++, deviceIdentifier); + stmt.setString(paramIdx++, "%" + deviceIdentifier + "%"); } if (isCertificateUsernameProvided) { stmt.setString(paramIdx++, "%" + username + "%"); @@ -137,11 +137,11 @@ public class OracleCertificateDAOImpl extends AbstractCertificateDAOImpl { "WHERE TENANT_ID = ?"; if (StringUtils.isNotEmpty(serialNumber)) { - sql += " AND SERIAL_NUMBER = ?"; + sql += " AND SERIAL_NUMBER LIKE ?"; } if (StringUtils.isNotEmpty(deviceIdentifier)) { - sql += " AND DEVICE_IDENTIFIER = ?"; + sql += " AND DEVICE_IDENTIFIER LIKE ?"; } if (StringUtils.isNotEmpty(username)) { @@ -153,11 +153,11 @@ public class OracleCertificateDAOImpl extends AbstractCertificateDAOImpl { int paramIdx = 2; if (StringUtils.isNotEmpty(serialNumber)) { - stmt.setString(paramIdx++, serialNumber); + stmt.setString(paramIdx++, "%" + serialNumber + "%"); } if (StringUtils.isNotEmpty(deviceIdentifier)) { - stmt.setString(paramIdx++, deviceIdentifier); + stmt.setString(paramIdx++, "%" + deviceIdentifier + "%"); } if (StringUtils.isNotEmpty(username)) { diff --git a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/PostgreSQLCertificateDAOImpl.java b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/PostgreSQLCertificateDAOImpl.java index 92b5720102..ef06ec0000 100644 --- a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/PostgreSQLCertificateDAOImpl.java +++ b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/PostgreSQLCertificateDAOImpl.java @@ -64,12 +64,12 @@ public class PostgreSQLCertificateDAOImpl extends AbstractCertificateDAOImpl { "FROM DM_DEVICE_CERTIFICATE " + "WHERE TENANT_ID = ? "; if (StringUtils.isNotEmpty(serialNumber)) { - query += "AND SERIAL_NUMBER = ? "; + query += "AND SERIAL_NUMBER LIKE ? "; isCertificateSerialNumberProvided = true; } if (StringUtils.isNotEmpty(deviceIdentifier)) { - query += "AND DEVICE_IDENTIFIER = ? "; + query += "AND DEVICE_IDENTIFIER LIKE ? "; isCertificateDeviceIdentifierProvided = true; } @@ -84,10 +84,10 @@ public class PostgreSQLCertificateDAOImpl extends AbstractCertificateDAOImpl { int paramIdx = 1; stmt.setInt(paramIdx++, tenantId); if (isCertificateSerialNumberProvided) { - stmt.setString(paramIdx++, serialNumber); + stmt.setString(paramIdx++, "%" + serialNumber + "%"); } if (isCertificateDeviceIdentifierProvided) { - stmt.setString(paramIdx++, deviceIdentifier); + stmt.setString(paramIdx++, "%" + deviceIdentifier + "%"); } if (isCertificateUsernameProvided) { stmt.setString(paramIdx++, "%" + username + "%"); @@ -137,15 +137,15 @@ public class PostgreSQLCertificateDAOImpl extends AbstractCertificateDAOImpl { "WHERE TENANT_ID = ?"; if (StringUtils.isNotEmpty(serialNumber)) { - sql += " AND SERIAL_NUMBER = ?"; + sql += " AND SERIAL_NUMBER LIKE ?"; } if (StringUtils.isNotEmpty(deviceIdentifier)) { - sql += " AND DEVICE_IDENTIFIER = ?"; + sql += " AND DEVICE_IDENTIFIER LIKE ?"; } if (StringUtils.isNotEmpty(username)) { - sql += " AND USERNAME ILIKE ?"; + sql += " AND USERNAME LIKE ?"; } try (PreparedStatement stmt = conn.prepareStatement(sql)) { @@ -153,11 +153,11 @@ public class PostgreSQLCertificateDAOImpl extends AbstractCertificateDAOImpl { int paramIdx = 2; if (StringUtils.isNotEmpty(serialNumber)) { - stmt.setString(paramIdx++, serialNumber); + stmt.setString(paramIdx++, "%" + serialNumber + "%"); } if (StringUtils.isNotEmpty(deviceIdentifier)) { - stmt.setString(paramIdx++, deviceIdentifier); + stmt.setString(paramIdx++, "%" + deviceIdentifier + "%"); } if (StringUtils.isNotEmpty(username)) { diff --git a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/SQLServerCertificateDAOImpl.java b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/SQLServerCertificateDAOImpl.java index 80f902614d..22874dd7b7 100644 --- a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/SQLServerCertificateDAOImpl.java +++ b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/dao/impl/SQLServerCertificateDAOImpl.java @@ -64,12 +64,12 @@ public class SQLServerCertificateDAOImpl extends AbstractCertificateDAOImpl { "FROM DM_DEVICE_CERTIFICATE " + "WHERE TENANT_ID = ? "; if (StringUtils.isNotEmpty(serialNumber)) { - query += "AND SERIAL_NUMBER = ? "; + query += "AND SERIAL_NUMBER LIKE ? "; isCertificateSerialNumberProvided = true; } if (StringUtils.isNotEmpty(deviceIdentifier)) { - query += "AND DEVICE_IDENTIFIER = ? "; + query += "AND DEVICE_IDENTIFIER LIKE ? "; isCertificateDeviceIdentifierProvided = true; } @@ -84,10 +84,10 @@ public class SQLServerCertificateDAOImpl extends AbstractCertificateDAOImpl { int paramIdx = 1; stmt.setInt(paramIdx++, tenantId); if (isCertificateSerialNumberProvided) { - stmt.setString(paramIdx++, serialNumber); + stmt.setString(paramIdx++, "%" + serialNumber + "%"); } if (isCertificateDeviceIdentifierProvided) { - stmt.setString(paramIdx++, deviceIdentifier); + stmt.setString(paramIdx++, "%" + deviceIdentifier + "%"); } if (isCertificateUsernameProvided) { stmt.setString(paramIdx++, "%" + username + "%"); @@ -137,11 +137,11 @@ public class SQLServerCertificateDAOImpl extends AbstractCertificateDAOImpl { "WHERE TENANT_ID = ?"; if (StringUtils.isNotEmpty(serialNumber)) { - sql += " AND SERIAL_NUMBER = ?"; + sql += " AND SERIAL_NUMBER LIKE ?"; } if (StringUtils.isNotEmpty(deviceIdentifier)) { - sql += " AND DEVICE_IDENTIFIER = ?"; + sql += " AND DEVICE_IDENTIFIER LIKE ?"; } if (StringUtils.isNotEmpty(username)) { @@ -153,11 +153,11 @@ public class SQLServerCertificateDAOImpl extends AbstractCertificateDAOImpl { int paramIdx = 2; if (StringUtils.isNotEmpty(serialNumber)) { - stmt.setString(paramIdx++, serialNumber); + stmt.setString(paramIdx++, "%" + serialNumber + "%"); } if (StringUtils.isNotEmpty(deviceIdentifier)) { - stmt.setString(paramIdx++, deviceIdentifier); + stmt.setString(paramIdx++, "%" + deviceIdentifier + "%"); } if (StringUtils.isNotEmpty(username)) { diff --git a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/impl/CertificateGenerator.java b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/impl/CertificateGenerator.java index 347dea3d4f..e8a29ebc29 100755 --- a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/impl/CertificateGenerator.java +++ b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/main/java/io/entgra/device/mgt/core/certificate/mgt/core/impl/CertificateGenerator.java @@ -849,6 +849,7 @@ public class CertificateGenerator { new io.entgra.device.mgt.core.certificate.mgt.core.bean.Certificate(); List certificates = new ArrayList<>(); certificate.setTenantId(tenantId); + certificate.setDeviceIdentifier(commonName); certificate.setCertificate(issuedCert); certificates.add(certificate); saveCertInKeyStore(certificates); diff --git a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/test/resources/sql/h2.sql b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/test/resources/sql/h2.sql index 0fb769e406..bee98d7dbf 100644 --- a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/test/resources/sql/h2.sql +++ b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.core/src/test/resources/sql/h2.sql @@ -39,5 +39,5 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_CERTIFICATE ( TENANT_ID INTEGER DEFAULT 0, DEVICE_IDENTIFIER VARCHAR(300), USERNAME VARCHAR(500) DEFAULT NULL, - PRIMARY KEY (ID) + PRIMARY KEY (ID) ); \ No newline at end of file diff --git a/components/certificate-mgt/pom.xml b/components/certificate-mgt/pom.xml index b218c20dd4..08506aab76 100644 --- a/components/certificate-mgt/pom.xml +++ b/components/certificate-mgt/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.defaultrole.manager/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.defaultrole.manager/pom.xml index 6bed168fde..54ab94e0c2 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.defaultrole.manager/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.defaultrole.manager/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.type.deployer/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.type.deployer/pom.xml index 66530f647c..3203b5510b 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.type.deployer/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.type.deployer/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.logger/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.logger/pom.xml index d4c7eda985..ef1768fbd2 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.logger/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.logger/pom.xml @@ -21,7 +21,7 @@ device-mgt-extensions io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.pull.notification/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.pull.notification/pom.xml index 90a6331adb..c23c06b599 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.pull.notification/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.pull.notification/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.fcm/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.fcm/pom.xml index e5b71633c3..7c985635cb 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.fcm/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.fcm/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.http/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.http/pom.xml index b3fabbd1a3..06b1fa73a9 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.http/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.http/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.mqtt/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.mqtt/pom.xml index 44fac89fc6..2ac7d3c3bf 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.mqtt/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.mqtt/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.xmpp/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.xmpp/pom.xml index 5a27316b32..8051a35eb4 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.xmpp/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.xmpp/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.stateengine/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.stateengine/pom.xml index 173081ceff..02f15f077f 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.stateengine/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.stateengine/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/pom.xml new file mode 100644 index 0000000000..0e16c5ef26 --- /dev/null +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/pom.xml @@ -0,0 +1,230 @@ + + + + + + + device-mgt-extensions + io.entgra.device.mgt.core + 5.0.33-SNAPSHOT + ../pom.xml + + + 4.0.0 + io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper + bundle + Entgra IoT - User store role mapping Module + Entgra IoT - User store role mapping Module + http://entgra.io + + + + + org.apache.felix + maven-scr-plugin + + + maven-compiler-plugin + + 1.8 + 1.8 + + 2.3.2 + + + org.apache.felix + maven-bundle-plugin + 1.4.0 + true + + + ${project.artifactId} + ${project.artifactId} + ${io.entgra.device.mgt.core.version} + IOT - User store role mapping Module + io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper.internal + + org.osgi.framework.*;version="${imp.package.version.osgi.framework}", + org.osgi.service.*;version="${imp.package.version.osgi.service}", + org.apache.commons.logging, + org.apache.axis2.*;version="${axis2.osgi.version.range}", + org.wso2.carbon.core, + org.wso2.carbon.utils.*, + javax.xml.bind;resolution:=optional, + javax.xml.bind.annotation, + javax.xml.parsers, + org.w3c.dom, + org.wso2.carbon, + org.wso2.carbon.context, + org.wso2.carbon.user.api, + org.wso2.carbon.user.core.common, + org.wso2.carbon.user.core.service, + org.wso2.carbon.user.mgt.common, + io.entgra.device.mgt.core.server.bootup.heartbeat.beacon.service, + io.entgra.device.mgt.core.server.bootup.heartbeat.beacon.exception + + + !io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper.internal, + io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper.*;version="${project.version}" + + + + + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + + + + + + + + + + + + + + + + + + + + org.eclipse.osgi + org.eclipse.osgi + + + org.eclipse.osgi + org.eclipse.osgi.services + + + org.wso2.carbon + org.wso2.carbon.core + + + org.wso2.carbon + org.wso2.carbon.logging + + + org.wso2.carbon + org.wso2.carbon.utils + provided + + + org.wso2.carbon + org.wso2.carbon.user.api + provided + + + org.wso2.carbon + org.wso2.carbon.user.core + provided + + + org.wso2.carbon.identity.framework + org.wso2.carbon.user.mgt + provided + + + org.mockito + mockito-inline + test + + + org.testng + testng + test + + + org.wso2.orbit.com.h2database + h2 + test + + + org.apache.httpcomponents.wso2 + httpcore + test + + + org.wso2.apache.httpcomponents + httpclient + test + + + org.wso2.carbon + org.wso2.carbon.securevault + + test + + + org.wso2.securevault + org.wso2.securevault + test + + + xerces.wso2 + xercesImpl + test + + + org.apache.axis2.wso2 + axis2 + test + + + org.wso2.carbon + org.wso2.carbon.queuing + test + + + javax.xml.bind + jaxb-api + test + + + io.entgra.device.mgt.core + io.entgra.device.mgt.core.server.bootup.heartbeat.beacon + provided + + + diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/UserStoreRoleMapper.java b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/UserStoreRoleMapper.java new file mode 100644 index 0000000000..59e3d352c7 --- /dev/null +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/UserStoreRoleMapper.java @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2018 - 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper; + +import io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper.bean.RoleMapping; +import io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper.bean.UserStoreRoleMappingConfig; +import io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper.internal.UserStoreRoleMappingDataHolder; +import io.entgra.device.mgt.core.server.bootup.heartbeat.beacon.exception.HeartBeatManagementException; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.core.ServerStartupObserver; +import org.wso2.carbon.user.api.UserStoreException; +import org.wso2.carbon.user.api.UserStoreManager; +import org.wso2.carbon.utils.multitenancy.MultitenantConstants; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; + +public class UserStoreRoleMapper implements ServerStartupObserver { + private static final Log log = LogFactory.getLog(UserStoreRoleMapper.class); + + private UserStoreRoleMappingConfig config = null; + @Override + public void completingServerStartup() { + + } + + @Override + public void completedServerStartup() { + + config = UserStoreRoleMappingDataHolder.getInstance() + .getUserStoreRoleMappingConfigManager().getUserStoreRoleMappingConfig(); + + try { + if ((config.isEnabled() && + UserStoreRoleMappingDataHolder.getInstance().getHeartBeatService().isTaskPartitioningEnabled() && + UserStoreRoleMappingDataHolder.getInstance().getHeartBeatService().isQualifiedToExecuteTask()) + || (config.isEnabled() && + !UserStoreRoleMappingDataHolder.getInstance().getHeartBeatService().isTaskPartitioningEnabled())) { + Runnable periodicTask = new Runnable() { + public void run() { + updateRoleMapping(); + log.info("UserStoreRoleMapper executed...."); + } + }; + + ScheduledExecutorService executor = + Executors.newSingleThreadScheduledExecutor(); + + executor.scheduleAtFixedRate(periodicTask, config.getInitialDelayInSeconds(), config.getPeriodInSeconds(), TimeUnit.SECONDS); + } + } catch (HeartBeatManagementException e) { + log.error("Error while accessing heart beat service " + e.getMessage()); + } + } + + private void updateRoleMapping() { + try { + PrivilegedCarbonContext.startTenantFlow(); + PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantId( + MultitenantConstants.SUPER_TENANT_ID); + PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain( + MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); + + List roleMappings = config.getMappings(); + + if (!roleMappings.isEmpty()) { + UserStoreManager userStoreManager = + UserStoreRoleMappingDataHolder.getInstance().getRealmService() + .getTenantUserRealm(MultitenantConstants.SUPER_TENANT_ID).getUserStoreManager(); + + for (RoleMapping mapping : roleMappings) { + if (userStoreManager.isExistingRole(mapping.getSecondaryRole())) { + String[] users = userStoreManager.getUserListOfRole(mapping.getSecondaryRole()); + if (users != null && users.length > 0) { + List primaryRoles = mapping.getInternalRoles(); + for (String role : primaryRoles) { + if (userStoreManager.isExistingRole(role)) { + String[] existingUsers = userStoreManager.getUserListOfRole(role); + List existingUserList = new ArrayList<>(Arrays.asList(existingUsers)); + List newUserList = new ArrayList<>(); + for (String user : users) { + if (existingUserList.contains(user)) { + // if contains, remove from existing list + existingUserList.remove(user); + } else { + // new user + newUserList.add(user); + } + } + + List deleteUserList = new ArrayList<>(); + if (!existingUserList.isEmpty()) { + String domain = mapping.getSecondaryRole().substring(0, mapping.getSecondaryRole().indexOf("/")); + for (String user : existingUserList) { + if (user.startsWith(domain.toUpperCase())) { + deleteUserList.add(user); + } + } + } + + // update user list of given role + if (!newUserList.isEmpty() || !deleteUserList.isEmpty()) { + userStoreManager.updateUserListOfRole(role, deleteUserList.toArray(new String[0]), newUserList.toArray(new String[0])); + log.info("update user role mapping executed....."); + } + } + } + } + } + } + } + } catch (UserStoreException e) { + log.error("Error while getting user store..." + e.getMessage()); + } finally { + PrivilegedCarbonContext.endTenantFlow(); + } + } +} diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/UserStoreRoleMappingConfigManager.java b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/UserStoreRoleMappingConfigManager.java new file mode 100644 index 0000000000..1c4b5eac16 --- /dev/null +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/UserStoreRoleMappingConfigManager.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2018 - 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper; + +import io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper.bean.UserStoreRoleMappingConfig; +import io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper.exception.UserStoreRoleMapperException; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.w3c.dom.Document; +import org.wso2.carbon.utils.CarbonUtils; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import java.io.File; + +public class UserStoreRoleMappingConfigManager { + + private static final Log log = LogFactory.getLog(UserStoreRoleMappingConfigManager.class); + private static final String USERSTORE_ROLE_MAPPING_CONFIG_PATH = CarbonUtils.getCarbonConfigDirPath() + + File.separator + "user-store-role-mapping-config.xml"; + + private final UserStoreRoleMappingConfig userStoreRoleMappingConfig; + + public UserStoreRoleMappingConfigManager() throws UserStoreRoleMapperException { + try { + File UserStoreRoleMappingConfig = new File(USERSTORE_ROLE_MAPPING_CONFIG_PATH); + Document doc = convertToDocument(UserStoreRoleMappingConfig); + JAXBContext smsContext = JAXBContext.newInstance(UserStoreRoleMappingConfig.class); + Unmarshaller unmarshaller = smsContext.createUnmarshaller(); + this.userStoreRoleMappingConfig = (UserStoreRoleMappingConfig) unmarshaller.unmarshal(doc); + } catch (JAXBException e) { + String msg = "Error occurred while initializing config '" + USERSTORE_ROLE_MAPPING_CONFIG_PATH + "'"; + log.error(msg, e); + throw new UserStoreRoleMapperException(msg, e); + } + } + + private static Document convertToDocument(File file) throws UserStoreRoleMapperException { + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + factory.setNamespaceAware(true); + + try { + factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); + factory.setFeature("http://javax.xml.XMLConstants/feature/secure-processing", true); + DocumentBuilder docBuilder = factory.newDocumentBuilder(); + return docBuilder.parse(file); + } catch (Exception e) { + throw new UserStoreRoleMapperException("Error occurred while parsing " + USERSTORE_ROLE_MAPPING_CONFIG_PATH + + " file, while converting to a org.w3c.dom.Document", e); + } + } + + public UserStoreRoleMappingConfig getUserStoreRoleMappingConfig() { + return this.userStoreRoleMappingConfig; + } + +} diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/bean/RoleMapping.java b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/bean/RoleMapping.java new file mode 100644 index 0000000000..604c58b4a2 --- /dev/null +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/bean/RoleMapping.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2018 - 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper.bean; + +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.List; + +@XmlRootElement( + name = "mapping" +) +public class RoleMapping { + private String secondaryRole; + + private List internalRoles; + + @XmlAttribute( + name = "secondaryRole" + ) + public String getSecondaryRole() { + return secondaryRole; + } + + public void setSecondaryRole(String secondaryRole) { + this.secondaryRole = secondaryRole; + } + + @XmlElementWrapper( + name = "internalRoles" + ) + @XmlElement( + name = "role" + ) + public List getInternalRoles() { + return internalRoles; + } + + public void setInternalRoles(List internalRoles) { + this.internalRoles = internalRoles; + } +} diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/bean/UserStoreRoleMappingConfig.java b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/bean/UserStoreRoleMappingConfig.java new file mode 100644 index 0000000000..58e287a9ee --- /dev/null +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/bean/UserStoreRoleMappingConfig.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2018 - 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper.bean; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.List; + +@XmlRootElement( + name = "UserStoreRoleMappingConfig" +) +public class UserStoreRoleMappingConfig { + + private boolean enabled; + private List mappings; + + private long initialDelayInSeconds; + + private long periodInSeconds; + + @XmlElement( + name = "enabled" + ) + public boolean isEnabled() { + return enabled; + } + + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } + + @XmlElementWrapper( + name = "mappings" + ) + @XmlElement( + name = "mapping" + ) + public List getMappings() { + return mappings; + } + + public void setMappings(List mappings) { + this.mappings = mappings; + } + + @XmlElement( + name = "initialDelayInSeconds" + ) + public long getInitialDelayInSeconds() { + return initialDelayInSeconds; + } + + public void setInitialDelayInSeconds(long initialDelayInSeconds) { + this.initialDelayInSeconds = initialDelayInSeconds; + } + + @XmlElement( + name = "periodInSeconds" + ) + public long getPeriodInSeconds() { + return periodInSeconds; + } + + public void setPeriodInSeconds(long periodInSeconds) { + this.periodInSeconds = periodInSeconds; + } +} diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/exception/UserStoreRoleMapperException.java b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/exception/UserStoreRoleMapperException.java new file mode 100644 index 0000000000..72d56d202a --- /dev/null +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/exception/UserStoreRoleMapperException.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2018 - 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper.exception; + +public class UserStoreRoleMapperException extends Exception { + + public UserStoreRoleMapperException(String msg, Exception e) { + super(msg, e); + } +} diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/internal/UserStoreRoleMappingDataHolder.java b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/internal/UserStoreRoleMappingDataHolder.java new file mode 100644 index 0000000000..71d3c32edd --- /dev/null +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/internal/UserStoreRoleMappingDataHolder.java @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2018 - 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper.internal; + +import io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper.UserStoreRoleMappingConfigManager; +import io.entgra.device.mgt.core.server.bootup.heartbeat.beacon.service.HeartBeatManagementService; +import org.wso2.carbon.context.CarbonContext; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.user.api.UserRealm; +import org.wso2.carbon.user.api.UserStoreException; +import org.wso2.carbon.user.api.UserStoreManager; +import org.wso2.carbon.user.core.service.RealmService; +import org.wso2.carbon.utils.ConfigurationContextService; + +public class UserStoreRoleMappingDataHolder { + + private ConfigurationContextService configurationContextService; + private RealmService realmService; + private UserStoreRoleMappingConfigManager userStoreRoleMappingConfigManager; + private HeartBeatManagementService heartBeatService; + private static final UserStoreRoleMappingDataHolder thisInstance = new UserStoreRoleMappingDataHolder(); + + private UserStoreRoleMappingDataHolder() {} + + public static UserStoreRoleMappingDataHolder getInstance() { + return thisInstance; + } + + public ConfigurationContextService getConfigurationContextService() { + return configurationContextService; + } + + public void setConfigurationContextService(ConfigurationContextService configurationContextService) { + this.configurationContextService = configurationContextService; + } + + public UserStoreManager getUserStoreManager() throws UserStoreException { + if (realmService == null) { + String msg = "Realm service has not initialized."; + throw new IllegalStateException(msg); + } + int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); + return realmService.getTenantUserRealm(tenantId).getUserStoreManager(); + } + + public UserRealm getUserRealm() throws UserStoreException { + UserRealm realm; + if (realmService == null) { + throw new IllegalStateException("Realm service not initialized"); + } + int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); + realm = realmService.getTenantUserRealm(tenantId); + return realm; + } + + public RealmService getRealmService() { + return realmService; + } + + public void setRealmService(RealmService realmService) { + this.realmService = realmService; + } + + public UserStoreRoleMappingConfigManager getUserStoreRoleMappingConfigManager() { + return userStoreRoleMappingConfigManager; + } + + public void setUserStoreRoleMappingConfigManager(UserStoreRoleMappingConfigManager userStoreRoleMappingConfigManager) { + this.userStoreRoleMappingConfigManager = userStoreRoleMappingConfigManager; + } + + public HeartBeatManagementService getHeartBeatService() { + return heartBeatService; + } + + public void setHeartBeatService(HeartBeatManagementService heartBeatService) { + this.heartBeatService = heartBeatService; + } +} diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/internal/UserStoreRoleMappingServiceComponent.java b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/internal/UserStoreRoleMappingServiceComponent.java new file mode 100644 index 0000000000..2471c18403 --- /dev/null +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/userstore/role/mapper/internal/UserStoreRoleMappingServiceComponent.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2018 - 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper.internal; + +import io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper.UserStoreRoleMapper; +import io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper.UserStoreRoleMappingConfigManager; +import io.entgra.device.mgt.core.server.bootup.heartbeat.beacon.service.HeartBeatManagementService; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.osgi.framework.BundleContext; +import org.osgi.service.component.ComponentContext; +import org.wso2.carbon.core.ServerStartupObserver; +import org.wso2.carbon.user.core.service.RealmService; +import org.wso2.carbon.utils.ConfigurationContextService; + +/** + * @scr.component name="io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper.internal.UserStoreRoleMappingServiceComponent" + * immediate="true" + * @scr.reference name="user.realmservice.default" + * interface="org.wso2.carbon.user.core.service.RealmService" + * cardinality="1..1" + * policy="dynamic" + * bind="setRealmService" + * unbind="unsetRealmService" + * @scr.reference name="config.context.service" + * interface="org.wso2.carbon.utils.ConfigurationContextService" + * cardinality="0..1" + * policy="dynamic" + * bind="setConfigurationContextService" + * unbind="unsetConfigurationContextService" + * @scr.reference name="entgra.heart.beat.service" + * interface="io.entgra.device.mgt.core.server.bootup.heartbeat.beacon.service.HeartBeatManagementService" + * cardinality="0..1" + * policy="dynamic" + * bind="setHeartBeatService" + * unbind="unsetHeartBeatService" + */ +public class UserStoreRoleMappingServiceComponent { + + private static final Log log = LogFactory.getLog(UserStoreRoleMappingServiceComponent.class); + + protected void activate(ComponentContext ctx) { + if (log.isDebugEnabled()) { + log.debug("Activating Role Management Service Component"); + } + try { + BundleContext bundleContext = ctx.getBundleContext(); + UserStoreRoleMapper mapper = new UserStoreRoleMapper(); + bundleContext.registerService(ServerStartupObserver.class.getName(), mapper, null); + UserStoreRoleMappingDataHolder.getInstance().setUserStoreRoleMappingConfigManager(new UserStoreRoleMappingConfigManager()); + if (log.isDebugEnabled()) { + log.debug("Role Management Service Component has been successfully activated"); + } + } catch (Throwable e) { + log.error("Error occurred while activating Role Management Service Component", e); + } + } + + protected void deactivate(ComponentContext ctx) { + if (log.isDebugEnabled()) { + log.debug("De-activating Role Manager Service Component"); + } + } + + protected void setConfigurationContextService(ConfigurationContextService configurationContextService) { + if (log.isDebugEnabled()) { + log.debug("Setting ConfigurationContextService"); + } + + UserStoreRoleMappingDataHolder.getInstance().setConfigurationContextService(configurationContextService); + } + + protected void unsetConfigurationContextService(ConfigurationContextService configurationContextService) { + if (log.isDebugEnabled()) { + log.debug("Un-setting ConfigurationContextService"); + } + UserStoreRoleMappingDataHolder.getInstance().setConfigurationContextService(null); + } + + /** + * Sets Realm Service. + * + * @param realmService An instance of RealmService + */ + protected void setRealmService(RealmService realmService) { + if (log.isDebugEnabled()) { + log.debug("Setting Realm Service"); + } + UserStoreRoleMappingDataHolder.getInstance().setRealmService(realmService); + } + + /** + * Unsets Realm Service. + * + * @param realmService An instance of RealmService + */ + protected void unsetRealmService(RealmService realmService) { + if (log.isDebugEnabled()) { + log.debug("Unsetting Realm Service"); + } + UserStoreRoleMappingDataHolder.getInstance().setRealmService(null); + } + + @SuppressWarnings("unused") + protected void setHeartBeatService(HeartBeatManagementService heartBeatService) { + if (log.isDebugEnabled()) { + log.debug("Setting heart beat service"); + } + UserStoreRoleMappingDataHolder.getInstance().setHeartBeatService(heartBeatService); + } + + @SuppressWarnings("unused") + protected void unsetHeartBeatService(HeartBeatManagementService heartBeatManagementService) { + if (log.isDebugEnabled()) { + log.debug("Removing heart beat service"); + } + UserStoreRoleMappingDataHolder.getInstance().setHeartBeatService(null); + } +} diff --git a/components/device-mgt-extensions/pom.xml b/components/device-mgt-extensions/pom.xml index 6fce15dac4..242c96ae81 100644 --- a/components/device-mgt-extensions/pom.xml +++ b/components/device-mgt-extensions/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core.parent io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml @@ -43,6 +43,7 @@ io.entgra.device.mgt.core.device.mgt.extensions.logger io.entgra.device.mgt.core.device.mgt.extensions.defaultrole.manager io.entgra.device.mgt.core.device.mgt.extensions.stateengine + io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/pom.xml b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/pom.xml index d5bbb2e967..c54c9445d3 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/pom.xml +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/pom.xml @@ -22,7 +22,7 @@ device-mgt io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/api/ActivityInfoProviderService.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/api/ActivityInfoProviderService.java index 7e645198a6..39b133202a 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/api/ActivityInfoProviderService.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/api/ActivityInfoProviderService.java @@ -378,7 +378,7 @@ public interface ActivityInfoProviderService { tags = "Device Activity Info Provider", extensions = { @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "perm:get-activity") + @ExtensionProperty(name = Constants.SCOPE, value = "dm:activity:get") }) }, nickname = "getDeviceActivitiesWithFilters" diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/api/DeviceManagementService.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/api/DeviceManagementService.java index c42557b7df..52f10eb16b 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/api/DeviceManagementService.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/api/DeviceManagementService.java @@ -21,6 +21,7 @@ package io.entgra.device.mgt.core.device.mgt.api.jaxrs.service.api; import io.entgra.device.mgt.core.apimgt.annotations.Scope; import io.entgra.device.mgt.core.apimgt.annotations.Scopes; import io.entgra.device.mgt.core.device.mgt.api.jaxrs.beans.*; +import io.entgra.device.mgt.core.device.mgt.api.jaxrs.service.impl.util.DisenrollRequest; import io.entgra.device.mgt.core.device.mgt.api.jaxrs.util.Constants; import io.entgra.device.mgt.core.device.mgt.common.Device; import io.entgra.device.mgt.core.device.mgt.common.EnrolmentInfo; @@ -33,11 +34,30 @@ import io.entgra.device.mgt.core.device.mgt.common.policy.mgt.Policy; import io.entgra.device.mgt.core.device.mgt.common.policy.mgt.monitor.NonComplianceData; import io.entgra.device.mgt.core.device.mgt.common.search.PropertyMap; import io.entgra.device.mgt.core.device.mgt.common.search.SearchContext; -import io.swagger.annotations.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; +import io.swagger.annotations.Extension; +import io.swagger.annotations.ExtensionProperty; +import io.swagger.annotations.Info; +import io.swagger.annotations.ResponseHeader; +import io.swagger.annotations.SwaggerDefinition; +import io.swagger.annotations.Tag; import javax.validation.Valid; import javax.validation.constraints.Size; -import javax.ws.rs.*; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.HeaderParam; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import java.util.List; @@ -1255,6 +1275,49 @@ public interface DeviceManagementService { @Size(max = 45) String deviceId); + @PUT + @Produces(MediaType.APPLICATION_JSON) + @Path("/disenroll") + @ApiOperation( + produces = MediaType.APPLICATION_JSON, + httpMethod = "PUT", + value = "Remove Multiple Devices Specified by Device IDs and Device Type", + notes = "Deletes multiple devices of the specified device type specified by their device IDs" + + " and returns the status of the dis-enrollment operation.", + tags = "Device Management", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = Constants.SCOPE, value = "dm:devices:delete") + }) + }, + nickname = "deleteMultipleDevicesByType" + ) + @ApiResponses( + value = { + @ApiResponse( + code = 200, + message = "OK. \n Successfully deleted the devices.", + response = Device.class, + responseHeaders = { + @ResponseHeader( + name = "Content-Type", + description = "The content type of the body") + }), + @ApiResponse( + code = 400, + message = "Bad Request. \n Invalid request or validation error.", + response = ErrorResponse.class), + @ApiResponse( + code = 500, + message = "Internal Server Error. \n " + + "Server error occurred while deleting devices.", + response = ErrorResponse.class) + }) + Response disenrollMultipleDevices(@ApiParam( + name = "deviceTypeWithDeviceIds", + value = "Device type and corresponding device IDs for disenrollment", + required = true) + DisenrollRequest deviceTypeWithDeviceIds); @GET @Produces(MediaType.APPLICATION_JSON) @Path("/device-type/{type}/features") diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/api/UserManagementService.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/api/UserManagementService.java index b8a3c1e528..8d25b43a95 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/api/UserManagementService.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/api/UserManagementService.java @@ -116,7 +116,7 @@ import javax.ws.rs.core.Response; description = "Adding a User", key = "um:users:cred:change", roles = {"Internal/devicemgt-user"}, - permissions = {"/login/password/update"} + permissions = {"/device-mgt/users/password/update"} ), @Scope( name = "Sending Enrollment Invitations to Users", diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/impl/DeviceManagementServiceImpl.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/impl/DeviceManagementServiceImpl.java index 70a773516b..96e3919929 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/impl/DeviceManagementServiceImpl.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/impl/DeviceManagementServiceImpl.java @@ -41,6 +41,7 @@ import io.entgra.device.mgt.core.application.mgt.common.exception.SubscriptionMa import io.entgra.device.mgt.core.application.mgt.common.services.ApplicationManager; import io.entgra.device.mgt.core.application.mgt.common.services.SubscriptionManager; import io.entgra.device.mgt.core.application.mgt.core.util.HelperUtil; +import io.entgra.device.mgt.core.device.mgt.api.jaxrs.service.impl.util.DisenrollRequest; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; @@ -110,8 +111,9 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Properties; -import java.util.concurrent.ExecutionException; +import java.util.HashMap; import java.util.Map; +import java.util.concurrent.ExecutionException; @Path("/devices") public class DeviceManagementServiceImpl implements DeviceManagementService { @@ -483,6 +485,64 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { } } + @PUT + @Override + @Path("/disenroll") + public Response disenrollMultipleDevices(DisenrollRequest deviceTypeWithDeviceIds) { + + if (deviceTypeWithDeviceIds == null) { + String errorMsg = "Invalid request. The request body must not be null."; + return Response.status(Response.Status.BAD_REQUEST).entity(errorMsg).build(); + } + DeviceManagementProviderService deviceManagementProviderService = DeviceMgtAPIUtils.getDeviceManagementService(); + + List successfullyDisenrolledDevices = new ArrayList<>(); + List failedToDisenrollDevices = new ArrayList<>(); + + Map> list = deviceTypeWithDeviceIds.getDeviceTypeWithDeviceIds(); + String deviceType; + List deviceIds; + DeviceIdentifier deviceIdentifier; + Device persistedDevice; + boolean response; + + for (Map.Entry> entry : list.entrySet()) { + deviceType = entry.getKey(); + deviceIds = entry.getValue(); + + for (String deviceId : deviceIds) { + deviceIdentifier = new DeviceIdentifier(deviceId, deviceType); + try { + persistedDevice = deviceManagementProviderService.getDevice(deviceIdentifier, true); + if (persistedDevice != null) { + response = deviceManagementProviderService.disenrollDevice(deviceIdentifier); + if (response) { + successfullyDisenrolledDevices.add(deviceIdentifier); + } else { + failedToDisenrollDevices.add(deviceIdentifier); + } + } else { + failedToDisenrollDevices.add(deviceIdentifier); + if(log.isDebugEnabled()){ + String msg = "Error encountered while dis-enrolling device of type: " + deviceType + " with " + deviceId; + log.error(msg); + } + } + } catch (DeviceManagementException e) { + String msg = "Error encountered while dis-enrolling device of type: " + deviceType + " with " + deviceId; + log.error(msg, e); + failedToDisenrollDevices.add(deviceIdentifier); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); + } + } + } + + Map> responseMap = new HashMap<>(); + responseMap.put("successfullyDisenrollDevices", successfullyDisenrolledDevices); + responseMap.put("failedToDisenrollDevices", failedToDisenrollDevices); + + return Response.status(Response.Status.OK).entity(responseMap).build(); + } @POST @Override @Path("/type/{deviceType}/id/{deviceId}/rename") diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/impl/RoleManagementServiceImpl.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/impl/RoleManagementServiceImpl.java index a80665d294..7790b5f913 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/impl/RoleManagementServiceImpl.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/impl/RoleManagementServiceImpl.java @@ -691,7 +691,7 @@ public class RoleManagementServiceImpl implements RoleManagementService { if ((filter == null) || filter.isEmpty()) { filter = "*"; } else { - filter += "*"; + filter = "*" + filter + "*"; } if (log.isDebugEnabled()) { log.debug("Getting the list of user roles"); diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/impl/UserManagementServiceImpl.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/impl/UserManagementServiceImpl.java index 10b5a29dfe..bc8b595ce8 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/impl/UserManagementServiceImpl.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/impl/UserManagementServiceImpl.java @@ -449,7 +449,7 @@ public class UserManagementServiceImpl implements UserManagementService { try { if (StringUtils.isNotEmpty(username)) { - commonUsers = getUserList(null, username); + commonUsers = getUserList(null, "*" + username + "*"); } if (commonUsers != null) { commonUsers.remove(Constants.APIM_RESERVED_USER); @@ -457,7 +457,7 @@ public class UserManagementServiceImpl implements UserManagementService { } if (!skipSearch(commonUsers) && StringUtils.isNotEmpty(firstName)) { - tempList = getUserList(Constants.USER_CLAIM_FIRST_NAME, firstName); + tempList = getUserList(Constants.USER_CLAIM_FIRST_NAME, "*" + firstName + "*"); if (commonUsers == null) { commonUsers = tempList; } else { @@ -466,7 +466,7 @@ public class UserManagementServiceImpl implements UserManagementService { } if (!skipSearch(commonUsers) && StringUtils.isNotEmpty(lastName)) { - tempList = getUserList(Constants.USER_CLAIM_LAST_NAME, lastName); + tempList = getUserList(Constants.USER_CLAIM_LAST_NAME, "*" + lastName + "*"); if (commonUsers == null || commonUsers.size() == 0) { commonUsers = tempList; } else { @@ -475,7 +475,7 @@ public class UserManagementServiceImpl implements UserManagementService { } if (!skipSearch(commonUsers) && StringUtils.isNotEmpty(emailAddress)) { - tempList = getUserList(Constants.USER_CLAIM_EMAIL_ADDRESS, emailAddress); + tempList = getUserList(Constants.USER_CLAIM_EMAIL_ADDRESS, "*" + emailAddress + "*"); if (commonUsers == null || commonUsers.size() == 0) { commonUsers = tempList; } else { diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/impl/util/DisenrollRequest.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/impl/util/DisenrollRequest.java new file mode 100644 index 0000000000..026866b5e1 --- /dev/null +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.api/src/main/java/io/entgra/device/mgt/core/device/mgt/api/jaxrs/service/impl/util/DisenrollRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2018 - 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package io.entgra.device.mgt.core.device.mgt.api.jaxrs.service.impl.util; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; +import java.util.Map; + +@ApiModel(value = "DisenrollRequest", description = "Contains the multiple devices specified by device IDs") +public class DisenrollRequest { + @ApiModelProperty(name = "deviceTypeWithDeviceIds", value = "Contains the multiple devices specified by device IDs with type", + required = true) + private Map> deviceTypeWithDeviceIds; + + public Map> getDeviceTypeWithDeviceIds() { + return deviceTypeWithDeviceIds; + } + + public void setDeviceTypeWithDeviceIds(Map> deviceTypeWithDeviceIds) { + this.deviceTypeWithDeviceIds = deviceTypeWithDeviceIds; + } +} diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.common/pom.xml b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.common/pom.xml index ca51d3e198..b2639eebd1 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.common/pom.xml +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.common/pom.xml @@ -21,7 +21,7 @@ device-mgt io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.common/src/main/java/io/entgra/device/mgt/core/device/mgt/common/spi/DeviceManagementService.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.common/src/main/java/io/entgra/device/mgt/core/device/mgt/common/spi/DeviceManagementService.java index d847fd8f9b..b7cd91f34e 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.common/src/main/java/io/entgra/device/mgt/core/device/mgt/common/spi/DeviceManagementService.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.common/src/main/java/io/entgra/device/mgt/core/device/mgt/common/spi/DeviceManagementService.java @@ -26,6 +26,7 @@ import io.entgra.device.mgt.core.device.mgt.common.license.mgt.License; import io.entgra.device.mgt.core.device.mgt.common.policy.mgt.PolicyMonitoringManager; import io.entgra.device.mgt.core.device.mgt.common.pull.notification.PullNotificationSubscriber; import io.entgra.device.mgt.core.device.mgt.common.push.notification.PushNotificationConfig; +import io.entgra.device.mgt.core.device.mgt.common.type.mgt.DeviceTypeMetaDefinition; import io.entgra.device.mgt.core.device.mgt.common.type.mgt.DeviceTypePlatformDetails; /** @@ -65,4 +66,6 @@ public interface DeviceManagementService { DeviceEnrollmentInvitationDetails getDeviceEnrollmentInvitationDetails(); License getLicenseConfig(); + + DeviceTypeMetaDefinition getDeviceTypeMetaDefinition(); } diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.common/src/main/java/io/entgra/device/mgt/core/device/mgt/common/type/mgt/DeviceTypeMetaDefinition.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.common/src/main/java/io/entgra/device/mgt/core/device/mgt/common/type/mgt/DeviceTypeMetaDefinition.java index 7f14f5241b..2a24f97e42 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.common/src/main/java/io/entgra/device/mgt/core/device/mgt/common/type/mgt/DeviceTypeMetaDefinition.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.common/src/main/java/io/entgra/device/mgt/core/device/mgt/common/type/mgt/DeviceTypeMetaDefinition.java @@ -41,6 +41,8 @@ public class DeviceTypeMetaDefinition { private boolean longLivedToken = false; + private boolean storeVisibilityEnabled = true; + public String getDescription() { return description; } @@ -121,4 +123,12 @@ public class DeviceTypeMetaDefinition { public void setLongLivedToken(boolean longLivedToken) { this.longLivedToken = longLivedToken; } + + public boolean isStoreVisibilityEnabled() { + return storeVisibilityEnabled; + } + + public void setStoreVisibilityEnabled(boolean storeVisibilityEnabled) { + this.storeVisibilityEnabled = storeVisibilityEnabled; + } } diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.common/src/main/java/io/entgra/device/mgt/core/device/mgt/common/type/mgt/DeviceTypeMetaDetails.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.common/src/main/java/io/entgra/device/mgt/core/device/mgt/common/type/mgt/DeviceTypeMetaDetails.java new file mode 100644 index 0000000000..4084b93245 --- /dev/null +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.common/src/main/java/io/entgra/device/mgt/core/device/mgt/common/type/mgt/DeviceTypeMetaDetails.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2018 - 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package io.entgra.device.mgt.core.device.mgt.common.type.mgt; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DeviceTypeMetaDetails", propOrder = { + "storeVisibilityEnabled" +}) +public class DeviceTypeMetaDetails { + + @XmlElement(name = "storeVisibilityEnabled") + private boolean storeVisibilityEnabled; + + public boolean isStoreVisibilityEnabled() { + return storeVisibilityEnabled; + } + + public void setStoreVisibilityEnabled(boolean storeVisibilityEnabled) { + this.storeVisibilityEnabled = storeVisibilityEnabled; + } +} + + diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.config.api/pom.xml b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.config.api/pom.xml index 9f2d5aa52b..c4ad6ed771 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.config.api/pom.xml +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.config.api/pom.xml @@ -22,7 +22,7 @@ device-mgt io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/pom.xml b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/pom.xml index f8d7331ef1..4739b10c05 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/pom.xml +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core device-mgt - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/DeviceManagementPluginRepository.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/DeviceManagementPluginRepository.java index f2bccac8e7..9f58717c7d 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/DeviceManagementPluginRepository.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/DeviceManagementPluginRepository.java @@ -85,7 +85,7 @@ public class DeviceManagementPluginRepository implements DeviceManagerStartupLis if (isInitiated) { /* Initializing Device Management Service Provider */ provider.init(); - DeviceTypeMetaDefinition deviceTypeDefinition = null; + DeviceTypeMetaDefinition deviceTypeDefinition; if (provider instanceof DeviceTypeDefinitionProvider) { DeviceTypeServiceIdentifier deviceTypeIdentifier = new DeviceTypeServiceIdentifier( provider.getType()); @@ -102,6 +102,8 @@ public class DeviceManagementPluginRepository implements DeviceManagerStartupLis if (existingProvider != null) { removeDeviceManagementProvider(provider); } + } else { + deviceTypeDefinition = provider.getDeviceTypeMetaDefinition(); } DeviceManagerUtil.registerDeviceType(deviceType, tenantId, isSharedWithAllTenants, deviceTypeDefinition); diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/AbstractGeofenceDAOImpl.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/AbstractGeofenceDAOImpl.java index ca73829320..1b4f09b7e5 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/AbstractGeofenceDAOImpl.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/AbstractGeofenceDAOImpl.java @@ -142,7 +142,7 @@ public abstract class AbstractGeofenceDAOImpl implements GeofenceDAO { try (PreparedStatement stmt = conn.prepareStatement(sql)) { stmt.setInt(index++, tenantId); if (isNameProvided) { - stmt.setString(index++, request.getProperty(DeviceManagementConstants.GeoServices.FENCE_NAME).toString() + "%"); + stmt.setString(index++, "%" + request.getProperty(DeviceManagementConstants.GeoServices.FENCE_NAME).toString() + "%"); } stmt.setInt(index++, request.getRowCount()); stmt.setInt(index, request.getStartIndex()); @@ -179,7 +179,7 @@ public abstract class AbstractGeofenceDAOImpl implements GeofenceDAO { "WHERE FENCE_NAME LIKE ?" + "AND TENANT_ID = ? "; try (PreparedStatement stmt = conn.prepareStatement(sql)) { - stmt.setString(1, fenceName + "%"); + stmt.setString(1, "%" + fenceName + "%"); stmt.setInt(2, tenantId); try (ResultSet rst = stmt.executeQuery()) { geofenceData = extractGeofenceData(rst); diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/device/SQLServerDeviceDAOImpl.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/device/SQLServerDeviceDAOImpl.java index a09f74a354..40a785a639 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/device/SQLServerDeviceDAOImpl.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/device/SQLServerDeviceDAOImpl.java @@ -20,6 +20,7 @@ package io.entgra.device.mgt.core.device.mgt.core.dao.impl.device; import io.entgra.device.mgt.core.device.mgt.common.Count; import io.entgra.device.mgt.core.device.mgt.common.Device; +import io.entgra.device.mgt.core.device.mgt.common.EnrolmentInfo; import io.entgra.device.mgt.core.device.mgt.common.PaginationRequest; import io.entgra.device.mgt.core.device.mgt.common.device.details.DeviceInfo; import io.entgra.device.mgt.core.device.mgt.core.dao.DeviceManagementDAOException; @@ -31,7 +32,11 @@ import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import java.sql.*; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Timestamp; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -1467,4 +1472,35 @@ public class SQLServerDeviceDAOImpl extends AbstractDeviceDAOImpl { return geoClusters; } */ + + @Override + public void refactorDeviceStatus(Connection conn, List validDevices) throws DeviceManagementDAOException { + String updateQuery = "UPDATE DM_DEVICE_STATUS SET STATUS = ? WHERE ID = ?"; + String selectLastMatchingRecordQuery = "SELECT TOP 1 ID FROM DM_DEVICE_STATUS WHERE ENROLMENT_ID = ? AND DEVICE_ID = ? ORDER BY ID DESC"; + + try (PreparedStatement selectStatement = conn.prepareStatement(selectLastMatchingRecordQuery); + PreparedStatement updateStatement = conn.prepareStatement(updateQuery)) { + + for (Device device : validDevices) { + + selectStatement.setInt(1, device.getEnrolmentInfo().getId()); + selectStatement.setInt(2, device.getId()); + + ResultSet resultSet = selectStatement.executeQuery(); + int lastRecordId = 0; + if (resultSet.next()) { + lastRecordId = resultSet.getInt("ID"); + } + + updateStatement.setString(1, String.valueOf(EnrolmentInfo.Status.DELETED)); + updateStatement.setInt(2, lastRecordId); + updateStatement.execute(); + } + + } catch (SQLException e) { + String msg = "SQL error occurred while updating device status properties."; + log.error(msg, e); + throw new DeviceManagementDAOException(msg, e); + } + } } diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/geofence/GenericGeofenceDAOImpl.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/geofence/GenericGeofenceDAOImpl.java index 404129598a..d0e955dec5 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/geofence/GenericGeofenceDAOImpl.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/geofence/GenericGeofenceDAOImpl.java @@ -142,7 +142,7 @@ public class GenericGeofenceDAOImpl extends AbstractGeofenceDAOImpl { try (PreparedStatement stmt = conn.prepareStatement(sql)) { stmt.setInt(index++, tenantId); if (isNameProvided) { - stmt.setString(index++, request.getProperty(DeviceManagementConstants.GeoServices.FENCE_NAME).toString() + "%"); + stmt.setString(index++, request.getProperty("%" + DeviceManagementConstants.GeoServices.FENCE_NAME).toString() + "%"); } stmt.setInt(index++, request.getRowCount()); stmt.setInt(index, request.getStartIndex()); @@ -179,7 +179,7 @@ public class GenericGeofenceDAOImpl extends AbstractGeofenceDAOImpl { "WHERE FENCE_NAME LIKE ?" + "AND TENANT_ID = ? "; try (PreparedStatement stmt = conn.prepareStatement(sql)) { - stmt.setString(1, fenceName + "%"); + stmt.setString(1,"%" + fenceName + "%"); stmt.setInt(2, tenantId); try (ResultSet rst = stmt.executeQuery()) { geofenceData = extractGeofenceData(rst); diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/geofence/SQLServerGeofenceDAOImpl.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/geofence/SQLServerGeofenceDAOImpl.java index fa04264286..c1a719f446 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/geofence/SQLServerGeofenceDAOImpl.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/geofence/SQLServerGeofenceDAOImpl.java @@ -71,7 +71,7 @@ public class SQLServerGeofenceDAOImpl extends AbstractGeofenceDAOImpl { try (PreparedStatement stmt = conn.prepareStatement(sql)) { stmt.setInt(index++, tenantId); if (isNameProvided) { - stmt.setString(index++, request.getProperty(DeviceManagementConstants.GeoServices.FENCE_NAME).toString() + "%"); + stmt.setString(index++, "%" + request.getProperty(DeviceManagementConstants.GeoServices.FENCE_NAME).toString() + "%"); } stmt.setInt(index++, request.getStartIndex()); stmt.setInt(index, request.getRowCount()); @@ -166,4 +166,48 @@ public class SQLServerGeofenceDAOImpl extends AbstractGeofenceDAOImpl { throw new DeviceManagementDAOException(msg, e); } } + + @Override + public List getGeoFences(int groupId, int tenantId) throws DeviceManagementDAOException { + try { + Connection conn = this.getConnection(); + String sql = "SELECT " + + "G.ID AS FENCE_ID, " + + "FENCE_NAME, " + + "DESCRIPTION, " + + "LATITUDE, " + + "LONGITUDE, " + + "RADIUS, " + + "GEO_JSON, " + + "FENCE_SHAPE " + + "FROM DM_GEOFENCE G " + + "JOIN DM_GEOFENCE_GROUP_MAPPING M ON G.ID = M.FENCE_ID " + + "WHERE M.GROUP_ID = ? AND TENANT_ID = ?"; + + try (PreparedStatement stmt = conn.prepareStatement(sql)) { + stmt.setInt(1, groupId); + stmt.setInt(2, tenantId); + ResultSet rst = stmt.executeQuery(); + List geofenceDataList = new ArrayList<>(); + while (rst.next()) { + GeofenceData geofenceData = new GeofenceData(); + geofenceData.setId(rst.getInt("FENCE_ID")); + geofenceData.setFenceName(rst.getString("FENCE_NAME")); + geofenceData.setDescription(rst.getString("DESCRIPTION")); + geofenceData.setLatitude(rst.getDouble("LATITUDE")); + geofenceData.setLongitude(rst.getDouble("LONGITUDE")); + geofenceData.setRadius(rst.getFloat("RADIUS")); + geofenceData.setGeoJson(rst.getString("GEO_JSON")); + geofenceData.setFenceShape(rst.getString("FENCE_SHAPE")); + geofenceDataList.add(geofenceData); + } + return geofenceDataList; + } + } catch (SQLException e) { + String msg = "Error occurred while retrieving Geo fences of group " + groupId + + " and tenant " + tenantId; + log.error(msg, e); + throw new DeviceManagementDAOException(msg, e); + } + } } diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/operation/mgt/dao/impl/ConfigOperationMSSQLDAOImpl.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/operation/mgt/dao/impl/ConfigOperationMSSQLDAOImpl.java index 2f690b8869..a1abfa987e 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/operation/mgt/dao/impl/ConfigOperationMSSQLDAOImpl.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/operation/mgt/dao/impl/ConfigOperationMSSQLDAOImpl.java @@ -24,11 +24,21 @@ import io.entgra.device.mgt.core.device.mgt.core.dto.operation.mgt.ConfigOperati import io.entgra.device.mgt.core.device.mgt.core.dto.operation.mgt.Operation; import io.entgra.device.mgt.core.device.mgt.core.operation.mgt.dao.OperationManagementDAOException; import io.entgra.device.mgt.core.device.mgt.core.operation.mgt.dao.OperationManagementDAOFactory; +import org.wso2.carbon.context.PrivilegedCarbonContext; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import java.io.*; -import java.sql.*; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Timestamp; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -43,7 +53,7 @@ public class ConfigOperationMSSQLDAOImpl extends GenericOperationDAOImpl { operation.setCreatedTimeStamp(new Timestamp(new Date().getTime()).toString()); Connection connection = OperationManagementDAOFactory.getConnection(); String sql = "INSERT INTO DM_OPERATION(TYPE, CREATED_TIMESTAMP, RECEIVED_TIMESTAMP, OPERATION_CODE, " + - "INITIATED_BY, OPERATION_DETAILS) VALUES (?, ?, ?, ?, ?, ?)"; + "INITIATED_BY, OPERATION_DETAILS, TENANT_ID) VALUES (?, ?, ?, ?, ?, ?, ?)"; try (PreparedStatement stmt = connection.prepareStatement(sql, new String[]{"id"})) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); @@ -55,6 +65,7 @@ public class ConfigOperationMSSQLDAOImpl extends GenericOperationDAOImpl { stmt.setString(4, operation.getCode()); stmt.setString(5, operation.getInitiatedBy()); stmt.setBytes(6, operationBytes); + stmt.setInt(7, PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId()); stmt.executeUpdate(); try (ResultSet rs = stmt.getGeneratedKeys()) { int id = -1; diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/test/java/io/entgra/device/mgt/core/device/mgt/core/TestDeviceManagementService.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/test/java/io/entgra/device/mgt/core/device/mgt/core/TestDeviceManagementService.java index 516159d597..0df3bdad7e 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/test/java/io/entgra/device/mgt/core/device/mgt/core/TestDeviceManagementService.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/test/java/io/entgra/device/mgt/core/device/mgt/core/TestDeviceManagementService.java @@ -27,6 +27,7 @@ import io.entgra.device.mgt.core.device.mgt.common.policy.mgt.PolicyMonitoringMa import io.entgra.device.mgt.core.device.mgt.common.pull.notification.PullNotificationSubscriber; import io.entgra.device.mgt.core.device.mgt.common.push.notification.PushNotificationConfig; import io.entgra.device.mgt.core.device.mgt.common.spi.DeviceManagementService; +import io.entgra.device.mgt.core.device.mgt.common.type.mgt.DeviceTypeMetaDefinition; import io.entgra.device.mgt.core.device.mgt.common.type.mgt.DeviceTypePlatformDetails; import java.util.ArrayList; @@ -135,4 +136,9 @@ public class TestDeviceManagementService implements DeviceManagementService { } @Override public License getLicenseConfig() { return null; } + + @Override + public DeviceTypeMetaDefinition getDeviceTypeMetaDefinition() { + return null; + } } diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/pom.xml b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/pom.xml index 093a8444d6..f5065bbeb4 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/pom.xml +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/pom.xml @@ -22,7 +22,7 @@ device-mgt io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/device/type/template/DeviceTypeManagerService.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/device/type/template/DeviceTypeManagerService.java index 0eeab6f0f9..eb03f93334 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/device/type/template/DeviceTypeManagerService.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/device/type/template/DeviceTypeManagerService.java @@ -17,13 +17,18 @@ */ package io.entgra.device.mgt.core.device.mgt.extensions.device.type.template; +import io.entgra.device.mgt.core.device.mgt.common.DeviceManager; +import io.entgra.device.mgt.core.device.mgt.common.DeviceStatusTaskPluginConfig; import io.entgra.device.mgt.core.device.mgt.common.InitialOperationConfig; +import io.entgra.device.mgt.core.device.mgt.common.MonitoringOperation; +import io.entgra.device.mgt.core.device.mgt.common.OperationMonitoringTaskConfig; import io.entgra.device.mgt.core.device.mgt.common.ProvisioningConfig; -import io.entgra.device.mgt.core.device.mgt.common.*; +import io.entgra.device.mgt.core.device.mgt.common.StartupOperationConfig; +import io.entgra.device.mgt.core.device.mgt.common.type.mgt.DeviceTypeMetaDetails; +import io.entgra.device.mgt.core.device.mgt.common.exceptions.DeviceManagementException; import io.entgra.device.mgt.core.device.mgt.common.app.mgt.ApplicationManager; import io.entgra.device.mgt.core.device.mgt.common.configuration.mgt.ConfigurationEntry; import io.entgra.device.mgt.core.device.mgt.common.configuration.mgt.PlatformConfiguration; -import io.entgra.device.mgt.core.device.mgt.common.exceptions.DeviceManagementException; import io.entgra.device.mgt.core.device.mgt.common.general.GeneralConfig; import io.entgra.device.mgt.core.device.mgt.common.invitation.mgt.DeviceEnrollmentInvitationDetails; import io.entgra.device.mgt.core.device.mgt.common.license.mgt.License; @@ -31,6 +36,7 @@ import io.entgra.device.mgt.core.device.mgt.common.policy.mgt.PolicyMonitoringMa import io.entgra.device.mgt.core.device.mgt.common.pull.notification.PullNotificationSubscriber; import io.entgra.device.mgt.core.device.mgt.common.push.notification.PushNotificationConfig; import io.entgra.device.mgt.core.device.mgt.common.spi.DeviceManagementService; +import io.entgra.device.mgt.core.device.mgt.common.type.mgt.DeviceTypeMetaDefinition; import io.entgra.device.mgt.core.device.mgt.common.type.mgt.DeviceTypePlatformDetails; import io.entgra.device.mgt.core.device.mgt.extensions.device.type.template.config.Feature; import io.entgra.device.mgt.core.device.mgt.extensions.device.type.template.config.*; @@ -70,6 +76,7 @@ public class DeviceTypeManagerService implements DeviceManagementService { private DeviceTypePlatformDetails deviceTypePlatformDetails; private DeviceEnrollmentInvitationDetails deviceEnrollmentInvitationDetails; private GeneralConfig generalConfig; + private DeviceTypeMetaDefinition deviceTypeMetaDefinition; private boolean isRegistryBasedConfigs = false; private boolean isScheduled = false; private String notifierType; @@ -97,6 +104,8 @@ public class DeviceTypeManagerService implements DeviceManagementService { this.setDeviceEnrollmentInvitationDetails(deviceTypeConfiguration); this.licenseConfig = new License(); this.setLicenseConfig(deviceTypeConfiguration); + this.deviceTypeMetaDefinition = new DeviceTypeMetaDefinition(); + this.setDeviceTypeMetaDefinition(deviceTypeConfiguration); } @Override @@ -250,6 +259,11 @@ public class DeviceTypeManagerService implements DeviceManagementService { return licenseConfig; } + @Override + public DeviceTypeMetaDefinition getDeviceTypeMetaDefinition() { + return deviceTypeMetaDefinition; + } + private void setProvisioningConfig(String tenantDomain, DeviceTypeConfiguration deviceTypeConfiguration) { if (deviceTypeConfiguration.getProvisioningConfig() != null) { boolean sharedWithAllTenants = deviceTypeConfiguration.getProvisioningConfig().isSharedWithAllTenants(); @@ -377,4 +391,11 @@ public class DeviceTypeManagerService implements DeviceManagementService { licenseConfig.setText(license.getText()); } } + + public void setDeviceTypeMetaDefinition(DeviceTypeConfiguration deviceTypeConfiguration) { + DeviceTypeMetaDetails deviceTypeMetaDefinitions = deviceTypeConfiguration.getDeviceTypeMetaDetails(); + if (deviceTypeMetaDefinitions != null) { + deviceTypeMetaDefinition.setStoreVisibilityEnabled(deviceTypeMetaDefinitions.isStoreVisibilityEnabled()); + } + } } diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/device/type/template/config/DeviceTypeConfiguration.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/device/type/template/config/DeviceTypeConfiguration.java index 58e0cd6021..b15c2f3c88 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/device/type/template/config/DeviceTypeConfiguration.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/device/type/template/config/DeviceTypeConfiguration.java @@ -18,6 +18,7 @@ package io.entgra.device.mgt.core.device.mgt.extensions.device.type.template.config; import io.entgra.device.mgt.core.device.mgt.common.invitation.mgt.DeviceEnrollmentInvitationDetails; +import io.entgra.device.mgt.core.device.mgt.common.type.mgt.DeviceTypeMetaDetails; import io.entgra.device.mgt.core.device.mgt.common.type.mgt.DeviceTypePlatformDetails; import javax.xml.bind.annotation.*; @@ -88,6 +89,8 @@ public class DeviceTypeConfiguration { protected DeviceTypePlatformDetails deviceTypePlatformDetails; @XmlElement(name = "DeviceEnrollmentInvitationDetails", required = true) protected DeviceEnrollmentInvitationDetails deviceEnrollmentInvitationDetails; + @XmlElement(name = "DeviceTypeMetaDetails") + protected DeviceTypeMetaDetails deviceTypeMetaDetails; public DeviceTypePlatformDetails getDeviceTypePlatformDetails() { return deviceTypePlatformDetails; @@ -412,4 +415,12 @@ public class DeviceTypeConfiguration { DeviceEnrollmentInvitationDetails deviceEnrollmentInvitationDetails) { this.deviceEnrollmentInvitationDetails = deviceEnrollmentInvitationDetails; } + + public DeviceTypeMetaDetails getDeviceTypeMetaDetails() { + return deviceTypeMetaDetails; + } + + public void setDeviceTypeMetaDetails(DeviceTypeMetaDetails deviceTypeMetaDetails) { + this.deviceTypeMetaDetails = deviceTypeMetaDetails; + } } diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/src/test/java/io/entgra/device/mgt/core/device/mgt/extensions/mock/TypeXDeviceManagementService.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/src/test/java/io/entgra/device/mgt/core/device/mgt/extensions/mock/TypeXDeviceManagementService.java index 37ca202dfa..5a81a5be18 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/src/test/java/io/entgra/device/mgt/core/device/mgt/extensions/mock/TypeXDeviceManagementService.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions/src/test/java/io/entgra/device/mgt/core/device/mgt/extensions/mock/TypeXDeviceManagementService.java @@ -27,6 +27,7 @@ import io.entgra.device.mgt.core.device.mgt.common.policy.mgt.PolicyMonitoringMa import io.entgra.device.mgt.core.device.mgt.common.pull.notification.PullNotificationSubscriber; import io.entgra.device.mgt.core.device.mgt.common.push.notification.PushNotificationConfig; import io.entgra.device.mgt.core.device.mgt.common.spi.DeviceManagementService; +import io.entgra.device.mgt.core.device.mgt.common.type.mgt.DeviceTypeMetaDefinition; import io.entgra.device.mgt.core.device.mgt.common.type.mgt.DeviceTypePlatformDetails; import java.util.ArrayList; @@ -118,4 +119,9 @@ public class TypeXDeviceManagementService implements DeviceManagementService { @Override public License getLicenseConfig() { return null; } + + @Override + public DeviceTypeMetaDefinition getDeviceTypeMetaDefinition() { + return null; + } } diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.url.printer/pom.xml b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.url.printer/pom.xml index 6cb6789f7f..14eb72c1f4 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.url.printer/pom.xml +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.url.printer/pom.xml @@ -23,7 +23,7 @@ device-mgt io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/pom.xml b/components/device-mgt/pom.xml index d5d99ff127..b3b347666b 100644 --- a/components/device-mgt/pom.xml +++ b/components/device-mgt/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/components/heartbeat-management/io.entgra.device.mgt.core.server.bootup.heartbeat.beacon/pom.xml b/components/heartbeat-management/io.entgra.device.mgt.core.server.bootup.heartbeat.beacon/pom.xml index 7565c33587..61eb9b42fb 100644 --- a/components/heartbeat-management/io.entgra.device.mgt.core.server.bootup.heartbeat.beacon/pom.xml +++ b/components/heartbeat-management/io.entgra.device.mgt.core.server.bootup.heartbeat.beacon/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core heartbeat-management - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/heartbeat-management/pom.xml b/components/heartbeat-management/pom.xml index 5bf8605825..3cd9312200 100644 --- a/components/heartbeat-management/pom.xml +++ b/components/heartbeat-management/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/components/identity-extensions/io.entgra.device.mgt.core.device.mgt.oauth.extensions/pom.xml b/components/identity-extensions/io.entgra.device.mgt.core.device.mgt.oauth.extensions/pom.xml index 46a8b15955..2dbd213b28 100644 --- a/components/identity-extensions/io.entgra.device.mgt.core.device.mgt.oauth.extensions/pom.xml +++ b/components/identity-extensions/io.entgra.device.mgt.core.device.mgt.oauth.extensions/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core identity-extensions - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/identity-extensions/io.entgra.device.mgt.core.identity.jwt.client.extension/pom.xml b/components/identity-extensions/io.entgra.device.mgt.core.identity.jwt.client.extension/pom.xml index 0c872c556e..eaed87907f 100644 --- a/components/identity-extensions/io.entgra.device.mgt.core.identity.jwt.client.extension/pom.xml +++ b/components/identity-extensions/io.entgra.device.mgt.core.identity.jwt.client.extension/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core identity-extensions - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/identity-extensions/pom.xml b/components/identity-extensions/pom.xml index c46e433f55..01c4c03301 100644 --- a/components/identity-extensions/pom.xml +++ b/components/identity-extensions/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/components/logger/io.entgra.device.mgt.core.notification.logger/pom.xml b/components/logger/io.entgra.device.mgt.core.notification.logger/pom.xml index 7774776d42..4463270551 100644 --- a/components/logger/io.entgra.device.mgt.core.notification.logger/pom.xml +++ b/components/logger/io.entgra.device.mgt.core.notification.logger/pom.xml @@ -23,7 +23,7 @@ io.entgra.device.mgt.core logger - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT io.entgra.device.mgt.core.notification.logger diff --git a/components/logger/pom.xml b/components/logger/pom.xml index 61e4bb82c7..a145b0153b 100644 --- a/components/logger/pom.xml +++ b/components/logger/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core.parent io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/components/operation-template-mgt/io.entgra.device.mgt.core.operation.template/pom.xml b/components/operation-template-mgt/io.entgra.device.mgt.core.operation.template/pom.xml index 2f1e5ed25f..2577775167 100644 --- a/components/operation-template-mgt/io.entgra.device.mgt.core.operation.template/pom.xml +++ b/components/operation-template-mgt/io.entgra.device.mgt.core.operation.template/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core operation-template-mgt - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/operation-template-mgt/pom.xml b/components/operation-template-mgt/pom.xml index 16ed95de0b..0a6afc87a5 100644 --- a/components/operation-template-mgt/pom.xml +++ b/components/operation-template-mgt/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/components/policy-mgt/io.entgra.device.mgt.core.policy.decision.point/pom.xml b/components/policy-mgt/io.entgra.device.mgt.core.policy.decision.point/pom.xml index ed44f640a0..7712408444 100644 --- a/components/policy-mgt/io.entgra.device.mgt.core.policy.decision.point/pom.xml +++ b/components/policy-mgt/io.entgra.device.mgt.core.policy.decision.point/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core policy-mgt - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/policy-mgt/io.entgra.device.mgt.core.policy.information.point/pom.xml b/components/policy-mgt/io.entgra.device.mgt.core.policy.information.point/pom.xml index ce1c3fb600..a5c72ad841 100644 --- a/components/policy-mgt/io.entgra.device.mgt.core.policy.information.point/pom.xml +++ b/components/policy-mgt/io.entgra.device.mgt.core.policy.information.point/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core policy-mgt - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/policy-mgt/io.entgra.device.mgt.core.policy.mgt.common/pom.xml b/components/policy-mgt/io.entgra.device.mgt.core.policy.mgt.common/pom.xml index 81151e26cb..99ae59606e 100644 --- a/components/policy-mgt/io.entgra.device.mgt.core.policy.mgt.common/pom.xml +++ b/components/policy-mgt/io.entgra.device.mgt.core.policy.mgt.common/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core policy-mgt - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/policy-mgt/io.entgra.device.mgt.core.policy.mgt.core/pom.xml b/components/policy-mgt/io.entgra.device.mgt.core.policy.mgt.core/pom.xml index 4e4e734e66..ecd7836c77 100644 --- a/components/policy-mgt/io.entgra.device.mgt.core.policy.mgt.core/pom.xml +++ b/components/policy-mgt/io.entgra.device.mgt.core.policy.mgt.core/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core policy-mgt - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/policy-mgt/io.entgra.device.mgt.core.policy.mgt.core/src/test/java/io/entgra/device/mgt/core/policy/mgt/core/mock/TypeXDeviceManagementService.java b/components/policy-mgt/io.entgra.device.mgt.core.policy.mgt.core/src/test/java/io/entgra/device/mgt/core/policy/mgt/core/mock/TypeXDeviceManagementService.java index 6fad650b84..db4f5d7037 100644 --- a/components/policy-mgt/io.entgra.device.mgt.core.policy.mgt.core/src/test/java/io/entgra/device/mgt/core/policy/mgt/core/mock/TypeXDeviceManagementService.java +++ b/components/policy-mgt/io.entgra.device.mgt.core.policy.mgt.core/src/test/java/io/entgra/device/mgt/core/policy/mgt/core/mock/TypeXDeviceManagementService.java @@ -27,6 +27,7 @@ import io.entgra.device.mgt.core.device.mgt.common.policy.mgt.PolicyMonitoringMa import io.entgra.device.mgt.core.device.mgt.common.pull.notification.PullNotificationSubscriber; import io.entgra.device.mgt.core.device.mgt.common.push.notification.PushNotificationConfig; import io.entgra.device.mgt.core.device.mgt.common.spi.DeviceManagementService; +import io.entgra.device.mgt.core.device.mgt.common.type.mgt.DeviceTypeMetaDefinition; import io.entgra.device.mgt.core.device.mgt.common.type.mgt.DeviceTypePlatformDetails; import java.util.ArrayList; @@ -118,4 +119,9 @@ public class TypeXDeviceManagementService implements DeviceManagementService { @Override public License getLicenseConfig() { return null; } + + @Override + public DeviceTypeMetaDefinition getDeviceTypeMetaDefinition() { + return null; + } } diff --git a/components/policy-mgt/pom.xml b/components/policy-mgt/pom.xml index 83a54c18c3..a3f393c8a5 100644 --- a/components/policy-mgt/pom.xml +++ b/components/policy-mgt/pom.xml @@ -23,7 +23,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/components/subtype-mgt/io.entgra.device.mgt.core.subtype.mgt/pom.xml b/components/subtype-mgt/io.entgra.device.mgt.core.subtype.mgt/pom.xml index 4941cff12b..93c2025c81 100644 --- a/components/subtype-mgt/io.entgra.device.mgt.core.subtype.mgt/pom.xml +++ b/components/subtype-mgt/io.entgra.device.mgt.core.subtype.mgt/pom.xml @@ -20,7 +20,7 @@ io.entgra.device.mgt.core subtype-mgt - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/subtype-mgt/pom.xml b/components/subtype-mgt/pom.xml index 19bacdf54d..934ff1b4dd 100644 --- a/components/subtype-mgt/pom.xml +++ b/components/subtype-mgt/pom.xml @@ -20,7 +20,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/components/task-mgt/pom.xml b/components/task-mgt/pom.xml index 3fc9ee0375..4c97c8b86f 100755 --- a/components/task-mgt/pom.xml +++ b/components/task-mgt/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/components/task-mgt/task-manager/io.entgra.device.mgt.core.task.mgt.common/pom.xml b/components/task-mgt/task-manager/io.entgra.device.mgt.core.task.mgt.common/pom.xml index 2c01f24966..c5cdc94671 100755 --- a/components/task-mgt/task-manager/io.entgra.device.mgt.core.task.mgt.common/pom.xml +++ b/components/task-mgt/task-manager/io.entgra.device.mgt.core.task.mgt.common/pom.xml @@ -20,7 +20,7 @@ task-manager io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/task-mgt/task-manager/io.entgra.device.mgt.core.task.mgt.core/pom.xml b/components/task-mgt/task-manager/io.entgra.device.mgt.core.task.mgt.core/pom.xml index ee69355b97..7e93c636b8 100755 --- a/components/task-mgt/task-manager/io.entgra.device.mgt.core.task.mgt.core/pom.xml +++ b/components/task-mgt/task-manager/io.entgra.device.mgt.core.task.mgt.core/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core task-manager - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/task-mgt/task-manager/pom.xml b/components/task-mgt/task-manager/pom.xml index 83a3462056..c6345fccac 100755 --- a/components/task-mgt/task-manager/pom.xml +++ b/components/task-mgt/task-manager/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core task-mgt - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/task-mgt/task-watcher/io.entgra.device.mgt.core.task.mgt.watcher/pom.xml b/components/task-mgt/task-watcher/io.entgra.device.mgt.core.task.mgt.watcher/pom.xml index a2ce469206..7341ebfed0 100755 --- a/components/task-mgt/task-watcher/io.entgra.device.mgt.core.task.mgt.watcher/pom.xml +++ b/components/task-mgt/task-watcher/io.entgra.device.mgt.core.task.mgt.watcher/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core task-watcher - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/task-mgt/task-watcher/pom.xml b/components/task-mgt/task-watcher/pom.xml index ebc0ec502c..c00b33fd70 100755 --- a/components/task-mgt/task-watcher/pom.xml +++ b/components/task-mgt/task-watcher/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core task-mgt - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.common/pom.xml b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.common/pom.xml index caed6c8c97..94d038c021 100644 --- a/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.common/pom.xml +++ b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.common/pom.xml @@ -20,7 +20,7 @@ tenant-mgt io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/pom.xml b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/pom.xml index 7c78186739..46daa0f40c 100644 --- a/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/pom.xml +++ b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/pom.xml @@ -20,7 +20,7 @@ tenant-mgt io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/tenant-mgt/pom.xml b/components/tenant-mgt/pom.xml index 3b1cbd62c7..3913c59bbc 100644 --- a/components/tenant-mgt/pom.xml +++ b/components/tenant-mgt/pom.xml @@ -20,7 +20,7 @@ io.entgra.device.mgt.core.parent io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/components/transport-mgt/email-sender/io.entgra.device.mgt.core.transport.mgt.email.sender.core/pom.xml b/components/transport-mgt/email-sender/io.entgra.device.mgt.core.transport.mgt.email.sender.core/pom.xml index d852a1ef09..1618b2db29 100644 --- a/components/transport-mgt/email-sender/io.entgra.device.mgt.core.transport.mgt.email.sender.core/pom.xml +++ b/components/transport-mgt/email-sender/io.entgra.device.mgt.core.transport.mgt.email.sender.core/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core email-sender - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/transport-mgt/email-sender/pom.xml b/components/transport-mgt/email-sender/pom.xml index c57dd3e521..f85d185c75 100644 --- a/components/transport-mgt/email-sender/pom.xml +++ b/components/transport-mgt/email-sender/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core transport-mgt - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/transport-mgt/pom.xml b/components/transport-mgt/pom.xml index 00911ea4e6..ef9b6e2f71 100644 --- a/components/transport-mgt/pom.xml +++ b/components/transport-mgt/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core.parent io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/components/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.api/pom.xml b/components/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.api/pom.xml index 4e46b89434..a9080a2553 100644 --- a/components/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.api/pom.xml +++ b/components/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.api/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core sms-handler - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.common/pom.xml b/components/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.common/pom.xml index 465f64fe9e..2bf825f05c 100644 --- a/components/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.common/pom.xml +++ b/components/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.common/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core sms-handler - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.core/pom.xml b/components/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.core/pom.xml index 51e0500a75..1502bab618 100644 --- a/components/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.core/pom.xml +++ b/components/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.core/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core sms-handler - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/transport-mgt/sms-handler/pom.xml b/components/transport-mgt/sms-handler/pom.xml index abbf64776e..f106779a9b 100644 --- a/components/transport-mgt/sms-handler/pom.xml +++ b/components/transport-mgt/sms-handler/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core transport-mgt - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor/pom.xml b/components/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor/pom.xml index 01303725a4..747dd9b838 100644 --- a/components/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor/pom.xml +++ b/components/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor/pom.xml @@ -21,7 +21,7 @@ ui-request-interceptor io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT 4.0.0 diff --git a/components/ui-request-interceptor/pom.xml b/components/ui-request-interceptor/pom.xml index 5a5ef82b68..7436102e2b 100644 --- a/components/ui-request-interceptor/pom.xml +++ b/components/ui-request-interceptor/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core.parent io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/components/webapp-authenticator-framework/io.entgra.device.mgt.core.webapp.authenticator.framework/pom.xml b/components/webapp-authenticator-framework/io.entgra.device.mgt.core.webapp.authenticator.framework/pom.xml index e697ebe9b6..86da566d3c 100644 --- a/components/webapp-authenticator-framework/io.entgra.device.mgt.core.webapp.authenticator.framework/pom.xml +++ b/components/webapp-authenticator-framework/io.entgra.device.mgt.core.webapp.authenticator.framework/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core webapp-authenticator-framework - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/components/webapp-authenticator-framework/pom.xml b/components/webapp-authenticator-framework/pom.xml index 9e81164345..f51fa10990 100644 --- a/components/webapp-authenticator-framework/pom.xml +++ b/components/webapp-authenticator-framework/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/features/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.feature/pom.xml b/features/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.feature/pom.xml index d5856bf8a4..b755950ebb 100644 --- a/features/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.feature/pom.xml +++ b/features/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core grafana-mgt-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.server.feature/pom.xml b/features/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.server.feature/pom.xml index 434a554741..947821bf76 100644 --- a/features/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.server.feature/pom.xml +++ b/features/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.server.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core grafana-mgt-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/analytics-mgt/grafana-mgt/pom.xml b/features/analytics-mgt/grafana-mgt/pom.xml index 907c8e8c75..6bdd7d18d0 100644 --- a/features/analytics-mgt/grafana-mgt/pom.xml +++ b/features/analytics-mgt/grafana-mgt/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core analytics-mgt-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/analytics-mgt/pom.xml b/features/analytics-mgt/pom.xml index f7eaeaeef9..6707746cca 100644 --- a/features/analytics-mgt/pom.xml +++ b/features/analytics-mgt/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core.parent io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.analytics.extension.feature/pom.xml b/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.analytics.extension.feature/pom.xml index 14ba988b93..6f02c2f2aa 100644 --- a/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.analytics.extension.feature/pom.xml +++ b/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.analytics.extension.feature/pom.xml @@ -20,7 +20,7 @@ io.entgra.device.mgt.core apimgt-extensions-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.application.extension.feature/pom.xml b/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.application.extension.feature/pom.xml index 1b5def60d3..f076c81431 100644 --- a/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.application.extension.feature/pom.xml +++ b/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.application.extension.feature/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core apimgt-extensions-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.extension.rest.api.feature/pom.xml b/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.extension.rest.api.feature/pom.xml index 9ac48cd779..1bd33f2ec3 100644 --- a/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.extension.rest.api.feature/pom.xml +++ b/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.extension.rest.api.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core apimgt-extensions-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.keymgt.extension.feature/pom.xml b/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.keymgt.extension.feature/pom.xml index b64fc605b0..c549b3be86 100644 --- a/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.keymgt.extension.feature/pom.xml +++ b/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.keymgt.extension.feature/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core apimgt-extensions-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.webapp.publisher.feature/pom.xml b/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.webapp.publisher.feature/pom.xml index c324ec0f69..05283c03d9 100644 --- a/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.webapp.publisher.feature/pom.xml +++ b/features/apimgt-extensions/io.entgra.device.mgt.core.apimgt.webapp.publisher.feature/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core apimgt-extensions-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/apimgt-extensions/pom.xml b/features/apimgt-extensions/pom.xml index 6185c6e717..b4fb9e69d0 100644 --- a/features/apimgt-extensions/pom.xml +++ b/features/apimgt-extensions/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/features/application-mgt/io.entgra.device.mgt.core.application.mgt.server.feature/pom.xml b/features/application-mgt/io.entgra.device.mgt.core.application.mgt.server.feature/pom.xml index 2f97648a4f..0b364295f2 100644 --- a/features/application-mgt/io.entgra.device.mgt.core.application.mgt.server.feature/pom.xml +++ b/features/application-mgt/io.entgra.device.mgt.core.application.mgt.server.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core application-mgt-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/application-mgt/pom.xml b/features/application-mgt/pom.xml index b64abe8da0..e4f033f192 100644 --- a/features/application-mgt/pom.xml +++ b/features/application-mgt/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/features/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.api.feature/pom.xml b/features/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.api.feature/pom.xml index 8a657b1c99..db732a6d2b 100644 --- a/features/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.api.feature/pom.xml +++ b/features/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.api.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core certificate-mgt-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.cert.admin.api.feature/pom.xml b/features/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.cert.admin.api.feature/pom.xml index 62f45f14ec..82d37fe887 100644 --- a/features/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.cert.admin.api.feature/pom.xml +++ b/features/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.cert.admin.api.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core certificate-mgt-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.server.feature/pom.xml b/features/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.server.feature/pom.xml index 3b0db3bc67..8863c75961 100644 --- a/features/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.server.feature/pom.xml +++ b/features/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.server.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core certificate-mgt-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/certificate-mgt/pom.xml b/features/certificate-mgt/pom.xml index 2569c1e359..4618914050 100644 --- a/features/certificate-mgt/pom.xml +++ b/features/certificate-mgt/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.defaultrole.manager.feature/pom.xml b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.defaultrole.manager.feature/pom.xml index ddaee9f6de..7b77bd8ace 100644 --- a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.defaultrole.manager.feature/pom.xml +++ b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.defaultrole.manager.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core device-mgt-extensions-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.type.deployer.feature/pom.xml b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.type.deployer.feature/pom.xml index e357207773..b05a3d31ab 100644 --- a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.type.deployer.feature/pom.xml +++ b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.type.deployer.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core device-mgt-extensions-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.logger.feature/pom.xml b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.logger.feature/pom.xml index 217ec3584d..18df1b5358 100644 --- a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.logger.feature/pom.xml +++ b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.logger.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core device-mgt-extensions-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml index edbc130ef2..6e829765e6 100644 --- a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml +++ b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core device-mgt-extensions-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.http.feature/pom.xml b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.http.feature/pom.xml index f0ccefe68d..7ff642d57c 100644 --- a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.http.feature/pom.xml +++ b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.http.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core device-mgt-extensions-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml index e629f48373..14b83bc04b 100644 --- a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml +++ b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core device-mgt-extensions-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml index 81199586f5..e49f55820a 100644 --- a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml +++ b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core device-mgt-extensions-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.stateengine.feature/pom.xml b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.stateengine.feature/pom.xml index 94a86548d7..032cbbaa4c 100644 --- a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.stateengine.feature/pom.xml +++ b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.stateengine.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core device-mgt-extensions-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/pom.xml b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/pom.xml new file mode 100644 index 0000000000..4d0b62fb18 --- /dev/null +++ b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/pom.xml @@ -0,0 +1,105 @@ + + + + + + + io.entgra.device.mgt.core + device-mgt-extensions-feature + 5.0.33-SNAPSHOT + ../pom.xml + + + 4.0.0 + io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper.feature + pom + Entgra IoT - User store role mapper feature + http://entgra.io + + This feature contains the core bundles required for user store role mapping functionality + + + + + io.entgra.device.mgt.core + io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper + + + + + + + maven-resources-plugin + 2.6 + + + copy-resources + generate-resources + + copy-resources + + + src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + p2-feature-generation + package + + p2-feature-gen + + + io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper + ../../etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + + org.eclipse.equinox.p2.type.group:true + + + + + + io.entgra.device.mgt.core:io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper:${io.entgra.device.mgt.core.version} + + + + + + + + + diff --git a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/resources/build.properties b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/resources/build.properties new file mode 100644 index 0000000000..89aee3ff76 --- /dev/null +++ b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/resources/build.properties @@ -0,0 +1,19 @@ +# +# Copyright (c) 2018 - 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. +# +# Entgra (Pvt) Ltd. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +custom = true diff --git a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/resources/conf/user-store-role-mapping-config.xml b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/resources/conf/user-store-role-mapping-config.xml new file mode 100644 index 0000000000..16316f47ad --- /dev/null +++ b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/resources/conf/user-store-role-mapping-config.xml @@ -0,0 +1,35 @@ + + + + false + 30 + 3600 + + + + Internal/branch_css + + + + + Internal/branch_css + + + + \ No newline at end of file diff --git a/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/resources/p2.inf b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/resources/p2.inf new file mode 100644 index 0000000000..31d07a5e20 --- /dev/null +++ b/features/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/src/main/resources/p2.inf @@ -0,0 +1,2 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper_${feature.version}/conf/user-store-role-mapping-config.xml,target:${installFolder}/../../../repository/conf/user-store-role-mapping-config.xml,overwrite:true);\ diff --git a/features/device-mgt-extensions/pom.xml b/features/device-mgt-extensions/pom.xml index 5b1f2d321a..47a06ac33a 100644 --- a/features/device-mgt-extensions/pom.xml +++ b/features/device-mgt-extensions/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml @@ -41,6 +41,7 @@ io.entgra.device.mgt.core.device.mgt.extensions.defaultrole.manager.feature io.entgra.device.mgt.core.device.mgt.extensions.logger.feature io.entgra.device.mgt.core.device.mgt.extensions.stateengine.feature + io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper diff --git a/features/device-mgt/io.entgra.device.mgt.core.device.mgt.api.feature/pom.xml b/features/device-mgt/io.entgra.device.mgt.core.device.mgt.api.feature/pom.xml index fe04b7692c..198adbfddc 100644 --- a/features/device-mgt/io.entgra.device.mgt.core.device.mgt.api.feature/pom.xml +++ b/features/device-mgt/io.entgra.device.mgt.core.device.mgt.api.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core device-mgt-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/io.entgra.device.mgt.core.device.mgt.basics.feature/pom.xml b/features/device-mgt/io.entgra.device.mgt.core.device.mgt.basics.feature/pom.xml index 74e160d442..e249015039 100644 --- a/features/device-mgt/io.entgra.device.mgt.core.device.mgt.basics.feature/pom.xml +++ b/features/device-mgt/io.entgra.device.mgt.core.device.mgt.basics.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core device-mgt-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/io.entgra.device.mgt.core.device.mgt.basics.feature/src/main/resources/conf/mdm-ui-config.xml b/features/device-mgt/io.entgra.device.mgt.core.device.mgt.basics.feature/src/main/resources/conf/mdm-ui-config.xml index 28114158a9..416c0711f3 100644 --- a/features/device-mgt/io.entgra.device.mgt.core.device.mgt.basics.feature/src/main/resources/conf/mdm-ui-config.xml +++ b/features/device-mgt/io.entgra.device.mgt.core.device.mgt.basics.feature/src/main/resources/conf/mdm-ui-config.xml @@ -197,6 +197,7 @@ and:enterprise:view dm:sign-csr dm:admin:devices:view + dm:devices:status:change rm:roles:add rm:users:add rm:roles:update diff --git a/features/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions.feature/pom.xml b/features/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions.feature/pom.xml index 6380d8e790..8adf83d43e 100644 --- a/features/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions.feature/pom.xml +++ b/features/device-mgt/io.entgra.device.mgt.core.device.mgt.extensions.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core device-mgt-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/io.entgra.device.mgt.core.device.mgt.feature/pom.xml b/features/device-mgt/io.entgra.device.mgt.core.device.mgt.feature/pom.xml index 2e6fce0d35..0ed24bb713 100644 --- a/features/device-mgt/io.entgra.device.mgt.core.device.mgt.feature/pom.xml +++ b/features/device-mgt/io.entgra.device.mgt.core.device.mgt.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core device-mgt-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/io.entgra.device.mgt.core.device.mgt.server.feature/pom.xml b/features/device-mgt/io.entgra.device.mgt.core.device.mgt.server.feature/pom.xml index a72a21fbbe..1383db9420 100644 --- a/features/device-mgt/io.entgra.device.mgt.core.device.mgt.server.feature/pom.xml +++ b/features/device-mgt/io.entgra.device.mgt.core.device.mgt.server.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core device-mgt-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/pom.xml b/features/device-mgt/pom.xml index 040af5111a..78cf21afa0 100644 --- a/features/device-mgt/pom.xml +++ b/features/device-mgt/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/features/heartbeat-management/io.entgra.device.mgt.core.server.heart.beat.feature/pom.xml b/features/heartbeat-management/io.entgra.device.mgt.core.server.heart.beat.feature/pom.xml index 10d1a4e1ff..0ab11a9b1d 100644 --- a/features/heartbeat-management/io.entgra.device.mgt.core.server.heart.beat.feature/pom.xml +++ b/features/heartbeat-management/io.entgra.device.mgt.core.server.heart.beat.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core heart-beat-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/heartbeat-management/pom.xml b/features/heartbeat-management/pom.xml index 4d2ab7d267..46e9e1f913 100644 --- a/features/heartbeat-management/pom.xml +++ b/features/heartbeat-management/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/features/jwt-client/io.entgra.device.mgt.core.identity.jwt.client.extension.feature/pom.xml b/features/jwt-client/io.entgra.device.mgt.core.identity.jwt.client.extension.feature/pom.xml index a99f12315b..f8fcfa3f88 100644 --- a/features/jwt-client/io.entgra.device.mgt.core.identity.jwt.client.extension.feature/pom.xml +++ b/features/jwt-client/io.entgra.device.mgt.core.identity.jwt.client.extension.feature/pom.xml @@ -23,7 +23,7 @@ io.entgra.device.mgt.core jwt-client-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/jwt-client/pom.xml b/features/jwt-client/pom.xml index f4a32ee6af..68ad0eae27 100644 --- a/features/jwt-client/pom.xml +++ b/features/jwt-client/pom.xml @@ -23,7 +23,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/features/logger/io.entgra.device.mgt.core.notification.logger.feature/pom.xml b/features/logger/io.entgra.device.mgt.core.notification.logger.feature/pom.xml index bd5400e510..0b346e2432 100644 --- a/features/logger/io.entgra.device.mgt.core.notification.logger.feature/pom.xml +++ b/features/logger/io.entgra.device.mgt.core.notification.logger.feature/pom.xml @@ -23,7 +23,7 @@ io.entgra.device.mgt.core logger-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/logger/pom.xml b/features/logger/pom.xml index bedf8aac4b..f75cc1a71c 100644 --- a/features/logger/pom.xml +++ b/features/logger/pom.xml @@ -23,7 +23,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/features/operation-template-mgt-plugin-feature/io.entgra.device.mgt.core.operation.template.feature/pom.xml b/features/operation-template-mgt-plugin-feature/io.entgra.device.mgt.core.operation.template.feature/pom.xml index 851a7d5509..abf9a9f9df 100644 --- a/features/operation-template-mgt-plugin-feature/io.entgra.device.mgt.core.operation.template.feature/pom.xml +++ b/features/operation-template-mgt-plugin-feature/io.entgra.device.mgt.core.operation.template.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core operation-template-mgt-plugin-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/operation-template-mgt-plugin-feature/pom.xml b/features/operation-template-mgt-plugin-feature/pom.xml index a3791b2afd..f407363faa 100644 --- a/features/operation-template-mgt-plugin-feature/pom.xml +++ b/features/operation-template-mgt-plugin-feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core.parent io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/features/policy-mgt/io.entgra.device.mgt.core.policy.mgt.server.feature/pom.xml b/features/policy-mgt/io.entgra.device.mgt.core.policy.mgt.server.feature/pom.xml index 108ee60d0d..4fd15f93db 100644 --- a/features/policy-mgt/io.entgra.device.mgt.core.policy.mgt.server.feature/pom.xml +++ b/features/policy-mgt/io.entgra.device.mgt.core.policy.mgt.server.feature/pom.xml @@ -23,7 +23,7 @@ io.entgra.device.mgt.core policy-mgt-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/policy-mgt/pom.xml b/features/policy-mgt/pom.xml index c7762786d0..14db7b6de2 100644 --- a/features/policy-mgt/pom.xml +++ b/features/policy-mgt/pom.xml @@ -23,7 +23,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/features/subtype-mgt/io.entgra.device.mgt.core.subtype.mgt.feature/pom.xml b/features/subtype-mgt/io.entgra.device.mgt.core.subtype.mgt.feature/pom.xml index 2df461bcd7..5e98534247 100644 --- a/features/subtype-mgt/io.entgra.device.mgt.core.subtype.mgt.feature/pom.xml +++ b/features/subtype-mgt/io.entgra.device.mgt.core.subtype.mgt.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../../pom.xml diff --git a/features/subtype-mgt/pom.xml b/features/subtype-mgt/pom.xml index 3d388bd0b6..4779be9e5b 100644 --- a/features/subtype-mgt/pom.xml +++ b/features/subtype-mgt/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core.parent io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/features/task-mgt/io.entgra.device.mgt.core.task.mgt.feature/pom.xml b/features/task-mgt/io.entgra.device.mgt.core.task.mgt.feature/pom.xml index 60af9a0bb4..501ca7c31b 100755 --- a/features/task-mgt/io.entgra.device.mgt.core.task.mgt.feature/pom.xml +++ b/features/task-mgt/io.entgra.device.mgt.core.task.mgt.feature/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../../pom.xml diff --git a/features/task-mgt/pom.xml b/features/task-mgt/pom.xml index fca80b6ce9..cab67f5419 100755 --- a/features/task-mgt/pom.xml +++ b/features/task-mgt/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core.parent io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/features/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.server.feature/pom.xml b/features/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.server.feature/pom.xml index 9b90307dd6..13747f5783 100644 --- a/features/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.server.feature/pom.xml +++ b/features/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.server.feature/pom.xml @@ -20,7 +20,7 @@ tenant-mgt-feature io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/tenant-mgt/pom.xml b/features/tenant-mgt/pom.xml index 6007c3d4af..81fd1eca0b 100644 --- a/features/tenant-mgt/pom.xml +++ b/features/tenant-mgt/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core.parent io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/features/transport-mgt/email-sender/io.entgra.device.mgt.core.email.sender.feature/pom.xml b/features/transport-mgt/email-sender/io.entgra.device.mgt.core.email.sender.feature/pom.xml index ab4a1627a5..20d1da3250 100644 --- a/features/transport-mgt/email-sender/io.entgra.device.mgt.core.email.sender.feature/pom.xml +++ b/features/transport-mgt/email-sender/io.entgra.device.mgt.core.email.sender.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core email-sender-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/transport-mgt/email-sender/io.entgra.device.mgt.core.email.sender.feature/src/main/resources/email/templates/share-product-download-url.vm b/features/transport-mgt/email-sender/io.entgra.device.mgt.core.email.sender.feature/src/main/resources/email/templates/share-product-download-url.vm index befc2b3241..be994a117f 100644 --- a/features/transport-mgt/email-sender/io.entgra.device.mgt.core.email.sender.feature/src/main/resources/email/templates/share-product-download-url.vm +++ b/features/transport-mgt/email-sender/io.entgra.device.mgt.core.email.sender.feature/src/main/resources/email/templates/share-product-download-url.vm @@ -16,46 +16,1981 @@ under the License. *# - Experience Entgra IoT Server + Experience Entgra UEM Server - - Entgra IoT Server - - -
-
-
-
- entgra -
-
-
-

- Hi $first-name, -

-

- Thank you very much for your interest in the Entgra IoT server. Please click - here to download the latest release of the Entgra IoT server.

- -

- If you need assistance, please contact us through Entgra - contact us -

- -

- Regards, -

- -

- Entgra IoT Administrator -

-
-
-
- + + + + + + + + Entgra UEM Server + + + + + + + + + + + + + + +
+ +
+
+
+ + +
+
+ +
+ + + + + + + +
+ + + + +
+ +
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + +
+
+

Hi $first-name,

+

+

Welcome to your free Entgra UEM trial. Please download the product here.

+
+

To make the best use of your evaluation, here's a quick introduction to the key capabilities of our product.

+
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + +
+

Getting started

+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + + + + + + + + +
+
+

Self-guided enrollment

+
+
+ + + + + + +
+
+

Wizard-based, simple, and clear directions for the best mode of enrollment suited for your requirements.

+
+
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + +
+
+

Guided UI tour

+

+
+
+ + + + + + +
+
+

Guided walkthrough of Entgra UEM for quick navigation of available
features and functionalities.

+
+
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + +
+
+

Live chat

+

+
+
+ + + + + + +
+
+

Instant access to our support team to get answers to your questions.

+
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + +
+ + + + + + +
+ &#160; +
+
+ + + + + + +
+

Remote administration

+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + + + + + + + + +
+
+

Zero-touch enrollment

+
+
+ + + + + + +
+
+

Enroll, administer, and manage your entire device fleet remotely. Find out how to do so here.

+
+
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + +
+
+

Hierarchical grouping

+
+
+ + + + + + +
+
+

Create groups and subgroups in a hierarchical manner via our enhanced UI functionality.

+
+
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + +
+
+

Trigger operations simultaneously in a device group

+
+
+ + + + + + +
+
+

Enforce one or more operations on individual devices of an entire device group at once.

+
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + + + + + + + + +
+
+

Enforceable policies for device administration

+
+
+ + + + + + + + +
+ +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + +
+
+

Geofencing and alerts

+

+
+
+ + + + + + + + +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + +
+ + + + + + +
+ &#160; +
+
+ + + + + + +
+

UI, analytics, reporting, and real-time processing

+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + + + + + + + + +
+
+

Reporting UI capabilities +

+

real-time event processing

+
+
+ + + + + + +
+
+

Demonstrative reporting UI
with a set of pre-built reports useful for EMM administration. Enables real-time complex event processing and an

+

in-house solution for batch processing so that you can create customized reports.

+
+
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + +
+
+

Grafana-based dashboards

+

+
+
+ + + + + + +
+
+

Analytics capabilities and dashboards showing useful information on devices, users, applications, operations, and policies.

+
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + + + + + + + + +
+
+

Live feed

+
+
+ + + + + + +
+
+

Live feed is now available remotely for system administrators to access and track device data remotely, plus perform troubleshooting in real-time.

+
+
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + +
+
+

Per-tenant theming

+
+
+ + + + + + +
+
+

Customize your branding assets such as logos, favicons, app title/footer, etc. for a unified, personalized experience.

+
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + +
+ + + + + + +
+ &#160; +
+
+ + + + + + +
+

Security, privacy, and compliance

+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + + + + + + + + +
+
+

GDPR compliance

+
+
+ + + + + + +
+
+

Compliant with GDPR.

+
+
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + +
+
+

Consent management

+
+
+ + + + + + +
+
+

Requires the consent of authoritative parties when signing in to the platform and enrolling devices. Cookie and privacy policies in the device management console for consent.

+
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + + + + + + + + +
+
+

Device protection and security

+
+
+ + + + + + +
+
+

Fetch the device location and/or lock the device remotely. Configure devices in a manner that they become locked when passcode fail attempts exceed the limit. Offline unenrollment is possible via a special admin PIN code per device.

+
+
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + +
+
+

Additional data protection

+
+
+ + + + + + +
+
+

Use enterprise-wipe to delete the enterprise portion of a device in case of device loss or theft. Clear app data of corporate apps remotely. Lock-in
devices to a given WiFi network to ensure adherence to data protection compliance regulations.

+
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + +
+ + + + + + +
+ &#160; +
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + +
+

More resources

+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + + + + + + + + +
+ + +
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + +
+ +
+ + + Blog + + +
+
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + +
+ + +
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + +
+ + + + + + +
+ &#160; +
+
+ + + + + + +
+
+

That’s Entgra UEM in a nutshell. Reach out to us at evaluations@entgra.io if you have any questions.

+


Thanks for taking the time to explore Entgra UEM’s capabilities.

+


Entgra team

+
+
+ + + + + + +
+ + + + + + +
+ &#160; +
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + +
+ +
+ + + + + + +
+
+

Follow Entgra on social media

+
+
+ + + + + + +
+
+
+ + + + + + + + +
+ + Facebook + +
+ + + + + + + + +
+ + LinkedIn + +
+ + + + + + + + +
+ + X + +
+ + + + + + + + +
+ + YouTube + +
+ + +
+
+
+ +
+ +
+
+ + +
+
+
+ +
+ + + ]]> -
+ \ No newline at end of file diff --git a/features/transport-mgt/email-sender/io.entgra.device.mgt.core.email.sender.feature/src/main/resources/email/templates/user-verify.vm b/features/transport-mgt/email-sender/io.entgra.device.mgt.core.email.sender.feature/src/main/resources/email/templates/user-verify.vm index bccc1cc0e0..c053cd889b 100644 --- a/features/transport-mgt/email-sender/io.entgra.device.mgt.core.email.sender.feature/src/main/resources/email/templates/user-verify.vm +++ b/features/transport-mgt/email-sender/io.entgra.device.mgt.core.email.sender.feature/src/main/resources/email/templates/user-verify.vm @@ -16,47 +16,430 @@ under the License. *# - Verify email to register with Entgra IoTS + Verify Email to Register with Entgra UEM Server - - Entgra IoT Server - - -
-
-
-
- entgra -
-
-
-

- Hi $first-name, -

-

- Congratulations!!! Thank you for registering with Entgra. Please click on the - following link to complete your registration with us. Click here. -

- -

- If you need further assistance, please contact your administrator. -

- -

- Regards, -

- -

- Entgra IoT Administrator -

-
-
-
- + + + + + + + + Entgra UEM Server + + + + + + + + + + + + + + +
+ +
+
+
+ + +
+
+ +
+ + + + + + + +
+ + + + +
+ +
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + +
+
+

Hi $first-name,

+


Thanks for your interest in Entgra. Please click here to complete your registration.

+


Once you verify your email address, you can check out all the features of our product.

+


Do get in touch with your administrator for any assistance at evaluations@entgra.io

+


Best wishes,
Entgra team

+
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + +
+ + + + + + +
+ &#160; +
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + +
+ +
+ + + + + + +
+
+

Follow Entgra on social media

+
+
+ + + + + + +
+
+
+ + + + + + + + +
+ + Facebook + +
+ + + + + + + + +
+ + LinkedIn + +
+ + + + + + + + +
+ + X + +
+ + + + + + + + +
+ + YouTube + +
+ + +
+
+
+ +
+ +
+
+ + +
+
+
+ +
+ + + ]]> -
+ \ No newline at end of file diff --git a/features/transport-mgt/email-sender/io.entgra.device.mgt.core.email.sender.feature/src/main/resources/email/templates/user-welcome.vm b/features/transport-mgt/email-sender/io.entgra.device.mgt.core.email.sender.feature/src/main/resources/email/templates/user-welcome.vm index 7560594911..e8302f9ca9 100644 --- a/features/transport-mgt/email-sender/io.entgra.device.mgt.core.email.sender.feature/src/main/resources/email/templates/user-welcome.vm +++ b/features/transport-mgt/email-sender/io.entgra.device.mgt.core.email.sender.feature/src/main/resources/email/templates/user-welcome.vm @@ -19,80 +19,904 @@ Welcome to Entgra Evaluation Cloud - - Entgra IoT Server - - -
-
-
-
- entgra -
-
-
-

- Hi $first-name, -

-
-

- Welcome to Entgra Evaluation Cloud!! Entgra server support offers managing Android, iOS and Windows - devices along with a wide range of features that support cooperate (COPE) or personal device (BYOD) - enrollments. -

-
-
-

Access different portals

-

Your log-in credentials to any of our portals(endpoint-mgt, store, publisher) are,

-

Username: $portal-username

-

Password: password provided at registration for an evaluation account.

-

Endpoint management portal URL: $base-url-https/endpoint-mgt/

-

- This is the portal used to send operations and policies to devices and overall management of - the server. -

-

Application store portal URL: $base-url-https/store

-

- This is an in-house corporate app store where you can host all your corporate applications. - Users may browse apps and install them to their devices if the administrator has made the apps - publicly visible to users. Administrator can install, uninstall and update apps in the user - device or device groups. -

-

Application publishing portal URL: $base-url-https/publisher

-

- The portal for publishing new applications for internal use. This is the developer view of the - enterprise application store that comes with the product. -

-
-
-

Enroll a device

-

- Please find here a set of videos on how to enroll and onboard devices to our Cloud platform. - [Cloud Enrollment Guide] - When enrolling a device, Make sure to use the following log-in format: -

-

Organisation: $tenant-domain

-

Username: $agent-username

-

Password: password provided at registration.

-
-
-

- If you have any further questions, please reach out to us using your registered mail to - bizdev-group@entgra.io. Looking forward to working with you. -

-

- Best Regards, -

-

- Entgra Cloud Team -

-
-
+ + + + + + + + Entgra UEM Server + + + + + + + + + + + +
+ +
+
+
+ + +
+
+ +
+ + + + + + + +
+ + + + +
+ +
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + +
+
+

Hi $first-name,

+

+

Thanks for registering for a free 14-day Entgra Cloud trial.

+

Entgra enables you to manage Android, iOS, and Windows devices. Our product also has a wide range of capabilities for corporate-owned (COPE) and personal device (BYOD) enrollments.

+


Listed below are some instructions to guide you.

+
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + +
+

How to Access Our Portals

+
+ + + + + + +
+
+

Please use the following log-in credentials to access any of our portals.

+


Username: $portal-username
Password: Password provided at registration

+
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + +
+ + + + +
+ +
+
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + +
+
+

Endpoint Management Portal

+
+
+ + + + + + +
+
+

Send operations and apply policies to devices and overall management of the server.

+
+
+ + + + + + +
+ + +
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + +
+ + + + + + +
+ &#160; +
+
+ + + + + + +
+
+

Application Store Portal

+
+
+ + + + + + +
+
+

In-house corporate app store to host all your corporate applications. You can browse apps and install them on your devices if the apps are publicly visible to users. Administrators can install, uninstall, and update apps on devices or device groups.

+
+
+ + + + + + +
+ + +
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + +
+ + + + +
+ +
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + +
+ + + + +
+ +
+
+ +
+ +
+
+ + +
+
+ +
+ + + + + + + +
+ + + + + + +
+ &#160; +
+
+ + + + + + +
+
+

Application Publishing Portal

+
+
+ + + + + + +
+
+

Publish new applications for internal use. This portal gives you a developer's view of the enterprise application store that comes with the product.

+
+
+ + + + + + +
+ + +
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + +
+

How to Enroll a Device

+
+ + + + + + +
+
+

Here's the comprehensive guide to enrolling and onboarding devices.

+


View guide

+


For questions, contact us at evaluations@entgra.io from your Entgra registered email address.

+


We hope you found this guide helpful and look forward to learning more about your experiences with Entgra.

+

+


Best wishes,
Entgra team

+
+
+ + + + + + +
+ + + + + + +
+ &#160; +
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+ + + + + + + +
+ +
+ + + + + + +
+
+

Follow Entgra on social media

+
+
+ + + + + + +
+
+
+ + + + + + + + +
+ + Facebook + +
+ + + + + + + + +
+ + LinkedIn + +
+ + + + + + + + +
+ + X + +
+ + + + + + + + +
+ + YouTube + +
+ + +
+
+
+ +
+ +
+
+ + +
+
+
+ +
+ + + ]]> - + \ No newline at end of file diff --git a/features/transport-mgt/email-sender/pom.xml b/features/transport-mgt/email-sender/pom.xml index 7bea1a0af6..a738d2b98b 100644 --- a/features/transport-mgt/email-sender/pom.xml +++ b/features/transport-mgt/email-sender/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core transport-mgt-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/transport-mgt/pom.xml b/features/transport-mgt/pom.xml index 2403e63301..42b1152bdf 100644 --- a/features/transport-mgt/pom.xml +++ b/features/transport-mgt/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core.parent io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/features/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.api.feature/pom.xml b/features/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.api.feature/pom.xml index 6f8e76a66e..f9f5e75ce6 100644 --- a/features/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.api.feature/pom.xml +++ b/features/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.api.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core sms-handler-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.server.feature/pom.xml b/features/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.server.feature/pom.xml index 4b908eb03f..fa1bd1502c 100644 --- a/features/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.server.feature/pom.xml +++ b/features/transport-mgt/sms-handler/io.entgra.device.mgt.core.transport.mgt.sms.handler.server.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core sms-handler-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/transport-mgt/sms-handler/pom.xml b/features/transport-mgt/sms-handler/pom.xml index f5209b00b5..3e0056956b 100644 --- a/features/transport-mgt/sms-handler/pom.xml +++ b/features/transport-mgt/sms-handler/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core transport-mgt-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor.feature/pom.xml b/features/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor.feature/pom.xml index 014bf54fd9..629d760ec1 100644 --- a/features/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor.feature/pom.xml +++ b/features/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor.feature/pom.xml @@ -21,7 +21,7 @@ ui-request-interceptor-feature io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT 4.0.0 diff --git a/features/ui-request-interceptor/pom.xml b/features/ui-request-interceptor/pom.xml index 0c614753c6..676aa56e23 100644 --- a/features/ui-request-interceptor/pom.xml +++ b/features/ui-request-interceptor/pom.xml @@ -21,7 +21,7 @@ io.entgra.device.mgt.core.parent io.entgra.device.mgt.core - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/features/webapp-authenticator-framework/io.entgra.device.mgt.core.webapp.authenticator.framework.server.feature/pom.xml b/features/webapp-authenticator-framework/io.entgra.device.mgt.core.webapp.authenticator.framework.server.feature/pom.xml index ddac272f6f..2dd50a95e0 100644 --- a/features/webapp-authenticator-framework/io.entgra.device.mgt.core.webapp.authenticator.framework.server.feature/pom.xml +++ b/features/webapp-authenticator-framework/io.entgra.device.mgt.core.webapp.authenticator.framework.server.feature/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core webapp-authenticator-framework-feature - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../pom.xml diff --git a/features/webapp-authenticator-framework/pom.xml b/features/webapp-authenticator-framework/pom.xml index 1de6a5a14b..d0a7f1de5d 100644 --- a/features/webapp-authenticator-framework/pom.xml +++ b/features/webapp-authenticator-framework/pom.xml @@ -22,7 +22,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT ../../pom.xml diff --git a/pom.xml b/pom.xml index 721f4cff3f..9bd06cbf6d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.parent pom - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT WSO2 Carbon - Device Management - Parent https://entgra.io WSO2 Connected Device Manager Components @@ -1524,6 +1524,11 @@ io.entgra.device.mgt.core.device.mgt.extensions.defaultrole.manager ${io.entgra.device.mgt.core.version} + + io.entgra.device.mgt.core + io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper + ${io.entgra.device.mgt.core.version} + io.entgra.device.mgt.core io.entgra.device.mgt.core.device.mgt.extensions.logger @@ -1998,7 +2003,7 @@ 1.2.11-wso2v25 - 5.0.31-SNAPSHOT + 5.0.33-SNAPSHOT 4.9.2