Skip to content

Application Configuration

Introduction

The Mideye Server uses a .yml file called 'application-prod.yml' to store its configuration in. Within this file there are several values that can be customised to suit your specific configuration type. The values that can be configured are for example: 'databaseName', 'port' and 'token-validity-in-seconds'.

Below is an example of a 'application-prod.yml' file:

# ===================================================================
# Spring Boot configuration for the "prod" profile.
#
# This configuration overrides the application.yml file.
#
# More information on profiles: https://www.jhipster.tech/profiles/
# More information on configuration properties: https://www.jhipster.tech/common-application-properties/
# ===================================================================

# ===================================================================
# Standard Spring Boot properties.
# Full reference is available at:
# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html
# ===================================================================

spring:
    devtools:
        restart:
            enabled: false
        livereload:
            enabled: false
    datasource:
        type: com.zaxxer.hikari.HikariDataSource
        # If you use the Docker Compose configuration provided by JHipster, the database name is "tempdb"
        # So you should use url: jdbc:sqlserver://localhost:1433;database=tempdb
        #    url: jdbc:sqlserver://localhost:1433;database=mideye
        #   Use jtds to support Windows Authentication
        #
        # PLEASE NOTE:
        # The database password must always be enclosed in single quotes (').
        # If your database password contains any single quotes ('), then you insert two single quotes
        # for every single quote i.e. Pass''word123 if your password is Pass'word123
        driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
        url: jdbc:sqlserver://localhost:1433;databaseName=mideyedb;authenticationScheme=NTLM;useNTLMv2=true;user=PLACEHOLDER_DO_NOT_CHANGE_OR_REMOVE;password=PLACEHOLDER_DO_NOT_CHANGE_OR_REMOVE
        username: "admin"
        password: 'password'
        hikari:
            # Below line is required for jtds JDBC driver connection checks to work with Liquibase.
            # See https://github.com/spring-projects/spring-boot/issues/7404 for more info
            connection-test-query: SELECT 1
            initializationFailTimeout: 10000
            data-source-properties:
                cachePrepStmts: true
                prepStmtCacheSize: 250
                prepStmtCacheSqlLimit: 2048
                useServerPrepStmts: true
    jpa:
    liquibase:
        contexts: prod
    mail:
        host: localhost
        port: 25

# ===================================================================
# To enable SSL, generate a certificate using:
# keytool -genkey -alias mideyeserver -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 3650
#
# You can also use Let's Encrypt:
# https://maximilian-boehm.com/hp2121/Create-a-Java-Keystore-JKS-from-Let-s-Encrypt-Certificates.htm
#
# Then, modify the server.ssl properties so your "server" configuration looks like:
#
# server:
#    port: 443
#    ssl:
#        key-store: keystore.p12
#        key-store-password: <your-password>
#        key-store-type: PKCS12
#        key-alias: mideyeserver
#        # The ciphers suite enforce the security by deactivating some old and deprecated SSL cipher, this list was tested against SSL Labs (https://www.ssllabs.com/ssltest/)
#        ciphers: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 ,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 ,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 ,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,TLS_RSA_WITH_CAMELLIA_256_CBC_SHA,TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
# ===================================================================

server:
    port: 443
    ssl:
        key-store: C:\Program Files (x86)\Mideye Server 6\config\keystore.pfx
        key-store-password: "aNbJlEYxQGrer3o"
        enabled: true
        key-alias: webadmin
    compression:
        enabled: true
        mime-types: text/html,text/xml,text/plain,text/css, application/javascript, application/json
        min-response-size: 1024

# ===================================================================
# JHipster specific properties
#
# Full reference is available at: https://www.jhipster.tech/common-application-properties/
# ===================================================================

jhipster:
    http:
        cache: # Used by the CachingHttpHeadersFilter
            timeToLiveInDays: 1461
    security:
        authentication:
            jwt:
                # Token is valid 1 hour
                token-validity-in-seconds: 3600
                token-validity-in-seconds-for-remember-me: 3600
    mail: # specific JHipster mail property, for standard properties see MailProperties
        from: MideyeServer@localhost
        base-url: http://my-server-url-to-change # Modify according to your server's URL
    logging:
        logstash: # Forward logs to logstash over a socket, used by LoggingConfiguration
            enabled: false
            host: localhost
            port: 5000
            queue-size: 512

# ===================================================================
# Application specific properties
# Add your own application properties here, see the ApplicationProperties class
# to have type-safe configuration, like in the JHipsterProperties above
#
# More documentation is available at:
# https://www.jhipster.tech/common-application-properties/
# ===================================================================

application:
    switch-host: primary.mideye.com
    switch-backup-host: secondary.mideye.com
    switch-port: 202207
    log-path: C:\Program Files (x86)\Mideye Server 6\log


Changing Port

Usually the port is assigned during the installation of the Mideye Server, but it is possible to change port of the Mideye Server post installation. Start by heading to where the 'application-prod.yml' is located (default path: C:\Program Files (x86)\Mideye Server 6\config).

From there, open up the .yml file and scroll down to the server part of the 'application-prod' file:

server:
    port: 443
    ssl:
        key-store: C:\Program Files (x86)\Mideye Server 6\config\keystore.pfx
        key-store-password: "GrxE3beQalYrJNo"
        enabled: true
        key-alias: webadmin
    compression:
        enabled: true
        mime-types: text/html,text/xml,text/plain,text/css, application/javascript, application/json
        min-response-size: 1024
Here, change the 'port:' part of the file to the port that should be used instead. Default when installing the Mideye Server will be 'Port: 443'.


Enable Self-service Portal

The self-service portal is disabled by default, but this can be enabled by adding the following line:

    use-self-service-portal: true

Under the 'application' part of the yaml file. After adding it, the application section should look like this:

application:
    switch-host: primary.mideye.com
    switch-backup-host: secondary.mideye.com
    switch-port: 202207
    log-path: C:\Program Files (x86)\Mideye Server 6\log
    use-self-service-portal: true

Server Information Transmission

Starting with Mideye Server 6.2, the server automatically sends its information to the Mideye switch by default.

Disabling Automatic Information Transmission

If you prefer to disable this feature, you can do so by adding the following line to your configuration file:

server-info:
  enabled: true
  include-database-info: false

This should be added under the 'application' part of the yaml file. Once added it should look like this:

application:
    switch-host: primary.mideye.com
    switch-backup-host: secondary.mideye.com
    switch-port: 202207
    log-path: C:\Program Files (x86)\Mideye Server 6\log
    server-info:
        enabled: true
        include-database-info: false