Commit Graph

10194 Commits

Author SHA1 Message Date
ThilinaPremachandra
ae13169377 add rollback 2023-07-25 16:28:51 +05:30
ThilinaPremachandra
4a239887cb add try with resources 2023-07-25 16:28:49 +05:30
ThilinaPremachandra
7d05446a38 add error log 2023-07-25 16:20:25 +05:30
ThilinaPremachandra
cd9d127a5e remove unnecessary variable, change error msg 2023-07-25 16:20:25 +05:30
ThilinaPremachandra
13545f1c7c remove unnecessary code lines 2023-07-25 16:20:25 +05:30
ThilinaPremachandra
d842fc4085 remove unnecessary imports, fixes line issues 2023-07-25 16:20:21 +05:30
ThilinaPremachandra
32e5456f21 fixes line issues 2023-07-25 16:18:38 +05:30
ThilinaPremachandra
88356c57aa Add hierarchical grouping feature 2023-07-25 16:18:36 +05:30
ThilinaPremachandra
ce4276c93a pom.xml updated by pull 2023-07-25 15:59:47 +05:30
7ad3a0e21b Add custom loggers (#136)
* Fixes https://roadmap.entgra.net/issues/10117

* Added custom logs for below cases:
1. Device connectivity events
2. Policy payload change events
3. Device enrollment history events
4. App install events

**1. Device connectivity logs** - logs for newly added operations and calls for pending operations

Pattern :
{DateTime} {LogLevel} - {ActionTag} {OperationCode} {DeviceId} {DeviceType} {TenantDomain} {TenantId} {UserName} - log_message

```
[2023-06-15 00:12:09,093]  INFO - [ADD_OPERATION] [DEVICE_LOCATION] [97] [android] [carbon.super] [-1234] [admin]- Operation added
[2023-06-15 00:12:10,344]  INFO - [PENDING_OPERATION] [DEVICE_LOCATION] [675c60a9d31492d6] [android] [carbon.super] [-1234] [admin]- Device Connected
[2023-06-15 00:13:49,755]  INFO - [ADD_OPERATION] [DEVICE_LOCK] [97] [android] [carbon.super] [-1234] [admin]- Operation added
[2023-06-15 00:13:56,513]  INFO - [ADD_OPERATION] [DEVICE_MUTE] [97] [android] [carbon.super] [-1234] [admin]- Operation added
[2023-06-15 00:14:23,839]  INFO - [PENDING_OPERATION] [DEVICE_MUTE]
[2023-06-15 00:15:12,549]  INFO - [ADD_OPERATION] [INSTALL_APPLICATION] [97] [android] [carbon.super] [-1234] [admin]- Operation added
[2023-06-15 00:15:29,703]  INFO - [PENDING_OPERATION] [INSTALL_APPLICATION] [675c60a9d31492d6] [android] [carbon.super] [-1234] [admin]- Device Connected
```
**2. Policy payload change events** - logs for creating policy, updating policy, deleting policy, change policy priorities and apply changes to device logs

Pattern :
{DateTime} {LogLevel} - {ActionTag} {PolicyName} {TenantDomain} {TenantId} {Payload} {UserName} - log_message

```
[2023-06-15 00:15:53,264]  INFO - [UPDATE_POLICY] [passcodeios] [carbon.super] [-1234] [{"policyPayloadVersion":"2.0","id":33,"priorityId":1,"profile":{"profileId":33,"profileName":"passcodeios","tenantId":0,"deviceType":"ios","updatedDate":"Jun 15, 2023 12:15:53 AM","profileFeaturesList":[{"id":33,"featureCode":"PASSCODE_POLICY","profileId":0,"deviceType":"ios","content":"{\"forcePIN\":true,\"allowSimple\":true,\"requireAlphanumeric\":true,\"minLength\":7.0,\"minComplexChars\":4.0,\"pinHistory\":\"\"}","correctiveActions":[]}]},"policyName":"passcodeios","generic":false,"roles":["ANY"],"devices":[],"users":[],"active":false,"updated":false,"description":"test","compliance":"enforce","tenantId":-1234,"profileId":33,"policyType":"GENERAL"}] [admin] - Policy updated
[2023-06-15 00:34:38,980]  INFO - [ADD_POLICY] [application management policy] [carbon.super] [-1234] [{"policyPayloadVersion":"2.0","id":65,"priorityId":0,"profile":{"profileId":65,"profileName":"application management policy","tenantId":0,"deviceType":"windows","createdDate":"Jun 15, 2023 12:34:38 AM","updatedDate":"Jun 15, 2023 12:34:38 AM","profileFeaturesList":[{"id":65,"featureCode":"ALLOW_ALL_TRUSTED_APPS","profileId":0,"deviceType":"windows","content":"{\"enabled\":true}","correctiveActions":[]},{"id":73,"featureCode":"RESTRICT_APP_TO_SYSTEM_VOLUME","profileId":0,"deviceType":"windows","content":"{\"enabled\":false}","correctiveActions":[]}]},"policyName":"application management policy","generic":false,"roles":["ANY"],"devices":[],"users":[],"active":false,"updated":false,"description":"test","compliance":"enforce","tenantId":-1234,"profileId":0,"policyType":"GENERAL"}] [admin] - Policy created
[2023-06-15 00:35:05,420]  INFO - [DELETE_POLICY] [passcodeios] [carbon.super] [-1234] [{"policyPayloadVersion":"2.0","id":33,"priorityId":1,"profile":{"profileId":33,"profileName":"passcodeios","tenantId":-1234,"deviceType":"ios","createdDate":"Jun 13, 2023 10:24:30 PM","updatedDate":"Jun 15, 2023 12:15:53 AM","profileFeaturesList":[{"id":33,"featureCode":"PASSCODE_POLICY","profileId":33,"deviceType":"ios","content":"{\"forcePIN\":true,\"allowSimple\":true,\"requireAlphanumeric\":true,\"minLength\":7.0,\"minComplexChars\":4.0,\"pinHistory\":\"\"}","correctiveActions":[]}]},"policyName":"passcodeios","generic":false,"roles":["ANY"],"devices":[],"users":[],"active":false,"updated":true,"description":"test","compliance":"enforce","policyCriterias":[],"tenantId":-1234,"profileId":33,"deviceGroups":[],"policyType":"GENERAL"}] [admin] - Policy deleted
[2023-06-15 00:35:12,768]  INFO - [UPDATE_POLICY_PRIORITIES] [] [carbon.super] [-1234] [[{"id":65,"priorityId":1,"generic":false,"active":false,"updated":false,"tenantId":0,"profileId":0},{"id":34,"priorityId":2,"generic":false,"active":false,"updated":false,"tenantId":0,"profileId":0}]] [admin] - Policy priorities updated
[2023-06-15 00:35:25,395]  INFO - [PUBLISH_CHANGES] [] [carbon.super] [-1234] [] [admin] - Apply changes to device
```
**3. Device enrollment history events** - logs for device enrollment and dis-enrollment

Pattern :
{DateTime} {LogLevel} - {DeviceId} {DeviceType} {Owner} {Ownership} {TenantId} {TenantDomain} {UserName} - log_message

```
[2023-06-15 00:12:09,078]  INFO - [97] [android] [admin] [BYOD] [-1234] [carbon.super] [admin] - Device enrolled successfully
[2023-06-15 00:47:36,278]  INFO - [97] [android] [admin] [BYOD] [-1234] [carbon.super] [admin] - Device disenrolled successfully
```

**4. App install events** - logs for app installation and uninstallation

Pattern :
{DateTime} {LogLevel} - {AppId} {AppName} {AppType} {SubType} {Action} {Device} {TenantId} {TenantDomain} {UserName} - log_message

```
[2023-06-15 00:15:12,550]  INFO - [1] [Calculator] [PUBLIC] [DEVICE] [install] [deviceId {id='675c60a9d31492d6', type='android'}] [-1234] [carbon.super] [admin] - App install triggered
[2023-06-15 00:46:24,454]  INFO - [2] [Sololearn] [ENTERPRISE] [DEVICE] [install] [deviceId {id='675c60a9d31492d6', type='android'}] [-1234] [carbon.super] [admin] - App install triggered
[2023-06-15 00:46:40,498]  INFO - [3] [Engineering] [WEB_CLIP] [DEVICE] [install] [deviceId {id='675c60a9d31492d6', type='android'}] [-1234] [carbon.super] [admin] - Web app install triggered
```

* https://repository.entgra.net/proprietary/product-uem/pulls/6

Co-authored-by: prathabanKavin <kavinprathaban025@gmail.com>
Co-authored-by: Pahansith Gunathilake <pahansith@entgra.io>
Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/136
Co-authored-by: Kavin Prathaban <kavin@entgra.io>
Co-committed-by: Kavin Prathaban <kavin@entgra.io>
2023-07-25 15:59:45 +05:30
navodzoysa
74e06047f1 Fix class def not found in grafana component 2023-07-25 15:45:15 +05:30
navodzoysa
effc35d52d Update admin credentials in webapp-auth-config template 2023-07-25 15:45:15 +05:30
Amalka Subasinghe
5b85778d27 fixed operation template unit tests 2023-07-25 15:45:15 +05:30
Amalka Subasinghe
80b42315d7 operation template related unit test fixes 2023-07-25 15:45:15 +05:30
Amalka Subasinghe
be6db5c5d5 fixed unit tests 2023-07-25 15:45:15 +05:30
Amalka Subasinghe
f63a6ee65b fixed unit tests 2023-07-25 15:45:15 +05:30
Amalka Subasinghe
ce37fdb4be fixed unit tests 2023-07-25 15:45:15 +05:30
Amalka Subasinghe
c286fec27b fixed unit tests 2023-07-25 15:45:15 +05:30
Amalka Subasinghe
da8fa5b895 fixed unit tests 2023-07-25 15:45:15 +05:30
Amalka Subasinghe
bc66555a04 fixed unit tests 2023-07-25 15:45:15 +05:30
Amalka Subasinghe
c855b707e7 fixed mockito dependency issue 2023-07-25 15:45:15 +05:30
Amalka Subasinghe
defb0aed04 fixed unit tests in analytics-mgt 2023-07-25 15:45:15 +05:30
Amalka Subasinghe
5b6b11dc8c fixed unit tests of application-mgt 2023-07-25 15:45:15 +05:30
Dharmakeerthi Lasantha
437c0e642d Merge branch 'apim420' of https://repository.entgra.net/community/device-mgt-core into apim420 2023-07-04 23:49:24 +05:30
Amalka Subasinghe
2ff6e2e529 updated jackson-databind version 2023-06-30 12:02:53 +05:30
Amalka Subasinghe
1c3cd7cd2f fixed webapp deploying failure 2023-06-30 12:02:17 +05:30
Amalka Subasinghe
86c114f52f Merge pull request 'Remove Capp Deploying service' (#159) from tcdlpds/device-mgt-core:cron-fix into apim420
Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/159
2023-06-29 13:06:19 +00:00
Dharmakeerthi Lasantha
35ee44f799 Remove Capp Deploying service 2023-06-29 15:47:08 +05:30
Amalka Subasinghe
bfc38eeff0 Merge pull request 'Fix Cron Expression defining issue' (#157) from tcdlpds/device-mgt-core:cron-fix into apim420
Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/157
2023-06-29 03:51:39 +00:00
Dharmakeerthi Lasantha
e7062b37b2 Fix Cron Expression defining issue 2023-06-28 18:59:30 +05:30
Dharmakeerthi Lasantha
1e9b38440b Improve subscription filtering logic 2023-06-28 09:33:27 +05:30
Lasantha Dharmakeerthi
ab681eb915 Fix consumer REST calls 2023-06-23 04:44:33 +00:00
pasindu
c455bfe187 Fix consumer REST calls 2023-06-22 15:57:35 +05:30
Dharmakeerthi Lasantha
342e201c4c Add improvements to APIM application creating logic 2023-06-20 09:39:49 +05:30
Pasindu Rupasinghe
cb2fb990e7 Get ApiApplicationInfo and access token into single object
Co-authored-by: Pasindu Rupasinghe <pasindu@entgra.io>
Co-committed-by: Pasindu Rupasinghe <pasindu@entgra.io>
2023-06-19 12:00:20 +00:00
Lasantha Dharmakeerthi
438f06ef45 Fix getApplication method with Rest api calls 2023-06-19 02:52:08 +00:00
pasindu
da1485d04f Fix getApplication method with Rest api calls 2023-06-19 08:02:41 +05:30
Dharmakeerthi Lasantha
bfaeb1778f Add JWT support 2023-06-16 08:03:11 +05:30
Lasantha Dharmakeerthi
82b7513c01 Improvements in consumer rest APIs 2023-06-15 05:31:15 +00:00
pasindu
43ef801ac3 Improvements in consumer rest apis 2023-06-15 10:28:22 +05:30
Pasindu Rupasinghe
7dfcc0e33c Get token separately for REST calls
Co-authored-by: Pasindu Rupasinghe <pasindu@entgra.io>
Co-committed-by: Pasindu Rupasinghe <pasindu@entgra.io>
2023-06-15 02:50:59 +00:00
Dharmakeerthi Lasantha
d40dccc240 Add improvements to token generation for devices 2023-06-14 12:37:10 +05:30
Dharmakeerthi Lasantha
253157ba1a Merge branch 'apim420' of https://repository.entgra.net/community/device-mgt-core into apim420 2023-06-14 01:46:46 +05:30
Dharmakeerthi Lasantha
1edaa8a2a5 Improve API key generating method 2023-06-13 08:48:22 +05:30
Lasantha Dharmakeerthi
ad537f3461 Fix application key generation method 2023-06-13 02:55:27 +00:00
pasindu
7826e5c285 Fix key generation method 2023-06-13 07:32:32 +05:30
Dharmakeerthi Lasantha
730f3aaa07 Improve API publishing functionality 2023-06-13 04:06:04 +05:30
Dharmakeerthi Lasantha
840ba3755a Merge branch 'apim420' of https://repository.entgra.net/tcdlpds/device-mgt-core into apim420 2023-06-12 16:29:12 +05:30
Dharmakeerthi Lasantha
af17e4fa8e Improve APIM application key generate method 2023-06-12 16:27:38 +05:30
Lasantha Dharmakeerthi
7a6f6b8672 Fix version issues in REST APIs 2023-06-12 09:57:54 +00:00