Studio’s Configuration Overrides

Crafter Studio comes with pre-configured settings that you may want to override. To view the pre-configured settings in Crafter Studio, in your Authoring installation, go to webapps/studio/WEB-INF/classes/crafter/studio and open the file studio-config.yaml.

To override any of the pre-configured settings, in your Authoring installation, go to shared/classes/crafter/studio/extension and add the settings you would like to configure in the file studio-config-override.yaml. The override file have some settings already listed that you may want to override in Crafter Studio:

Content Repository Configuration

The following section of Studio’s configuration overrides allows you to do the following:

  • studio.repo.basePath allows you to set your repository base
  • studio.repo.siteSandboxBranch allows you to set the default branch to be used by sandbox
  • studio.repo.published.live and studio.repo.published.staging allows you to set the branch for your environments
shared/classes/crafter/studio/extension/studio-config-override.yaml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
##################################################
##              Content Repository              ##
##################################################
# Absolute or relative path to repository base (all actual repositories will be under this)
studio.repo.basePath: ../data/repos
# Sandbox Git repository branch for every site
# studio.repo.siteSandboxBranch: master
# If not using environment-config.xml, environments are configured here
# Git repository branch for the `live` environment, default "live"
# studio.repo.published.live: live
# Git repository branch for the `staging` environment, default "staging"
# studio.repo.published.staging: staging

Preview Deployer Configuration

The following section of Studio’s configuration overrides allows you to setup your deployer urls

shared/classes/crafter/studio/extension/studio-config-override.yaml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
############################################################
##                    Preview Deployer                    ##
############################################################

# Default preview deployer URL (can be overridden per site)
studio.preview.defaultPreviewDeployerUrl: http://localhost:9191/api/1/target/deploy/preview/{siteName}
# Default preview create target URL (can be overridden per site)
studio.preview.createTargetUrl: http://localhost:9191/api/1/target/create
# Default preview create target URL (can be overridden per site)
studio.preview.deleteTargetUrl: http://localhost:9191/api/1/target/delete/{siteEnv}/{siteName}
# URL to the preview Crafter Engine
studio.preview.engineUrl: http://localhost:8080
# URL to the preview repository (aka Sandbox) where authors save work-in-progress
studio.preview.repoUrl: ../data/repos/sites/{siteName}/sandbox

Preview Search Configuration

The following section of Studio’s configuration overrides allows you to setup urls for search in preview

shared/classes/crafter/studio/extension/studio-config-override.yaml
1
2
3
4
5
6
############################################################
##                   Preview Search                       ##
############################################################

studio.preview.search.createUrl: http://localhost:8080/crafter-search/api/2/admin/index/create
studio.preview.search.deleteUrl: http://localhost:8080/crafter-search/api/2/admin/index/delete/{siteName}

Database Configuration

The following section of Studio’s configuration overrides allows you to setup the database url, port number, connection string to initialize the database and path

shared/classes/crafter/studio/extension/studio-config-override.yaml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
##################################################
##                   Database                   ##
##################################################

# Format:
# jdbc:DATABASE_PLATFORM;databaseName=DATABASE_NAME;create=true;user=DATABASE_USERNAME;password=DATABASE_USER_PASSWORD
# Note that a relative path is not suitable for a production deployment
studio.db.url: jdbc:mariadb://127.0.0.1:33306/crafter?user=crafter&password=crafter

# Connection string used to initialize database
studio.db.initializer.url: jdbc:mariadb://127.0.0.1:33306?user=root&password=
# Port number for the embedded database (note this must match what's in the connection URLs in this config file)
studio.db.port: 33306
# Data folder for the embedded database
studio.db.dataPath: ../data/db
# Socket path for the embedded database
studio.db.socket: /tmp/MariaDB4j.33306.sock

Security Configuration

The following section of Studio’s configuration overrides allows you to randomize the admin password on a fresh install (for more information, see: Randomize “admin” Password for Crafter CMS Fresh Install), configure encryption and configure authentication method to be used (for more informations, see: Configuring Studio Security).

shared/classes/crafter/studio/extension/studio-config-override.yaml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
##################################################
##                   Security                   ##
##################################################
# Enable random admin password generation
# studio.db.initializer.randomAdminPassword.enabled: false
# Random admin password length
# studio.db.initializer.randomAdminPassword.length: 16
# Random admin password allowed chars
# studio.db.initializer.randomAdminPassword.chars: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*_=+-/

# Salt for encrypting
# studio.security.cipher.salt: TDEsDF8vx3gV4c7G
# Key for encrypting
# studio.security.cipher.key: AoCcBdnsTa9R3DdG

# Defines security provider for accessing repository. Possible values
# - db (users are stored in database)
# - ldap (users are imported from LDAP into the database)
# - headers (use when authenticating via headers)
# studio.security.type: ldap

# LDAP Server url
# studio.security.ldap.serverUrl: ldap://localhost:389
# LDAP bind DN (user)
# studio.security.ldap.bindDN: cn=Manager,dc=my-domain,dc=com
# LDAP bind password
# studio.security.ldap.bindPassword: secret
# LDAP base context (directory root)
# studio.security.ldap.baseContext: dc=my-domain,dc=com
# LDAP username attribute
# studio.security.ldap.userAttribute.username: uid
# LDAP first name attribute
# studio.security.ldap.userAttribute.firstName: cn
# LDAP last name attribute
# studio.security.ldap.userAttribute.lastName: sn
# LDAP email attribute
# studio.security.ldap.userAttribute.email: mail
# LDAP site ID attribute
# studio.security.ldap.userAttribute.siteId: crafterSite
# LDAP site ID attribute name regex
# studio.security.ldap.userAttribute.siteId.regex: .*
# LDAP site ID attribute match index
# studio.security.ldap.userAttribute.siteId.matchIndex: 0
# LDAP group name match index for the site ID attribute
# studio.security.ldap.userAttribute.siteId.groupName.matchIndex: 1
# LDAP groups attribute
# studio.security.ldap.userAttribute.groupName: crafterGroup
# LDAP groups attribute name regex
# studio.security.ldap.userAttribute.groupName.regex: .*
# LDAP groups attribute match index
# studio.security.ldap.userAttribute.groupName.matchIndex: 1
# LDAP default site if site ID attribute not found
# studio.security.ldap.defaultSiteId: default

# Authentication via headers enabled
# studio.authentication.headers.enabled: false
# Authentication header for secure key
# studio.authentication.headers.secureKeyHeaderName: secure_key
# Authentication headers secure key that is expected to match secure key value from headers
# Typically this is placed in the header by the authentication agent, e.g. Apache mod_mellon
# studio.authentication.headers.secureKeyHeaderValue: secure
# Authentication header for username
# studio.authentication.headers.username: username
# Authentication header for first name
# studio.authentication.headers.firstName: firstname
# Authentication header for last name
# studio.authentication.headers.lastName: lastname
# Authentication header for email
# studio.authentication.headers.email: email
# Authentication header for groups: comma separated list of sites and groups
#   Example:
#   craftercms1645,Author,anothersite,Author
# studio.authentication.headers.groups: groups

Mail Configuration

The following section of Studio’s configuration overrides allows you to setup the SMTP server to be used by Crafter CMS when sending emails

shared/classes/crafter/studio/extension/studio-config-override.yaml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
##################################################
##        SMTP Configuration (Email)            ##
##################################################

# Default value for from header when sending emails.
# studio.mail.from.default: admin@example.com
# SMTP server name to send emails.
# studio.mail.host: localhost
# SMTP port number to send emails.
# studio.mail.port: 25
# SMTP username for authenticated access when sending emails.
# studio.mail.username:
# SMTP password for authenticated access when sending emails.
# studio.mail.password:
# Turn on/off (value true/false) SMTP authenaticated access protocol.
# studio.mail.smtp.auth: false
# Enable/disable (value true/false) SMTP TLS protocol when sending emails.
# studio.mail.smtp.starttls.enable: false
# Enable/disable (value true/false) SMTP EHLO protocol when sending emails.
# studio.mail.smtp.ehlo: true
# Enable/disable (value true/false) debug mode for email service. Enabling debug mode allows tracking/debugging communication between email service and SMTP server.
# studio.mail.debug: false