-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add general uri4files feature description (#1194)
* docs: Add general uri4files feature description Closes #1193 Signed-off-by: Elizabeth J Lee <[email protected]>
- Loading branch information
Showing
2 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,3 +84,48 @@ All services have the ability to collect the following common service metrics | |
- **SecuritySecretsStored** - Count of secret stored to the service's Secret Store. | ||
- **SecurityConsulTokensRequested** - Count of Consul tokens been requested. | ||
- **SecurityConsulTokenDuration** - Duration of obtaining Consul token. | ||
|
||
## URI for Files | ||
|
||
Different files like configurations, units of measurements, device profiles, device definitions, and provision watchers can be loaded either from the local file system or from a remote location. | ||
For the remote location, HTTP and HTTPS URIs are supported. When using HTTPS, certificate validation is performed using the system's built-in trust anchors. | ||
|
||
### Authentication | ||
|
||
#### username-password in URI (not recommended) | ||
|
||
Users can specify the username-password (`<username>:<password>@`) in the URI as plain text. | ||
This is ok network wise when using HTTPS, but if the credentials are specified in configuration or other service files, this is not a good practice to follow. | ||
|
||
!!! example "Example - configuration file with plain text `username-password` in URI" | ||
``` | ||
[UoM] | ||
UoMFile = "https://myuser:[email protected]/uom.yaml" | ||
``` | ||
|
||
#### Secure Credentials (preferred) | ||
|
||
The `edgexSecretName` query parameter can be specified in the URI as a secure way for users to specify credentials. | ||
When running in secure mode, this parameter specifies a Secret Name from the service's Secret Store where the credentials must be [seeded](../../security/SeedingServiceSecrets.md#seeding-service-secrets). | ||
If insecure mode is running, `edgexSecretName` must be specified in the [InsecureSecrets](../configuration/CommonConfiguration.md#common-configuration-properties) section of the configuration. | ||
|
||
!!! example "Example - configuration file with `edgexSecretName` query parameter" | ||
``` | ||
[UoM] | ||
UoMFile = "https://example.com/uom.yaml?edgexSecretName=mySecretName" | ||
``` | ||
|
||
The authentication type and credentials are contained in the secret data specified by the Secret Name. | ||
Only `httpheader` is currently supported. The `headername` specifies the authentication method (ie Basic Auth, API-Key, Bearer) | ||
|
||
!!! example "Example - secret data using `httpheader`" | ||
``` | ||
type=httpheader | ||
headername=<name> | ||
headercontents=<contents> | ||
``` | ||
For a request header set as: | ||
``` | ||
GET https://example.com/uom.yaml HTTP/1.1 | ||
<name>: <contents> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters