Configuration & Settings

Configuring the Weavy tenants is important in order for everything to run smoothly. The configuration spans multiple areas and most are straight forward, while others needs a bit of explaining.

This section will describe the configuration settings that are available and the methods you can use for specifying them.

Specifying configuration settings

All settings are configured through the App Settings schema, which is a predefined configuration section provided by the .NET Framework. Most commonly, settings are defined within the appSettings element in web.config, but there are also other ways to configure settings.

<appSettings>
  <add key="weavy.smtp-from" value="noreply@weavy.com" />
  <add key="weavy.smtp-server" value="smtp.hostname.com" />
  <add key="weavy.smtp-port" value="25" />
  <add key="weavy.smtp-ssl" value="false" />
  <add key="weavy.smtp-username" value="usr" />
  <add key="weavy.smtp-password" value="pass" />
  <!-- etc -->
</appSettings>

Configuration with an external file

The appSettings element has an optional attribute, file, that can be used to reference a external file that contains the configuration. This is especially useful when you don't want settings to be under source control. In this case the appSettings element will reference a file which could be excluded from source control.

Example web.config, referencing an external settings.config:

<configuration>
  <appSettings file="settings.config" />
</configuration>

Example settings.config:

<?xml version="1.0" encoding="utf-8" ?>
<appSettings>
  <add key="weavy.smtp-server" value="smtp.hostname.com" />
</appSettings>

Configuration in Azure

Azure has mechanisms for configuring appSettings through Application settings. Any settings that are defined here will affetively override what is configured in web.config or in an external file.

If you are hosting your Weavy tenants in Azure, this is the preferred way to manage configuration settings.

When you deploy Weavy tenants through the Tenant Dashboard or Tenant API, configuration settings will automatically be applied to reflect your configuration.

That means you normally won't have to handle configuration manually, although it is still possible to specify additional settings at the time of deployment or to update the configuration at any time using the Dashboard or the API.

To view or edit the configuration for a deployed tenant, go to the details view of the tenant. The Settings tab lists all settings. Edit/add rows and click Save to update.

Retrieving configuration settings

Use ConfigurationService to retrieve settings. All built-in settings are available as strongly typed properties while custom settings can be retrieved via the AppSetting method.

Built-in settings

Name Description Default
weavy.active-directory-domain The name of the Active Directory domain or server to authenticate against.
weavy.active-directory-username The username to use when authenticating users against the active directory.
weavy.active-directory-password The password to use when authenticating users against the active directory.
weavy.application-name The name of the application Weavy
weavy.application-url The absolute url to the installation, e.g. https://company.weavycloud.com
weavy.custom-authentication-endpoint The full url to a custom authentication endpoint. Must start with https://.
weavy.domain-whitelist The whitelisted domains for invites and sign ups. Sign-ups and invites with these email domains are automatically approved. Separate multiple entries with comma, e.g. example.com, example.org
weavy.https Set to true to force traffic over HTTPS. true
weavy.hsts Set to true to enable HTTP Strict Transport Security (HSTS). true
weavy.invites Set to true to enable users to send account invites.
weavy.jwt-secret The shared secret to use for Single-Sign-On.
weavy.log-level The minimal loglevel to use for logging. Possible values are "Trace", "Debug", "Info", "Warn", "Error" or "Fatal" Info
weavy.messenger-notification-hub-connection-string The connection string for the Messenger notification hub.
weavy.messenger-notification-hub-path The Messenger notification hub path.
weavy.notification-hub-connection-string The connection string for the notification hub.
weavy.notification-hub-path The notification hub path.
weavy.password-length The minimum required password length.
weavy.password-requires-digit Set to true to require atleast one digit (0-9) in passwords. false
weavy.password-requires-lower Set to true to require atleast one lower case letter (a-z) in passwords. false
weavy.password-requires-upper Set to true to require atleast one upper case letter (A-Z) in passwords. false
weavy.password-requires-special Set to true to require atleast one special character (non letter or digit) in passwords.
weavy.signups Set to true to allow people to sign up for an account. false
weavy.smtp-from The email address from which outgoing emails should be sent.
weavy.smtp-password The password to use for authentication against the SMTP server.
weavy.smtp-port The port used for SMTP transactions. 25
weavy.smtp-server The name or IP address of the host used for SMTP transactions.
weavy.smtp-username The username to use for authentication against the SMTP server.
weavy.smtp-default-credentials Set to true to ignore username and password and send the default credentials with requests. false
weavy.smtp-ssl Set to true to use Secure Sockets Layer (SSL) to encrypt the connection with the SMTP server. false