From e14c97f9837f98bd8576c6ee92e73f97599866e7 Mon Sep 17 00:00:00 2001 From: Jozef Kralik Date: Tue, 12 Mar 2024 15:55:08 +0000 Subject: [PATCH] fixup actions --- .../device-provisioning-service/advanced.md | 54 +++++++++---------- content/en/docs/deployment/hub/advanced.md | 2 +- .../disaster-recovery.md | 9 ++-- .../en/docs/tutorials/dashboard-branding.md | 2 +- tools/adjust-algolia-output/algolia.json | 4 +- 5 files changed, 35 insertions(+), 36 deletions(-) diff --git a/content/en/docs/deployment/device-provisioning-service/advanced.md b/content/en/docs/deployment/device-provisioning-service/advanced.md index bdf1bb22..2f4ea270 100644 --- a/content/en/docs/deployment/device-provisioning-service/advanced.md +++ b/content/en/docs/deployment/device-provisioning-service/advanced.md @@ -47,43 +47,43 @@ In the process of acquiring a device access token from the OAuth server, the Dev 1. Create an OAuth client for DPS in KeyCloak with the following configuration: - Settings: - - Enabled: On - - Client Protocol: openid-connect - - Access Type: confidential - - Service Accounts Enabled: On - - Authorization Enabled: On + - Enabled: On + - Client Protocol: openid-connect + - Access Type: confidential + - Service Accounts Enabled: On + - Authorization Enabled: On - Credentials: - - Client Authenticator: Client Id and Secret - - Secret: `` + - Client Authenticator: Client Id and Secret + - Secret: `` - Mapper: - - Create a custom `Hardcoded claim` mapper: - - Token Claim Name: `` - - Claim value: `` - - Claim JSON Type: String - - Add to access token: On - - Add to userinfo: On + - Create a custom `Hardcoded claim` mapper: + - Token Claim Name: `` + - Claim value: `` + - Claim JSON Type: String + - Add to access token: On + - Add to userinfo: On 2. Create a WWW OAuth client with a mapper that adds the `` claim to the user JWT token. You can use the `User Property` mapper with the following configuration to map the `id` property to the `` claim: - Settings: - - Enabled: On - - Client Protocol: openid-connect - - Access Type: public - - Standard Flow Enabled: On - - Valid Redirect URIs: `[ https://www.example.com/*,... ]` - - Backchannel Logout Session Required: On - - OpenID Connect Compatibility Modes: - - Use Refresh Tokens: On + - Enabled: On + - Client Protocol: openid-connect + - Access Type: public + - Standard Flow Enabled: On + - Valid Redirect URIs: `[ https://www.example.com/*,... ]` + - Backchannel Logout Session Required: On + - OpenID Connect Compatibility Modes: + - Use Refresh Tokens: On - Mapper: - - Property: id - - Token Claim Name: `` - - Claim JSON Type: String - - Add to ID token: On - - Add to access token: On - - Add to userinfo: On + - Property: id + - Token Claim Name: `` + - Claim JSON Type: String + - Add to ID token: On + - Add to access token: On + - Add to userinfo: On In the helm chart, add the following configuration: diff --git a/content/en/docs/deployment/hub/advanced.md b/content/en/docs/deployment/hub/advanced.md index ba60c907..bb5bfeef 100644 --- a/content/en/docs/deployment/hub/advanced.md +++ b/content/en/docs/deployment/hub/advanced.md @@ -181,7 +181,7 @@ certmanager: cert: duration: 876000h # 100 years for intermediate CA used to sign device certificates ca: # CA to signing services(in default) and device certificates - issuerRef: + issuerRef: kind: "ClusterIssuer" # or "Issuer" name: "plgd-ca-issuer" group: cert-manager.io diff --git a/content/en/docs/features/monitoring-and-diagnostics/disaster-recovery.md b/content/en/docs/features/monitoring-and-diagnostics/disaster-recovery.md index 0f002c3c..5530c35c 100644 --- a/content/en/docs/features/monitoring-and-diagnostics/disaster-recovery.md +++ b/content/en/docs/features/monitoring-and-diagnostics/disaster-recovery.md @@ -61,7 +61,7 @@ The plgd hub is a stateful event-driven system, meaning that data is stored in t To back up the database, two approaches can be used: * **Passive Backup** - + ![passive-backup](/docs/features/monitoring-and-diagnostics/static/disaster-recovery-passive-backup.drawio.svg) The database is regularly backed up to a different location and can be used in case of failure. Although this approach is simple and requires fewer resources, the data may become outdated, and the restoration process may take some time. For MongoDB, utilize the `mongodump` tool to create a export of the database contents, store it securely, and use it in case of failure. Regular backups are essential to keep the data up-to-date. For more details on this approach, refer to the [MongoDB documentation](https://www.mongodb.com/docs/database-tools/mongodump/). @@ -93,11 +93,11 @@ The CoAP-Gateway and Device Provisioning Service depend on certificates validate If a primary cluster failure occurs and you cannot dynamically modify the endpoint on the devices, they will be unable to establish a connection with the hub. Devices are set up with a single endpoint to link with either the CoAP-Gateway or the Device Provisioning Service, which may include an IP address or DNS address. To guarantee connectivity to the secondary cluster, adopt one of the provided options: * **DNS Address as endpoint** - + In case of primary cluster failure, update the DNS record on the DNS server. It is recommended to set the time to live (TTL) of the DNS record to a low value, e.g., 30 minutes. * **IP Address as endpoint** - + ![load-balancer](/docs/features/monitoring-and-diagnostics/static/disaster-recovery-load-balancer.drawio.svg) Changing the IP address could be challenging in case of primary cluster failure, as the public IP address is often assigned to the Internet Service Provider (ISP). However, using an IP load balancer near devices allows changing the IP address of the load balancer to the secondary cluster. For this, you can use HAProxy, which supports layer 4 load balancing. For more information, refer to the [HAProxy documentation](https://www.haproxy.com/documentation/haproxy-configuration-tutorials/load-balancing/tcp/) and [Failover & Worst Case Management With HAProxy](https://www.haproxy.com/blog/failover-and-worst-case-management-with-haproxy). @@ -105,13 +105,12 @@ If a primary cluster failure occurs and you cannot dynamically modify the endpoi * **Update Device Provisioning Service endpoint** Under these circumstances, you have the option to update the DPS endpoint to the secondary cluster by utilizing the DHCP server to supply the devices with the updated endpoint. The device retrieves a new configuration from the DPS service, obtaining updated: - * Time(optional) * Owner * Credentials - Identity certificate, root CA certificate and Pre-shared key(optional) * Access control lists (ACLs) * Cloud configuration - Authorization code, Hub ID, Hub URL, etc. - + Subsequently, the module connects to the cloud, with the first operation being to sign up for self-registration. **From the Hub perspective:** diff --git a/content/en/docs/tutorials/dashboard-branding.md b/content/en/docs/tutorials/dashboard-branding.md index 2c2d8dbf..e1881ea7 100644 --- a/content/en/docs/tutorials/dashboard-branding.md +++ b/content/en/docs/tutorials/dashboard-branding.md @@ -62,7 +62,7 @@ Footer has a dedicated component which can be found in [`footer.js`](https://git ## Text changes -Every text in this application is coming from a translation file located in [`langauges.json`](https://github.com/plgd-dev/hub/tree/main/http-gateway/web/src/languages/langauges.json). This object contains a language block for each language you support in your application. If a block is missing you can duplicate an existing block and modify the block with the language code that is missing. +Every text in this application is coming from a translation file located in [`languages.json`](https://github.com/plgd-dev/hub/blob/main/http-gateway/web/src/languages/languages.json). This object contains a language block for each language you support in your application. If a block is missing you can duplicate an existing block and modify the block with the language code that is missing. Some messages might be missing. This is due to fact that they were not yet translated. You can add them manually or use a language editor like [POEditor](https://poeditor.com/). diff --git a/tools/adjust-algolia-output/algolia.json b/tools/adjust-algolia-output/algolia.json index a6aa7416..feba1370 100644 --- a/tools/adjust-algolia-output/algolia.json +++ b/tools/adjust-algolia-output/algolia.json @@ -1520,7 +1520,7 @@ { "title": "Create & Delete device resources", "uri": "en/docs/tutorials/create-delete-device-resources", - "content": "Creating resources Device collection resource allows dynamic creation resources created resource defined type see call occollectionsaddrtfactory Guide created resources contained within collection create resource develop own device check example cloud_server Lets examine code identify necessary steps allow device dynamically create resources collection Create collection resource ocresourcet col ocnewcollection NULL switches 1 0 ocresourcebindresourcetype col oic wk col precise description arguments given functions please refer iotivity lite documentation Determine resource types populate collection occollectionaddsupportedrt col oic r switch binary Supported resource types visible oic if baseline interface rts property collection Enable create operation collection resource ocresourcebindresourceinterface col OCIFCREATE Supporting creating resources visible oic if baseline interface property collection support creation resources property contain oic if create interface Define constructor destructor occollectionsaddrtfactory oic r switch binary newswitchinstance freeswitchinstance typedef struct ocswitcht struct ocswitcht next ocresourcet resource bool state ocswitcht OCMEMB switchs ocswitcht 1 OC_LIST switches static ocresourcet newswitchinstance const char href ocstringarray_t types ocresourcepropertiest bm ocinterfacemaskt iface_mask size_t device ocswitcht cswitch ocswitcht ocmemballoc switch_s cswitch cswitch resource ocnewresource NULL href ocstringarraygetallocated_size types device cswitch resource size_t i i 0 resource rt ocresourcebindresourceinterface cswitch resource iface_mask cswitch resource properties bm ocresourcesetdefaultinterface cswitch resource OCIFA ocresourcesetrequesthandler cswitch resource OCGET getcswitch cswitch ocresourcesetrequesthandler cswitch resource OCDELETE deletecswitch cswitch ocresourcesetrequesthandler cswitch resource OCPOST postcswitch cswitch ocresourcesetpropertiescbs cswitch resource getswitchproperties cswitch setswitchproperties cswitch ocaddresource cswitch resource ocsetdelayedcallback cswitch resource registerto_cloud 0 oclistinsert switches prev cswitch return cswitch resource ocmembfree switch_s cswitch return NULL static void freeswitchinstance ocresourcet resource ocswitcht cswitch ocswitcht oclisthead switches cswitch cswitch resource resource ocdeleteresource resource oclistremove switches cswitch ocmembfree switch_s cswitch return cswitch oclistitem_next cswitch Compile link enable create operation iotivity lite library compile CREATE 1 option cloud_server CLOUD 1 SECURE 0 CREATE 1 Create resource When hub backend cloud_server binary running use hub client create resource Create go grpc client Go grpc client simple tool supports several useful commands combine create resource Use command identify collection device command retrieves data available devices correctly call create command device id href properties necessary output find item type oic wk col retrieves resources devices grpc get Output content content_type application vnd ocf cbor data n 8 resource_id device_id 2b9ed3ed ddf3 4c9c 4d21 9ec1f6ba6b03 href switches status 1 types oic wk col Create binary switch resource collection grpc create deviceid 2b9ed3ed ddf3 4c9c 4d21 9ec1f6ba6b03 href switches resource static ocresourcet newswitchinstance const char href ocstringarray_t types ocresourcepropertiest bm ocinterfacemaskt iface_mask size_t device ocresourcesetrequesthandler cswitch resource OCGET getcswitch cswitch set delete handler created resource ocresourcesetrequesthandler cswitch resource OCDELETE deletecswitch cswitch ocresourcesetrequesthandler cswitch resource OCPOST postcswitch cswitch Delete go grpc client Delete created binary switch resource collection grpc delete deviceid 2b9ed3ed ddf3 4c9c 4d21 9ec1f6ba6b03 href 4rLN4BlwJmFmbbMJblChB2kyT2zJEP", + "content": "Creating resources Device collection resource allows dynamic creation resources created resource defined type see call occollectionsaddrtfactory Guide created resources contained within collection create resource develop own device check example cloud_server Lets examine code identify necessary steps allow device dynamically create resources collection Create collection resource ocresourcet col ocnewcollection NULL switches 1 0 ocresourcebindresourcetype col oic wk col precise description arguments given functions please refer iotivity lite documentation Determine resource types populate collection occollectionaddsupportedrt col oic r switch binary Supported resource types visible oic if baseline interface rts property collection Enable create operation collection resource ocresourcebindresourceinterface col OCIFCREATE Supporting creating resources visible oic if baseline interface property collection support creation resources property contain oic if create interface Define constructor destructor occollectionsaddrtfactory oic r switch binary newswitchinstance freeswitchinstance typedef struct ocswitcht struct ocswitcht next ocresourcet resource bool state ocswitcht OCMEMB switches ocswitcht 1 OC_LIST switches static ocresourcet newswitchinstance const char href ocstringarray_t types ocresourcepropertiest bm ocinterfacemaskt iface_mask size_t device ocswitcht cswitch ocswitcht ocmemballoc switch_s cswitch cswitch resource ocnewresource NULL href ocstringarraygetallocated_size types device cswitch resource size_t i i 0 resource rt ocresourcebindresourceinterface cswitch resource iface_mask cswitch resource properties bm ocresourcesetdefaultinterface cswitch resource OCIFA ocresourcesetrequesthandler cswitch resource OCGET getcswitch cswitch ocresourcesetrequesthandler cswitch resource OCDELETE deletecswitch cswitch ocresourcesetrequesthandler cswitch resource OCPOST postcswitch cswitch ocresourcesetpropertiescbs cswitch resource getswitchproperties cswitch setswitchproperties cswitch ocaddresource cswitch resource ocsetdelayedcallback cswitch resource registerto_cloud 0 oclistinsert switches prev cswitch return cswitch resource ocmembfree switch_s cswitch return NULL static void freeswitchinstance ocresourcet resource ocswitcht cswitch ocswitcht oclisthead switches cswitch cswitch resource resource ocdeleteresource resource oclistremove switches cswitch ocmembfree switch_s cswitch return cswitch oclistitem_next cswitch Compile link enable create operation iotivity lite library compile CREATE 1 option cloud_server CLOUD 1 SECURE 0 CREATE 1 Create resource When hub backend cloud_server binary running use hub client create resource Create go grpc client Go grpc client simple tool supports several useful commands combine create resource Use command identify collection device command retrieves data available devices correctly call create command device id href properties necessary output find item type oic wk col retrieves resources devices grpc get Output content content_type application vnd ocf cbor data n 8 resource_id device_id 2b9ed3ed ddf3 4c9c 4d21 9ec1f6ba6b03 href switches status 1 types oic wk col Create binary switch resource collection grpc create deviceid 2b9ed3ed ddf3 4c9c 4d21 9ec1f6ba6b03 href switches resource static ocresourcet newswitchinstance const char href ocstringarray_t types ocresourcepropertiest bm ocinterfacemaskt iface_mask size_t device ocresourcesetrequesthandler cswitch resource OCGET getcswitch cswitch set delete handler created resource ocresourcesetrequesthandler cswitch resource OCDELETE deletecswitch cswitch ocresourcesetrequesthandler cswitch resource OCPOST postcswitch cswitch Delete go grpc client Delete created binary switch resource collection grpc delete deviceid 2b9ed3ed ddf3 4c9c 4d21 9ec1f6ba6b03 href 4rLN4BlwJmFmbbMJblChB2kyT2zJEP", "objectID": "en/docs/tutorials/create-delete-device-resources", "description": "Understand how to create and delete resources hosted by the device dynamically", "date": "2021-05-13", @@ -1539,7 +1539,7 @@ { "title": "Branding dashboard", "uri": "en/docs/tutorials/dashboard-branding", - "content": "plgd hub customization UI company possible includes ability modify logo colors even switch own preferred theme Theme create own theme follow steps Clone repository running following command git clone recursive branch v2 15 0 https github com plgd dev hub git Navigate cloned directory install necessary packages cd hub http gateway web npm install Create own theme within packages shared ui src components Atomic theme mycompany ts directory refer packages shared ui src components Atomic theme plgd ts example cp packages shared ui src components Atomic theme plgd ts packages shared ui src components Atomic theme mycompany ts Build theme executing following command node packages shared ui scripts build theme js themes mycompany generated theme will stored public theme theme json implement changes refresh UI two options First set theme JSON format using Values httpgateway ui theme Helm values file Alternatively directly replace file Docker image path usr local var www theme theme json Favicon favicon png need adjust CSS order Logo rendered correctly size different recommended one modify values left panel scss look classes logo big logo small Adjust height classes fit needs Application name application name appears title bar changed modifying appName field config js Header Status Bar header dedicated component found status bar js modify status bar removing existing components LanguageSwitcher UserWidget adding different content header Footer Footer dedicated component found footer js modify footer tag removing already present links simply adding different content next them Text changes Every text application coming translation file located langauges json object contains language block language support application block missing duplicate existing block modify block language code missing messages missing due fact not yet translated add manually use language editor POEditor override strings fit need example Lights name menu call Devices find key menu devices change its value Lights", + "content": "plgd hub customization UI company possible includes ability modify logo colors even switch own preferred theme Theme create own theme follow steps Clone repository running following command git clone recursive branch v2 15 0 https github com plgd dev hub git Navigate cloned directory install necessary packages cd hub http gateway web npm install Create own theme within packages shared ui src components Atomic theme mycompany ts directory refer packages shared ui src components Atomic theme plgd ts example cp packages shared ui src components Atomic theme plgd ts packages shared ui src components Atomic theme mycompany ts Build theme executing following command node packages shared ui scripts build theme js themes mycompany generated theme will stored public theme theme json implement changes refresh UI two options First set theme JSON format using Values httpgateway ui theme Helm values file Alternatively directly replace file Docker image path usr local var www theme theme json Favicon favicon png need adjust CSS order Logo rendered correctly size different recommended one modify values left panel scss look classes logo big logo small Adjust height classes fit needs Application name application name appears title bar changed modifying appName field config js Header Status Bar header dedicated component found status bar js modify status bar removing existing components LanguageSwitcher UserWidget adding different content header Footer Footer dedicated component found footer js modify footer tag removing already present links simply adding different content next them Text changes Every text application coming translation file located languages json object contains language block language support application block missing duplicate existing block modify block language code missing messages missing due fact not yet translated add manually use language editor POEditor override strings fit need example Lights name menu call Devices find key menu devices change its value Lights", "objectID": "en/docs/tutorials/dashboard-branding", "description": "Change dashboard colors and logo to brand it for your presentation", "date": "2021-05-13",