-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d6a6630
commit 0b0e572
Showing
5 changed files
with
100 additions
and
18 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
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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Console Configuration | ||
|
||
Console can be configured using either a YAML configuration file (`config.yml`) or environment variables (`.env`). Both methods allow you to customize the behavior of the Console application. | ||
|
||
## Using config.yml | ||
|
||
When you first run the Console, a `config.yml` file is generated and stored in the `config/` directory, located in the same directory as the Console executable. You can stop the Console, edit the config.yml file, and then restart the Console to apply the changes. | ||
|
||
Alternatively, you can also download the `config.yml` file from [GitHub](https://github.com/open-amt-cloud-toolkit/console/blob/main/config/config.yml) or create your own configuration file, edit the YAML content, and then use the `config` flag to run the Console `console.exe -config /path/to/config.yml`. | ||
|
||
## Using .env Variables | ||
|
||
Console can also be configured using environment variables. These `.env` variables take precedence over the corresponding settings in the `config.yml` file, effectively overwriting them. | ||
|
||
## Configuration Variables | ||
|
||
| `.env` Variable Name | `config.yml` Variable Name | Default | Description | | ||
|-------------------|----------------------------|----------|-------------| | ||
| APP_NAME | app.name | console | Name of the application. | | ||
| APP_REPO | app.repo | open-amt-cloud-toolkit/console | Repository path of the application. | | ||
| APP_ENCRYPTION_KEY | app.encryption_key | No Value | A 32-character long encryption key is automatically generated by Console if not provided by the user. This key is used to encrypt and protect sensitive data stored in SQLite DB. | | ||
| APP_JWT_KEY | app.jwtKey | `your_secret_jwt_key` | Secret key for JWT token generation. | | ||
| APP_AUTH_DISABLED | app.authDisabled | `false` | When set to true, this will disable authentication for the Console. During the Beta release, the Console UI will not be accessible if this is set to true. | | ||
| APP_ADMIN_USERNAME | app.adminUsername | `standalone` | Admin username for accessing Console. | | ||
| APP_ADMIN_PASSWORD | app.adminPassword | `G@ppm0ym` | Admin password for accessing Console. | | ||
| APP_JWT_EXPIRATION | app.jwtExpiration | `24h0m0s` | This setting determines the default expiration time for JWT tokens used for Console login sessions. It controls how long a user's login session will remain valid. | | ||
| APP_REDIRECTION_JWT_EXPIRATION | app.redirectionJWTExpiration | `5m0s` | This setting determines the expiration time for redirection JWT tokens, which are used for features like KVM, SOL, and IDER. It controls how long these redirection sessions will remain valid. | | ||
| HTTP_HOST | http.host | `localhost` | By default, Console listens only on `localhost`, restricting network access. For now, it's recommended to keep Console accessible only from `localhost` until HTTPS is available to ensure secure access.| | ||
| HTTP_PORT | http.port | `8181` | This is the port on which the Console HTTP server will listen. Users will access the Console UI through this port in their browser. | | ||
| HTTP_ALLOWED_ORIGINS | http.allowed_origins | `*` | Allowed origins for CORS policy. | | ||
| HTTP_ALLOWED_HEADERS | http.allowed_headers | `*` | Allowed headers for CORS policy. | | ||
| LOG_LEVEL | logger.log_level | `info` | Controls the level of logging. Options: `error`, `warn`, `info`, `debug`, `fatal`. | | ||
| DB_POOL_MAX | postgres.pool_max | `2` | Maximum number of database connections in the pool. | | ||
| DB_URL | Not available | No Value | By default, Console uses a SQLite database to store device data locally. Users can optionally configure this variable to provide a PostgreSQL connection string, enabling the use of an external PostgreSQL database for data storage. This allows for greater scalability and centralized database management. | | ||
| EA_URL | ea.url | `http://localhost:8000` | URL for the Enterprise Assistant service. | | ||
| EA_USERNAME | ea.username | No Value | Username for the Enterprise Assistant service. | | ||
| EA_PASSWORD | ea.password | No Value | Password for the Enterprise Assistant service. | | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Upgrading Console | ||
|
||
## Overview | ||
We plan to provide a seamless upgrade path from the MVP or v1.0 release, ensuring that no database deletion is required. | ||
|
||
## Upgrading from Alpha to Beta | ||
|
||
Starting from Beta release, all sensitive data in the SQLite database will be encrypted using an encryption key. Due to this security enhancement, you'll need to delete the existing database file before upgrading. | ||
|
||
### Steps to Delete Database | ||
|
||
1. Navigate to the directory where the `console` database file is stored: | ||
|
||
=== "Windows" | ||
``` | ||
%APPDATA%\device-management-toolkit | ||
``` | ||
|
||
=== "Ubuntu" | ||
``` | ||
~/.config/device-management-toolkit | ||
``` | ||
|
||
=== "MAC" | ||
``` | ||
~/LIbrary/Application Support/device-management-toolkit | ||
``` | ||
|
||
2. Delete the `console` database file. | ||
|
||
|
||
### Add all the devices | ||
After deleting the database and running the Console executable, you'll need to reconfigure or add all your devices again, as the previous data cannot be migrated due to the encryption changes. |
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