Configuration
These properties can be modified by setting the appropriate values in the
mws-config.groovy
file.
This file is located in either
MWS_HOME/etc
or
MWS_HOME
as explained in the
configuration guide.
The default location for the MWS configuration files if no
MWS_HOME
is set is
/opt/mws/etc
(
MOABHOMEDIR
or
/opt/moab
are also attempted to be used if the configuration files do not exist in
/opt/mws
.
Configuration Reference
For all possible values that can be set, please see the Grails reference guide. For project specific settings
(usually the only ones you'll need to change), you may set the following properties:
Property | Type | Default | Description |
---|
grails.mongo.host | String | 127.0.0.1 | The MongoDB host to use (Note that MongoDB runs on 127.0.0.1 and not localhost by default) |
grails.mongo.port | Integer | 27017 | The MongoDB port to use |
grails.mongo.databaseName | String | mws | The MongoDB database name to use |
grails.mongo.username | String | None | (Optional) The username to use when connecting to MongoDB |
grails.mongo.password | String | None | (Optional) The password to use when connecting to MongoDB |
grails.mime.use.accept.header | Boolean | false | When enabled, uses the HTTP Content-Accept header to determine the content type used for return data (JSON only for now) |
grails.serverURL | String | http://localhost:8080/mws | Sets the location of the URL of the server |
auth.defaultUser.username | String | admin | Username of the default admin user (only created if no other users exist) |
auth.defaultUser.password | String | adminpw | Unencoded password of the default admin user, must be different from username |
grails.plugins.springsecurity.basic.realmName | String | Moab Web Services | The HTTP realm used when using basic auth |
grails.plugins.springsecurity.active | Boolean | true | Enables or disables security for MWS as a whole, including all providers |
grails.plugins.springsecurity.useBasicAuth | Boolean | true | Enables or disables basic auth with a simple username/password |
grails.plugins.springsecurity.oauthProvider.active | Boolean | true | Enables or disables the OAuth2 provider |
moab.server | String | localhost | Moab server hostname or IP address |
moab.port | Integer | 42559 | Moab server's port |
moab.secretKey | String | moabsecret | Secret key used to communicate with moab, see Moab Configuration |
moab.cacheTimeout | Integer | 10 | Number of seconds the cache of Moab information is valid |
mws.hooks.location | String | hooks | The directory (relative or absolute) where Hooks are stored. See the hooks section for more information. |
mws.docs.maxResults | Integer | 100 | Maximum number of results to return for a single search in the documentation |
Logging Reference
The following loggers are available to use for debugging purposes:
Logger | Default | Description |
---|
grails.app | debug | Most classes in the main MWS application |
grails.app.bootstrap.BootStrap | debug | Handles startup and initialization of MWS |
com.ace.mws | debug | The base logger for all MWS specific functionality |
com.ace.mws.plugins.PluginUtils | debug | Helper class for starting plugins during the startup process |
com.ace.mws.hooks.HookUtils | debug | Helper class for loading hooks during startup process |
plugins | debug | All MWS plugins |
com.ace.mws.plugins | debug | MWS plugin helper class, used to create and initialize plugins |
com.ace.moab.gapi | warn | Base logger for all Moab connections, requests, and responses |
com.ace.moab.gapi.Connection | info | Logger which controls all requests and responses from Moab |
com.ace.moab.gapi.parsers | info | Loggers for parsers of Moab's data |
com.ace.moab.gapi.serializers | info | Loggers for all serialization from MWS to Moab Wire Protocol |
grails.app.service.grails.plugins.reloadconfig | info | Handles dynamic reloading of configuration files |
net.sf.json | error | JSON and XML processing library |
org.springframework.security | info | Authentication/authorization logger |
org.codehaus.groovy.grails.web.servlet | error | Loggers for request handlers |
org.codehaus.groovy.grails.web.mapping | error | URL mapping |
org.codehaus.groovy.grails.web.mapping.filter | error | URL mapping |
org.codehaus.groovy.grails.plugins | error | All grails plugins (MWS internal) |
org.codehaus.groovy.grails.commons | error | Core application and classloading |