Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add provisionning catalog #92

Merged
merged 11 commits into from
Aug 31, 2021
Merged

Add provisionning catalog #92

merged 11 commits into from
Aug 31, 2021

Conversation

Aschen
Copy link
Contributor

@Aschen Aschen commented Aug 12, 2021

Description

Provisioning Policy

The plugin offer two policies for registering devices when receiving a new payload:

  • auto provisioning: automatically register the device
  • provisioning catalog: only register authorized device

This can be changed by modifying the plugin config document in the config collection of the administration index:

::: info
The document ID is plugin--device-manager.
:::

{
  "type": "device-manager",
  "device-manager": {
    "autoProvisionning": true
  }
}

Provisioning Catalog

Administrator can create catalog entries to allows devices to register.

Those entries must be created in the config collection of the administration index.
Each entry must contain at least the deviceId property (e.g. Abeeway-12345).

{
  "type": "catalog",
  "catalog": {
    "deviceId": "Abeeway-12345",
    "authorized": true,
  }
}

If the authorized property is set to false, then the device will not be allowed to register.

::: warning
If autoProvisioning is set to false in the config document, the plugin will only register devices listed in the provisioning catalog.
:::

Automatically attach tenant

A provisioning catalog entry can also contain a tenantId property so the device will be automatically attached to a tenant after registration.

{
  "type": "catalog",
  "catalog": {
    "deviceId": "Abeeway-12345",
    "authorized": true,
    "tenantId": "tenant-shipment-kuzzle", // Automatically attach the device to this tenant
  }
}

Automatically link asset

A provisioning catalog entry can also contain a assetId property so the device will be automatically linked to an asset after registration. This property must contain the unique identifier of an asset present in the tenant index.

{
  "type": "catalog",
  "catalog": {
    "deviceId": "Abeeway-12345",
    "authorized": true,
    "tenantId": "tenant-shipment-kuzzle",
    "assetId": "container--xlarger-47GD2", // Automatically link the device to this asset
  }
}

Other changes

  • Engines are now stored in the config collection of the device-manager index (An automatic migration has been setup)

@Aschen Aschen self-assigned this Aug 12, 2021
@Aschen Aschen changed the title Add provisionning catalog [breaking] Add provisionning catalog Aug 12, 2021
@Aschen Aschen changed the title [breaking] Add provisionning catalog Add provisionning catalog Aug 12, 2021
@Aschen Aschen linked an issue Aug 12, 2021 that may be closed by this pull request
@Aschen Aschen merged commit a3cc6be into 1-dev Aug 31, 2021
@Aschen Aschen deleted the 18-authorized-device-catalog branch August 31, 2021 21:00
@Aschen Aschen mentioned this pull request Sep 6, 2021
Aschen added a commit that referenced this pull request Sep 6, 2021
# [0.3.0](https://github.com/kuzzleio/kuzzle-plugin-device-manager/releases/tag/0.3.0) (2021-09-06)


#### Breaking changes

- [ [#90](#90) ] [breaking] Allows to skip payloads   ([Aschen](https://github.com/Aschen))
- [ [#84](#84) ] Returning standard response on device-manager/device:search   ([xbill82](https://github.com/xbill82))

#### Bug fixes

- [ [#79](#79) ] Fix registering of multiple mappings for the same tenantGroup   ([Aschen](https://github.com/Aschen))

#### New features

- [ [#92](#92) ] Add provisionning catalog   ([Aschen](https://github.com/Aschen))

#### Enhancements

- [ [#89](#89) ] Rename tenantGroup to group   ([Aschen](https://github.com/Aschen))
- [ [#88](#88) ] Trigger tenant events after payload processing   ([Aschen](https://github.com/Aschen))

#### Others

- [ [#81](#81) ] Update deps   ([rolljee](https://github.com/rolljee))
- [ [#73](#73) ] Fix some typing issues in documentation   ([rolljee](https://github.com/rolljee))
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Authorized device catalog
2 participants