Commit Graph

11184 Commits

Author SHA1 Message Date
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
osh
4436c48228 Merge branch 'master' of ssh://repository.entgra.net:222/community/device-mgt-core into device-apps-api-1 2023-07-24 21:19:09 +05:30
Dharmakeerthi Lasantha
74041070f9 Fix class def not found issue 2023-07-24 20:22:54 +05:30
Dharmakeerthi Lasantha
349bb0a3dc Fix test case failure 2023-07-24 18:33:00 +05:30
Amalka Subasinghe
66f33f4845 notify cluster formation changed nug fixes 2023-07-24 13:17:46 +05:30
Amalka Subasinghe
615da6303f notify cluster formation changed implementation 2023-07-24 11:52:23 +05:30
builder
f19f48d050 [maven-release-plugin] prepare for next development iteration 2023-07-23 21:35:40 +05:30
builder
ff9971ed77 [maven-release-plugin] prepare release v5.0.27 2023-07-23 21:35:33 +05:30
Rajitha Kumara
7c9d3a2108 Fixes for grouping issues (#186)
Co-authored-by: rajitha <rajitha@entgra.io>
Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/186
Co-authored-by: Rajitha Kumara <rajitha@entgra.io>
Co-committed-by: Rajitha Kumara <rajitha@entgra.io>
2023-07-23 15:12:37 +00:00
osh
77b68af5d0 Add pagination 2023-07-18 23:10:23 +05:30
osh
e7b0255a95 Add get device apps by id service 2023-07-18 19:34:11 +05:30
Dharmakeerthi Lasantha
5098c652ca Merge branch 'apim420' of https://repository.entgra.net/community/device-mgt-core into sync-master 2023-07-18 09:22:28 +05:30
Amalka Subasinghe
bfe9746d70 Merge branch 'apim420' of https://repository.entgra.net/community/device-mgt-core into apim420 2023-07-18 09:20:19 +05:30
Dharmakeerthi Lasantha
1d94fb7de1 Fix test case failing 2023-07-18 09:16:25 +05:30
Inosh Perara
8d552b3070 Merge pull request 'Add VPP token field' (#182) from osh.silva/device-mgt-core:vpp-token-change-10156 into vpp-v2
Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/182
2023-07-18 02:45:29 +00:00
osh
4b9cad1c75 Update db queries 2023-07-17 16:13:07 +05:30
osh
32a289e10e Merge branch 'vpp-v2' of ssh://repository.entgra.net:222/community/device-mgt-core into vpp-token-change-10156 2023-07-17 16:02:06 +05:30
osh
dd7910268e Add vpp token field 2023-07-17 13:36:39 +05:30
osh
b576f3d9bb Merge branch 'master' of ssh://repository.entgra.net:222/community/device-mgt-core into vpp-v2 2023-07-17 10:43:21 +05:30
Inosh Perara
ec88734831 Merge pull request 'Add db scripts for VPP feature' (#179) from osh.silva/device-mgt-core:vpp-db-scripts into vpp-v2
Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/179
2023-07-17 04:35:06 +00:00
Inosh Perara
2dd3e86f69 Merge pull request 'Grouping Issues' (#181) from ThilinaPremachandra/device-mgt-core:groupingIssues into master
Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/181
2023-07-15 11:28:14 +00:00
ThilinaPremachandra
6dbad29776 fix: role sharing issues for other users 2023-07-15 16:27:40 +05:30
osh
cd17d06158 Merge branch 'master' of ssh://repository.entgra.net:222/community/device-mgt-core into vpp-v2 2023-07-14 09:46:41 +05:30
Charitha Goonetilleke
3d5fce400b Merge pull request 'Rearrange getOperations by eliminating the necessity of the owner param' (#170) from Sasini_Sandamali/device-mgt-core:master into master
Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/170
2023-07-14 00:46:49 +00:00
Charitha Goonetilleke
6e1e58f2ec Merge branch 'master' into master 2023-07-13 16:33:56 +00:00
osh
2249520132 Resolve conflicts 2023-07-13 17:46:04 +05:30
osh
01df370032 Add db scripts 2023-07-13 14:40:15 +05:30
Inosh Perara
fefc66bc59 Merge pull request 'Improve update asset DAO' (#174) from osh.silva/device-mgt-core:vpp-daos into vpp-v2
Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/174
2023-07-13 07:51:21 +00:00
Amalka Subasinghe
95413f96de Merge pull request 'Fix OSGI service unbinding issue' (#177) from tcdlpds/device-mgt-core:sync-master into apim420
Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/177
2023-07-13 07:06:02 +00:00
Dharmakeerthi Lasantha
2cfa73206d Fix OSGI service unbinding issue 2023-07-13 07:54:34 +05:30
Amalka Subasinghe
b249b2435f Merge pull request 'Sync with the master branch' (#172) from tcdlpds/device-mgt-core:sync-master into apim420
Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/172
2023-07-12 03:46:53 +00:00
Dharmakeerthi Lasantha
a66d6389f9 Fix formatting issue 2023-07-12 00:39:31 +05:30
Dharmakeerthi Lasantha
fe4011cc7e Sync with master 2023-07-12 00:08:41 +05:30
Dharmakeerthi Lasantha
3bf6f7dd75 Improve functionality and fix formatting issues 2023-07-12 00:05:02 +05:30
Lasantha Dharmakeerthi
0b0d2e620f Fix class not found error in Grafana component 2023-07-11 17:49:56 +00:00
navodzoysa
90741dc502 Fix class not found error in analytics component 2023-07-11 23:08:33 +05:30
Inosh Perara
374be8bc25 Merge pull request 'Add missing ios scopes in mdm-ui-config' (#173) from prathabanKavin/device-mgt-core:mdmconfigfix into master
Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/173
2023-07-11 14:19:17 +00:00