# Assignment LEIA installation
- **Date: 2021/08/19**
- Updated by : **Jan**
# Contact
- Uniportal : Oliver
- LEIA : Jan / Chris
# Goal
- [x] To install latest LEIA for QTS testing  `Done`
- ETA: 2021/08/18 - 08/19
# Working Steps and related acceptance criteria:
- Install LEIA (Jan)  `Done`
- [x] install on QA machine (oliver provide RDP connection information. Including IP / username / password)  `Done`
- UP DB connection (Jan)  `Done`
- [x] setup LEIA to connect to MS-SQL DB to read user mapping  `Done`
- [x] Oliver to provide the DB access informaiton (including JDBC URL of the database, login ID, password)  `Done`
- Bind Lale End Users to UP (Jan)
- [x] Oliver: provide 3 UP users (UACT1, UACT2, UACT3) for testing purpose.(information including UP account name / password)  `Done`
- Jan : To bind the 3 users (UACT1, UACT2, UACT3) to three different lale users (lqauser1, lqauser2, lqauser3)  `Failed`

- [x] Jan : To create a lale user as the bot (lqabot1)  `Done`
- Unit test (Jan)  `Done`
- [x] Jan to use RESTful API to send (from lqabot1) to (lqauser1, lqauser2, lqauser3)  `Done`
- [x] lqabot1 + lqauser1 : the chatroom should be created automatically. Message should be delivered succdessfully.  `Done`
- [x] lqabot1 + lqauser2 : the chatroom should be created automatically. Message should be delivered succdessfully.  `Done`
- [x] lqabot1 + lqauser3 : the chatroom should be created automatically. Message should be delivered succdessfully.  `Done`
<video width="320" height="240" controls>
<source src="https://lab1.jankristanto.com/static/temp/20210819_134153.mp4" type="video/mp4">
</video>
**If Video is unavailable please click [here](https://lab1.jankristanto.com/static/temp/20210819_134153.mp4)**
**Important** : Our client apps (android & PC), failed to refresh the room list. So, if the bots create a new room, it will take some time to appear in our client apps (android & matrix).
- Integration Test (Oliver)
- In the application level, to call LEIA api to send message. (to UACT1, UACT2, UACT3)
- Verification : lqauser1, lqauser2, lqauser3 should receive the application level message from lqabot1
- Architecture

- Clients : Android, iOS, PC
- Lale : Lale (Java Spring Boot)
- Matrix : Synapse v0.3 (Python 2.7 Restful)
- PG : Postgresql
- Sygnal : Push Server (Python 2.7 Flask, Resful)
- Laleplus: LEIA LALE SIDE (python 3, FastAPI, Restful)
- MQ: Message Queue (by JJ, python?)
- LEIA: LEIA DAU SIDE (python3, Flask, Resful)
- AF: Agent Flow (Java)
- MSSQL: AF Database (SQL SERVER)
- GCM: Google Cloud Messaging / Firebase Cloud Messaging
- APNS: Apple Push Notification service
* **New**: Laleplus is providing additional features/API that not available in Matrix, especially serve for LEIA/AF specs.
* Security:
1. Laleplus is secured by Matrix `access_token` (python macaroon)
2. In addition, Laleplus only can be access by special users (bot users). the bot need to be registered by Matrix ADMIN.
**Currently the list of bots store in the json file. In future, the list of the bots will be stored in sqlite. Only Matrix Admin has authorization to manage the list of the bots.**