Skip to content

Commit

Permalink
Migrate Device Provisioning Service to repository
Browse files Browse the repository at this point in the history
This PR introduces the Device Provisioning Service (DPS) to the repository, a crucial component designed to streamline the onboarding and management of devices within a networked environment. 

Key Features:

Device Onboarding and Management
  - Facilitates the seamless onboarding of devices, ensuring they are securely connected and configured within the network.
  - Supports both initial provisioning and re-provisioning of devices, allowing for updates and reconfigurations as needed.

Enrollment Group Management
  - Manages groups of devices through enrollment groups, enabling batch operations and streamlined configuration management.
  - Provides robust validation mechanisms to ensure the integrity and security of enrollment data.

Secure Communication
  - Utilizes gRPC for efficient and secure communication between devices and the service.
  - Supports TLS configurations to ensure data is encrypted and secure during transmission.

MongoDB Integration
  - Leverages MongoDB for storing and managing device data, including provisioning records and enrollment group information.
  - Implements efficient data operations with support for bulk writes and change streams to monitor updates.

Comprehensive Testing Framework
  - Includes a suite of tests to validate the functionality and performance of the provisioning service.
  - Provides simulation tools to test device onboarding scenarios, ensuring reliability and robustness.

Configuration Flexibility
  - Offers extensive configuration options, allowing developers to customize logging, API settings, and security parameters to fit their specific needs.
  - Supports both CoAP and HTTP protocols, providing flexibility in how devices communicate with the service.

This service is designed to be easily integrated into existing systems, providing a scalable solution for managing large numbers of devices securely and efficiently.
  • Loading branch information
Danielius1922 authored Aug 19, 2024
1 parent 7590dcd commit 5158a02
Show file tree
Hide file tree
Showing 133 changed files with 23,181 additions and 514 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ jobs:
directory: m2m-oauth-server
file: .tmp/docker/m2m-oauth-server/Dockerfile
template-file: tools/docker/Dockerfile.in
- name: device-provisioning-service
directory: device-provisioning-service
file: .tmp/docker/device-provisioning-service/Dockerfile
template-file: tools/docker/Dockerfile.in
- name: test-device-provisioning-service
directory: test/device-provisioning-service
file: test/device-provisioning-service/Dockerfile
uses: ./.github/workflows/build-publish-cfg.yaml
with:
name: ${{ matrix.name }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ jobs:
cat /proc/cpuinfo
echo "Number of cores: $(nproc)"
echo "Number of threads: $(nproc --all)"
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -130,7 +131,7 @@ jobs:
- name: Remove simulators container
if: ${{ always() }}
run: |
make simulators/remove
make simulators/remove simulators/bridge/remove simulators/dps/remove
- name: Collect cloud server logs when the test fails
if: ${{ failure() }}
Expand Down
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ issues:
- path: resource-aggregate/events/resourceLinks.*.go|resource-aggregate/client/sync.*.go|resource-aggregate/service/grpcApi.go|resource-aggregate/events/resource.*.go
linters:
- dupl
- path: device-provisioning-service/test/provisionHandler.go
linters:
- dupl
# Fix found issues (if it's supported by the linter).
# fix: true

Expand Down
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,24 @@
"TEST_SNIPPET_SERVICE_LOG_DUMP_BODY": "false",
"TEST_DATABASE": "mongoDB",
"TEST_BRIDGE_DEVICE_CONFIG": "${workspaceFolder}/.tmp/bridge/config-test.yaml",
"TEST_DPS_ROOT_CA_CERT_ALT": "${workspaceFolder}/.tmp/certs/device/root_ca_alt.crt",
"TEST_DPS_ROOT_CA_KEY_ALT": "${workspaceFolder}/.tmp/certs/device/root_ca_alt.key",
"TEST_DPS_INTERMEDIATE_CA_CERT": "${workspaceFolder}/.tmp/certs/device/intermediatecacrt.pem",
"TEST_DPS_INTERMEDIATE_CA_KEY": "${workspaceFolder}/.tmp/certs/device/intermediatecakey.pem",
// "TEST_LEAD_RESOURCE_TYPE_FILTER": "first",
// "TEST_LEAD_RESOURCE_TYPE_REGEX_FILTER": "oic\\.wk\\..*,^/light/\\d+$",
// "TEST_LEAD_RESOURCE_TYPE_USE_UUID": "true",
// "TEST_DEVICE_NAME": "bridged-device-0",
// "TEST_DEVICE_TYPE": "bridged",
// "GODEBUG": "scavtrace=1",
// "TEST_COAP_GATEWAY_UDP_ENABLED": "true",
// "TEST_DPS_UDP_ENABLED": "false",
// "GOMAXPROCS": 1,
// "GOFLAGS":"-mod=vendor",
// "GRPC_VERBOSITY":"DEBUG",
// "GRPC_GO_LOG_VERBOSITY_LEVEL":99,
// "GRPC_GO_LOG_SEVERITY_LEVEL":"info",
// "PION_LOG_TRACE=all"
},
"go.testTimeout": "600s",
"go.buildFlags": [
Expand Down
Loading

0 comments on commit 5158a02

Please sign in to comment.