Replies: 1 comment 5 replies
-
Well, I think it depends how your users will provision their device. The easiest way IMO would be to implement your own API key mechanism for your device and tie them to Fief users. If we imagine that your users have access to a web application where they can manage their devices and data. This web application uses Fief for authentication. When they receive their device, users can login to the web application and register their device using the unique device ID. At that point, you can store in your MongoDB that the device The user would then need to set this API key on the device (don't know how). During usage, your device will send data to the backend using this API key, which you can simply check from your database. I'm not very experienced in IoT, so this may not make totally sense, but probably worth to explore in this way. |
Beta Was this translation helpful? Give feedback.
-
I am quite excited about Fief and the OAuth2 flows -- last night I got my grafana logins working with the Fief OAuth2 flow, and this morning I got the GitHub connector to work, awesome!
The next problem I want to solve is related to User's IoT devices, for which OAuth2 is too heavy of a flow/not realistic for a modern IoT MCU where it typically gets deployed with static API keys. In my ideal world, users would be able to provision device API keys for themselves. From there I have to consider that there is a need to tie a device identifier to an API key (so that two devices can't report data with the same identifier) and mark that registered device identifier as either private or public.
In my example, the IoT data lives in MongoDB (powered by FastAPI) and the Fief user data lives in its own Postgresql schema related to the Fief workspace. I am still trying to think through the best path forward for modeling this and connecting the dots. Any insights or suggestions you might have in this space would be greatly appreciated. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions