Comments (4)
The relation is the other way. @jjcarstens can comment on that line. However, it should be many CAs to one product.
A CA can only JITP for one product, though. You can't have one CA JITP'ing for multiple products since NH wouldn't know which product to assign to the device when it first authenticates.
from nerves_hub_web.
I understand a CA can only JITP for one product.
I may be wrong, but on line 12, create unique_index(:jitp, [:product_id])
enforces a single JITP enabled CA per product.
From https://github.com/nerves-hub/nerves_hub_web/blob/main/apps/nerves_hub_web_core/lib/nerves_hub_web_core/products/product.ex#L22 , we have in Product
: has_one :jitp
@jjcarstens can you explain this limitation ?
from nerves_hub_web.
Right now there is a hard limitation of one JITP CA per product because of that unique index (as @jeanparpaillon said). But we should probably remove that so unique index so that many CAs can JITP one product (as @fhunleth said). The way CAs are structured already enforces that a CA can only JITP for one product
FWIW, we had discussed this need for our internal instance, but then moved away from using JITP entirely and hadn't circled back to it. I believe we can simply just remove the linked index for :product_id
on JITP records
from nerves_hub_web.
Got it. I forgot the discussion and just assumed that it was working for us internally at one time. The restriction doesn't make sense, and if it's as simple as removing the linked index for :product_id
, then I'm definitely for it.
from nerves_hub_web.
Related Issues (20)
- Contributing: docs HOT 2
- import-release-team-keyring not found HOT 4
- Uploading a device certificate produces a warning
- Indeterminate deployment when device connects to socket and multiple deployments available
- Sentry error when deploying Nerves Hub HOT 6
- Device Token Auth HOT 5
- Fatal - Unknown CA on rpi4 device with local hub web. HOT 21
- host nerves-hub and link my firmware step-by-step? HOT 1
- Propose to have new library like `nerves_hub_certificate` HOT 1
- Web frontend can't connect to websocket, with terraform deployment HOT 3
- Set `certificate_authorities: false` in SSL options to support TLS 1.3
- Server error when uploading a new CA signed by root-ca-key.pem HOT 2
- Add support for FAT resources delta updates
- Edit deployment do not show advanced options HOT 1
- Use fwup version on device to determine delta firmware update
- mix ecto.reset finishes with an {:error, #Ecto.Changeset} HOT 2
- (Protocol.UndefinedError) protocol Enumerable not implemented for #Ecto.Association.NotLoaded<association :products is not loaded> HOT 2
- Feedback issues with the self hosting HOT 1
- Red shows up as white in the new xterm.js theme
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nerves_hub_web.