Commit Graph

11184 Commits

Author SHA1 Message Date
b640d1cfb4 Merge pull request 'Update admin credentials variables in webapp-auth-config template' (#135) from navodzoysa/device-mgt-core:auth-config into master
Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/135
2023-06-19 03:59:28 +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
inoshperera
48be39a963 Add the logic to save device id to certificate DB
partialy fixes https://roadmap.entgra.net/issues/10145
2023-06-18 12:22:01 +05:30
0a491bcb32 Merge branch 'master' into auth-config 2023-06-16 10:53:32 +00:00
bfef1e5caa Merge pull request 'Fix class not found in Grafana component' (#138) from navodzoysa/device-mgt-core:fix-grafana into master
Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/138
2023-06-16 10:53:06 +00:00
1890f07217 Merge branch 'master' into fix-grafana 2023-06-16 10:38:03 +00:00
cf2bd5e935 Add custom loggers (#136)
## Purpose
* Fixes https://roadmap.entgra.net/issues/10117

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

#### Log structure

**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
```

## Related PRs
* 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-06-16 10:06:30 +00:00
ThilinaPremachandra
647d4fdb78 add rollback 2023-06-16 09:48:52 +05:30
Dharmakeerthi Lasantha
bfaeb1778f Add JWT support 2023-06-16 08:03:11 +05:30
ThilinaPremachandra
3722bfc761 add try with resources 2023-06-16 01:58:42 +05:30
ThilinaPremachandra
e66c3dc6f6 add error log 2023-06-15 14:29:10 +05:30
ThilinaPremachandra
00b107ee99 remove unnecessary variable, change error msg 2023-06-15 11:15:23 +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
ThilinaPremachandra
bc2bccac84 remove unnecessary code lines 2023-06-14 18:38:11 +05:30
ThilinaPremachandra
bb50717370 remove unnecessary imports, fixes line issues 2023-06-14 17:45:27 +05:30
ThilinaPremachandra
67c529b0fa fixes line issues 2023-06-14 17:16:38 +05:30
ThilinaPremachandra
145740fec6 Add hierarchical grouping feature 2023-06-14 16:14:20 +05:30
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
navodzoysa
331ba08f4d Fix class def not found in grafana component 2023-06-13 09:19:43 +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
pasindu
3b8405e72e Fix version issues in REST APIs 2023-06-12 14:37:00 +05:30
Amalka Subasinghe
46ee81e78d updated from master 2023-06-12 12:19:20 +05:30
Dharmakeerthi Lasantha
a09d72c33c Add todo Comments 2023-06-10 11:43:27 +05:30
ThilinaPremachandra
acd3039c65 pom.xml updated by pull 2023-06-09 18:34:52 +05:30
Dharmakeerthi Lasantha
0927dfc835 sync with upstream 2023-06-09 14:44:08 +05:30
Dharmakeerthi Lasantha
f741df7c4b Add ToDos 2023-06-09 14:12:30 +05:30
f277f77fa9 Merge pull request 'Fix search by user in device listing page' (#133) from osh.silva/device-mgt-core:search-10113 into master
Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/133
2023-06-09 05:50:52 +00:00
8c7412a2f9 Merge branch 'master' into search-10113 2023-06-09 05:07:31 +00:00
743d5c09ec Merge pull request 'Implement DeleteDeviceLocation method for deleting location from a device' (#128) from Gimhan-minion/device-mgt-core:dev into master
Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/128
2023-06-09 02:25:39 +00:00
Dharmakeerthi Lasantha
c227969a61 Improve the functionality 2023-06-09 05:06:01 +05:30
Dharmakeerthi Lasantha
189a572d31 Improve functionality 2023-06-09 04:51:05 +05:30
Lasantha Dharmakeerthi
49fafb3b37 Get API Application registration to single method and fix generateApplicationKeys method 2023-06-08 22:53:18 +00:00
pasindu
94e1df617a Get apiApplication registration to single method and fix generateApplicationKeys 2023-06-09 03:07:42 +05:30
Amalka Subasinghe
6f3e6e0fae Merge pull request 'Remove Application mgt API feature from device mgt core' (#134) from pramilaniroshan/device-mgt-core:app-mgt-restructure into master
Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/134
2023-06-08 08:49:01 +00:00
656acbb34e Remove Application mgt API feature from device mgt core 2023-06-08 12:30:34 +05:30
Dharmakeerthi Lasantha
d251253948 Improve application key generating functionality 2023-06-08 06:02:23 +05:30
Lasantha Dharmakeerthi
bbcadf19d0 Modify generateAndRetrieveApplicationKeys method 2023-06-07 23:35:15 +00:00
pasindu
0e62245064 modify generateAndRetrieveApplicationKeys method 2023-06-07 23:24:13 +05:30
Dharmakeerthi Lasantha
6bf6adf2b5 Add API integration 2023-06-07 20:58:48 +05:30
Lasantha Dharmakeerthi
f587e2a38f Improvements in consumer rest APIS 2023-06-07 06:40:13 +00:00