Posts Tagged ‘MongoDB’
The technology & security foundations of PiCockpit
I was asked to elaborate a bit about the security & technology foundations of PiCockpit. The parts which are involved PiCockpit consists of several parts: picockpit-client picockpit-frontend picockpit-backend picockpit-api (“papi”) the database the MQTT server the picockpit Package repository The MQTT server Data between the picockpit-frontend and picockpit-client is exchanged using the MQTT server (called…
WeiterlesenHow to set unique object ids in embedded documents across a MongoDB collection
MongoDB’s updateMany can be used to update all documents which are matched. Problem If, however, you want to set unique new ObjectIDs in your update, you would find that MongoDB sets the same ObjectID for every entry: db.getCollection(‘mypis_collectedpis’).updateMany({}, {$set: {apps: { “com.picockpit/core”: { meta: { version: “2.0”, name: “PiCockpit Core”, image: “”, description: “PiCockpit.com…
WeiterlesenUnderstanding Erlang & Lua / Luerl for VerneMQ MongoDB auth_on_register hook
My goal / TLDR My goal with this blog post is to explain how to set custom mountpoints for VerneMQ by modifying the shipped MongoDB auth Lua script (lua/auth/mongodb.lua). Setting a custom mountpoint is possible with VerneMQ not only by setting mountpoints manually for specific listeners (e.g. ports), but also programmatically during authorization in your…
Weiterlesenmongo_orm Exception: missing bson key: publish_acl (Exception)
When you extend your field definitions in the mongo_orm document classes, specifically with embedded documents, you might run into the following runtime (!) error: Exception: missing bson key: <name> (Exception) This is not an error in your code – your code is raising, because the database structure is not as it expects it to be!…
Weiterlesenmongo_orm custom name for collection
mongo_orm will automatically determine the name for your collection by using the Module and Class name, and appending an “s”. In cases where you want to name your collection, you can simply do this: class PapiTest < Mongo::ORM::Document collection_name “Buster” field test : String end get “/” do pt = PapiTest.new pt.test = “I want…
WeiterlesenBuilding a persistent in-line editing experience with Crystal, MongoDB (datanoise / sam0x17)
As documentation is still sparse, I would like to add some. This is what I am building currently: The individual fields are going to be editable with an inline editor, which will automatically save to the backend – no need for reloading the whole page. The point of the whole is a backend for my…
Weiterlesen