Initial server configuration
In order to configure the Toolbox Enterprise Server, you need to create an application.yaml file. Your server will process and retrieve essential configurations by leveraging the capabilities of SpringFramework.
Within the application.yaml file, you can define a wide range of settings, including secrets, authorization and authentication details, object storage parameters, database and logging options, and more.
The server application is capable of processing multiple configuration files. If you have several versions of application.yaml, Toolbox Enterprise uses the last file in the list to eliminate conflicts. To pass configuration files to the Toolbox Enterprise Server, add the SPRING_CONFIG_ADDITIONAL-LOCATION
environment variable and list the necessary files using commas as separators.
Create and fill in application.yaml following the example below. This example configuration only includes the required parameters.
note
The configuration format allows for using
${property references}
.
server:
port: 8080
#ssl:
# enabled: true
# key-store-type: "PKCS12"
# key-store-password: "tbe-server"
tbe:
deployment:
url: "https://TODO" ### Use the public server URL here, https is highly advised
db:
host: "postgresql:5432"
database: "toolbox"
user: "username"
password: "password"
storage:
type: s3
minio:
url: "https://minio"
bucket: "toolbox"
access-key: "username"
secret-key: "password"
# s3-region: 'eu-west-1' # optional
auth:
# See the examples of OAuth2 service configuration
login-url: "http://localhost:8085/auth/realms/toolbox/protocol/openid-connect/auth"
token-url: "http://mock-auth:8085/auth/realms/toolbox/protocol/openid-connect/token"
jwt-certs-url: "http://mock-auth:8085/auth/realms/toolbox/protocol/openid-connect/certs"
client-id: "tbe-server"
client-secret: "123456"
root-admin-emails:
- 'toolbox.admin@example.com'
springdoc:
api-docs:
enabled: true # Enable OpenAPI documentation at /swagger-ui.html
logging:
level:
root: INFO # can be changed to WARN/DEBUG/TRACE
There are different ways to extract passwords from the configuration file:
Using environment variables in the Docker container: You can set the password as an environment variable, such as
S3_SECRET_KEY
, and reference it in the Toolbox Enterprise configuration files using the following syntax:secret-key: "${S3_SECRET_KEY}"
Utilizing the Spring Boot configuration tree feature: In this scenario, Kubernetes mounts passwords to multiple files, and SpringFramework loads these files as properties. In certain cases, you may need to use
${interpolation}
to ensure the correct configuration.To include the secrets from the mounted files, set the
SPRING_CONFIG_ADDITIONAL-LOCATION
environment variable with the configuration file paths. You can use a special path likeconfigtree:/secrets/*/
for this purpose.
This group of properties allows for embedded server configuration. For more information, refer to the Spring Boot documentation.
- cwm.lobby.license-bundles.license1
Specify your Code With Me Enterprise license as a value.
warning
To keep your license information safe from unauthorized access, keep this secret in a secure location and don't share it with anyone.
- cwm.lobby.relay-ecdsa-key
Specify your ECDSA private key without any passphrase to prevent unauthorized access to a relay server.
The length of the ECDSA private key file is 384-bit. The format of this file is PEM, and the file can be generated with OpenSSL.
- lv.server.token-signing-secret
Used to sign and verify the validity of the JWT token for authorized access to the License Vault API.
Provide a randomly generated string of 32 or more characters. The string should only include Latin characters (a–z, A–Z) and digits (0–9).
warning
To keep your license information safe from unauthorized access, keep this secret in a secure location and don't share it with anyone.
This group of properties allows you to enable and configure the offline mode capabilities for Toolbox Enterprise.
Use the Spring Cloud Gateway properties to configure traffic routing through a proxy and provide the necessary authentication credentials. For more information, refer to the Spring Cloud Gateway documentation.
- spring.cloud.gateway.httpclient.proxy.username
Specify the username for Netty HttpClient proxy configuration.
- spring.cloud.gateway.httpclient.proxy.password
Specify the password for Netty HttpClient proxy configuration.
- spring.cloud.gateway.httpclient.proxy.port
Specify the port for Netty HttpClient proxy configuration.
- tbe.db.database
Specify the name of the PostgreSQL database, to which the Toolbox Enterprise Server should connect and use.
- tbe.db.repair
Optional
Controls whether the Toolbox Enterprise Server attempts to perform a flyway repair before running database migrations.
warning
Only enable this option if your database is corrupted, and you know how to handle it.
note
If you want to use S3-compatible storage as your primary object storage, make sure to specify
s3
as a value of thetbe.storage.type
property.
- tbe.minio.s3-region
Specify a region that you selected during S3 bucket creation. The default value is
us-east-1
.- tbe.minio.use-s3-auto-configuration
If selected, the Toolbox Enterprise Server uses the values of environment variables propagated from AWS to access your S3 bucket.
- tbe.minio.max-retries
Specify a number of tries to connect to your S3 bucket when starting the application.
- tbe.minio.retry-base-delay
Set the standard amount of time to wait before trying again to connect to your S3 bucket.
note
If you want to use Azure as your primary object storage, make sure to specify
azure
as a value of thetbe.storage.type
property.
In order to connect to Azure object storage, you need to provide either a connection string or a combination of the account name, key, and endpoint.
- tbe.azure.connection-string
Provide a connection string to authorize requests to Azure storage.
- tbe.auth.token-url
Provide a URL for obtaining an authorization token on the side of your OAuth2 provider.
- tbe.auth.jwt-certs-url
Specify a URL to the JSON Web Key (JWK) set that is used to validate JSON Web Tokens (JWT).
- tbe.auth.client-id
Specify a public identifier for Toolbox Enterprise that you set when configuring your OAuth2 provider.
- tbe.auth.client-secret
Specify a secret for Toolbox Enterprise that you set when configuring your OAuth2 provider.
- tbe.auth.required-scopes
Define scopes that will be available to Toolbox Enterprise when accessing a user account.
- tbe.auth.root-admin-subjects
List OAuth2 subjects (ids) that will receive admin rights.
Mandatory for: Space.
- tbe.download.cdn-redirect-mode
Defines how Toolbox Enterprise processes requests to download IDEs coming from the Toolbox App.
Possible values:
redirect_to_service
: specify this option if you want to send requests directly to the binary source, such as JetBrains Marketplace or your object storage. Use this option only if the binary source is accessible from developer machines.handle_redirects
: specify this option if you want to use the Toolbox Enterprise Server as a proxy for requests to the binary source. Use this option if developer machines don't have direct access to the binary source (for example, if you use any proxy service for your object storage). The Toolbox Enterprise Server will handle redirects in this case.note
Using this option causes the Toolbox Enterprise Server to act as a proxy, which may result in consuming more resources due to the additional processing and handling of download requests.
- tbe.ij-plugins.cdn-redirect-mode
Defines how Toolbox Enterprise processes requests to download plugins coming from an IDE.
Possible values:
redirect_to_service
: specify this option if you want to send requests directly to the binary source, such as JetBrains Marketplace or your object storage. Use this option only if the binary source is accessible from developer machines.handle_redirects
: specify this option if you want to use the Toolbox Enterprise Server as a proxy for requests to the binary source. Use this option if developer machines don't have direct access to the binary source (for example, if you use any proxy service for your object storage). The Toolbox Enterprise Server will handle redirects in this case.note
Using this option causes the Toolbox Enterprise Server to act as a proxy, which may result in consuming more resources due to the additional processing and handling of download requests.
- tbe.tbe-ij-plugin.tbe-plugin-repository-type
Specify the source for obtaining plugins. Possible values:
TBE
: specify this option if you want Toolbox Enterprise to install plugins from the local plugin repository. Use this option when working in offline mode.MARKETPLACE
: specify this option if you want Toolbox Enterprise to look for plugins externally in the marketplace.
- tbe.tbe-ij-plugin.cdn-redirect-mode
Defines how Toolbox Enterprise processes requests to download plugins coming from the Toolbox App.
Possible values:
redirect_to_service
: specify this option if you want to send requests directly to the binary source, such as JetBrains Marketplace or your object storage. Use this option only if the binary source is accessible from developer machines.handle_redirects
: specify this option if you want to use the Toolbox Enterprise Server as a proxy for requests to the binary source. Use this option if developer machines don't have direct access to the binary source (for example, if you use any proxy service for your object storage). The Toolbox Enterprise Server will handle redirects in this case.note
Using this option causes the Toolbox Enterprise Server to act as a proxy, which may result in consuming more resources due to the additional processing and handling of download requests.
- spring.r2dbc.pool.max-size
Set the maximum size of the R2DBC connection pool. Defaults to 20.
For more details, refer to the R2DBC pool documentation.
- spring.r2dbc.pool.max-idle-time
Set the maximum idle time of the connection in the pool. Negative values indicate no timeout. Defaults to 30 minutes. This value is used as an interval for background eviction of idle connections unless configuring
backgroundEvictionInterval
.For more details, refer to the R2DBC pool documentation.