ERNI-CoP-IoT / dust-measurement-network

Dust Measurement Network - air pollution data measurement
https://dmn.azurewebsites.net/
MIT License
1 stars 0 forks source link

Add be and fe code for derived keys #55

Closed ArmandoAmoros closed 2 years ago

ArmandoAmoros commented 2 years ago

Added functionality to generate a derivedKey given a deviceID.

This key is generated in the back end by hashing together the deviceID and the Enrollment Group Private Key as described here.

Currently the Enrollment Group Private Key is hardcoded as a dummy in the back end for demonstration purposes. In a following step and as part of #54 the key has to be stored safely in the back end server.

MicrosoftTeams-image

ArmandoAmoros commented 2 years ago

@yohny Please have a look to the implementation and feel totally free to rip it up. It is the first time I program in Angular and C#, I mostly tried to just copy paste the code from the "about" section, so all comments would be totally appreciated.

yohny commented 2 years ago

Im a bit confused now where the main development should be happenig...is it here in this monopero? we have separate repo for frontend, that has already setup deployment pipeline to Azure https://github.com/ERNICommunity/hh-dust-fe-be and we could move it in IoT organization if needed. I would prefer to continue development there, as this monorepo ties the independent apps together and thats not good - it makes maintenance and deployment setup harder. the idea of having independent apps that dont share any code in one repo is bad, thats not what monorepos are for.

dniklaus commented 2 years ago

It's supposed to be this repository here, where the main development shall happen. It is always questionable having mono repos including all together.

We decided to have it this way because all other components of the project were already here.

yohny commented 2 years ago

well that's unfortunate 😄 this goes against monorepo principle as in our case (independent apps) we gain no advantages from monorepo, But we get all the disadvantages - unrelated changes/code disturbing you in repo and deployment of apps is harder. Also when you want to work on one app (typical case) you need check out whole codebase that is of no interest to your work