Configuration of the SmartWeb Application

Configuration of the SmartWeb Application

SmartWeb is a Spring Boot 4.x application (Java 21) that is started as a self-contained executable JAR (smartweb.jar) with an embedded Apache Tomcat, or alternatively as a WAR deployed into a standalone Tomcat. All runtime behaviour — connection to D2000, authentication, API exposure (REST, CometD, gRPC, OData, OpenAPI, OAuth2), connectors, monitoring — is controlled by a single configuration file application.yaml.

Location of the configuration file

Deployment

Location of application.yaml

Deployment

Location of application.yaml

Standalone JAR

<jar-dir>/config/application.yaml

OCI / container image

/config/application.yaml

WAR in external Tomcat

<tomcat>/conf/applications/<war-name>/application.yaml

On the first start, SmartWeb auto-generates a default application.yaml from an internal template if no configuration file is found. A legacy smartweb.json (used in older versions) is automatically migrated to YAML on first start.

The configuration file can be modified while the server is running; changes take effect only after the SmartWeb application is restarted (redeployed).

Top-level structure

All SmartWeb-specific properties are bound under the smartweb. prefix. The general structure is:

server: port: 8443 ssl: # Embedded Tomcat TLS — affects HTTPS for REST, CometD, OData, OpenAPI, OAuth2, admin console enabled: true key-store: config/cert/keystore.p12 key-store-type: PKCS12 key-store-password: changeit key-alias: smartweb smartweb: # D2000 JAPI connections (direct or listenable) — see "Connection Configuration on D2000" connections: [ ... ] listenableConnection: { ... } # EDA (Energy Data Archive) connection — see "Configuration of the EDA Server Connection" edaConnection: { ... } # Authentication: D2000 users, applicative users, API keys, OAuth2 JWT, SPNEGO, client certificates authentication: { ... } application: # Universal API interfaces REST, CometD, gRPC and OpenAPI — see "Universal API Configuration" restApi: { ... } cometApi: { ... } grpcApi: { ... } openApi: { ... } # OAuth2 token endpoint — see "OAuth2 API Configuration" oauth2: { ... } # Web Push, D2 service, OpenAPI, SmartWeb federation connectors — see "Connectors Configuration" connectors: { ... } # VAPID keys for Web Push notifications — see "Web Push Configuration" api: vapid: { ... } # Web application sources and development hot-reload — see "Web Application Configuration" webResourceDirectories: [ ... ] development: { ... } # Thin Client URL — see "Configuration of the Integration with a Thin Client" tcl: { ... } # Embedded Logback log levels logging: level: root: INFO com.ipesoft.smartweb: INFO

The individual configuration sections are described in the following chapters:

Section

Page

Section

Page

Connection to the D2000 kernel (JAPI)

Connection Configuration on D2000

Connection to the EDA server

Configuration of the EDA Server Connection

Authentication (D2000, RPC, API keys, OAuth2, certificates, SPNEGO)

Configuration of Authentication

Universal API interfaces (REST, CometD, gRPC, OData, OpenAPI)

Universal API Configuration

OAuth2 token endpoint and SmartWeb Proxy

OAuth2 and SmartWeb Proxy Configuration

Web Push notifications (VAPID)

Web Push Configuration

D2 service, OpenAPI and SmartWeb federation connectors

Connectors Configuration

Web application sources and development hot-reload

Configuration of a Web Application and Support of its Development

Thin Client integration

Configuration of the Integration with a Thin Client

[!NOTE] All examples in the following chapters use YAML. The legacy smartweb.json format is still accepted as input and is migrated to YAML on first startup. New deployments should always use YAML.