diff --git a/README.md b/README.md index 9497357..f1e4768 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,6 @@ The default develop url is http://devt.ala.org.au:8080/ws #### Minimum configurations in external config file: - api_key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx google: apikey: xxxxxxxxxxxxxx @@ -50,7 +49,6 @@ The default develop url is http://devt.ala.org.au:8080/ws google: apikey: "xxxxxxxxxxxx" - api_key: xxxxxxxxxxxxx spatialHubUrl: https://spatial-test.ala.org.au/ geoserver: @@ -70,9 +68,6 @@ The default develop url is http://devt.ala.org.au:8080/ws shp2pgsql.path: "/usr/bin/shp2pgsql" gdal.dir: "/usr/bin/" - slaveKey: "xxxxxxxxxxxxxx" - serviceKey: "xxxxxxxxxxxxxx" - layers_store.GEONETWORK_URL: 'https://spatial-test.ala.org.au/geonetwork' # Installation diff --git a/grails-app/conf/application.yml b/grails-app/conf/application.yml index c7ab284..b31b48d 100644 --- a/grails-app/conf/application.yml +++ b/grails-app/conf/application.yml @@ -139,13 +139,9 @@ biocacheUrl: 'https://biocache.ala.org.au' openstreetmap: url: 'https://spatial.ala.org.au/osm' -slave.enable: true -service.enable: true - spatialService: url: "https://spatial.ala.org.au/ws" -serviceKey: "" batch_sampling_passwords: '' batch_sampling_points_limit: 1000000 batch_sampling_fields_limit: 1000 @@ -154,9 +150,6 @@ grid_buffer_size: 40960 occurrence_species_records_filename: /data/ala/data/layers/process/density/current/records --- -# -# au.org.ala.spatial.slave config -# spatialService.url: "http://localhost:8080/ws" data.dir: "/data/spatial-data" shp2pgsql.path: "/usr/bin/shp2pgsql" @@ -181,9 +174,6 @@ maxent.threads: 4 sampling.threads: 4 -slaveKey: "" -serviceKey: "" - # time between pushing status updates to the master for a task statusTime: 5000 retryCount: 10 @@ -237,20 +227,12 @@ security: core: roleAttribute: ala:role apikey: - enabled: true + enabled: false auth: serviceUrl: https://auth-test.ala.org.au/apikey/ - check: - serviceUrl: https://auth-test.ala.org.au/apikey/ws/check?apikey= userdetails: serviceUrl: https://auth-test.ala.org.au/userdetails/ -#webservice: -# jwt: true -# jwt-scopes: openid users/read -# client-id: second-client-id-for-machine-to-machine-comms -# client-secret: second-client-secret-for-machine-to-machine-comms - auth.admin_role: "ROLE_ADMIN" app.http.header.userId: "X-ALA-userId" @@ -264,7 +246,6 @@ namematching.url: 'https://namematching-ws.ala.org.au' records.url: 'https://archives.ala.org.au/archives/exports/lat_lon_taxon.zip' -api_key: '' lists.url: 'https://lists.ala.org.au' collections.url: 'https://collections.ala.org.au' sandboxHubUrl: 'https://sandbox.ala.org.au/ala-hub' @@ -402,7 +383,7 @@ environments: dir: "/Library/Frameworks/GDAL.framework/Programs" spatialHubUrl: "http://devt.ala.org.au:8079/" - # Slave config + spatialService: url: "http://devt.ala.org.au:8081/ws" remote: "https://spatial-test.ala.org.au/ws" diff --git a/grails-app/controllers/au/org/ala/spatial/LogController.groovy b/grails-app/controllers/au/org/ala/spatial/LogController.groovy index 62e9810..16c0ecd 100644 --- a/grails-app/controllers/au/org/ala/spatial/LogController.groovy +++ b/grails-app/controllers/au/org/ala/spatial/LogController.groovy @@ -15,7 +15,7 @@ package au.org.ala.spatial - +import au.ala.org.ws.security.RequireApiKey import au.org.ala.plugins.openapi.Path import au.org.ala.web.AuthService import com.opencsv.CSVWriter @@ -64,7 +64,9 @@ class LogController { ) @Path("/log") @Transactional + @RequireApiKey def index() { + Map emptyMap = [:] try { def lg = new Log(request.JSON as Map) if (!lg.save()) { @@ -72,10 +74,12 @@ class LogController { log.error(it) } } - render status: 200 + response.status = 200 + render emptyMap as JSON } catch (Exception e) { log.warn("log info is broken, ignored! " + e.getMessage()) - render status: 400 + response.status = 400 + render emptyMap as JSON } } @@ -129,7 +133,7 @@ class LogController { @Parameter( name = "admin", in = QUERY, - description = "When true, return results for all users if request has a valid api_key or admin role.", + description = "When true, return results for all users if request has an admin role.", required = false, example = "true" ), @@ -188,6 +192,7 @@ class LogController { ) @Path("/log/search") @Produces("application/json") + @RequireApiKey def search() { def searchResult = logService.search(params, authService.getUserId(), spatialAuthService.userInRole(spatialConfig.auth.admin_role)) def totalCount = logService.searchCount(params, authService.getUserId(), spatialAuthService.userInRole(spatialConfig.auth.admin_role)) diff --git a/grails-app/controllers/au/org/ala/spatial/LoginInterceptor.groovy b/grails-app/controllers/au/org/ala/spatial/LoginInterceptor.groovy index 58af5c0..1120220 100644 --- a/grails-app/controllers/au/org/ala/spatial/LoginInterceptor.groovy +++ b/grails-app/controllers/au/org/ala/spatial/LoginInterceptor.groovy @@ -1,30 +1,12 @@ package au.org.ala.spatial -import au.org.ala.spatial.RequireAdmin -import au.org.ala.spatial.RequireLogin -import au.org.ala.spatial.RequirePermission -import au.org.ala.spatial.SkipSecurityCheck -import au.org.ala.spatial.SpatialConfig import au.org.ala.web.AuthService import com.google.common.base.Strings import grails.converters.JSON -/** - * Copy and simplify from plugin "ala-ws-security-plugin:2.0" - * Remove IP/method/controller whitelist support - * collecting api_key from POST body (backward compatiblity support) - * - * TODO use ALA standard apiKey method: store apiKey in hearder - */ -import org.grails.web.util.WebUtils - -import java.text.MessageFormat - class LoginInterceptor { static final int STATUS_UNAUTHORISED = 401 static final int STATUS_FORBIDDEN = 403 - static final String[] USERID_HEADER_NAME = ["X-ALA-userId", "userId", "user_id"] - static final String[] API_KEY_HEADER_NAME = ["apiKey", "api_key", "api-key"] int order = LOWEST_PRECEDENCE @@ -42,8 +24,6 @@ class LoginInterceptor { return true } - def isAdmin = spatialAuthService.userInRole(spatialConfig.auth.admin_role) - def controller = grailsApplication.getArtefactByLogicalPropertyName("Controller", controllerName) Class controllerClass = controller?.clazz def method = controllerClass?.getMethod(actionName ?: "index", [] as Class[]) @@ -55,18 +35,14 @@ class LoginInterceptor { //Calculating the required permission. def permissionLevel = null //Permission on method has the top priority - if (method?.isAnnotationPresent(RequirePermission.class)) { - permissionLevel = RequirePermission - } else if (method?.isAnnotationPresent(RequireLogin.class)) { + if (method?.isAnnotationPresent(RequireLogin.class)) { permissionLevel = RequireLogin } else if (method?.isAnnotationPresent(RequireAdmin.class)) { permissionLevel = RequireAdmin } if (Objects.isNull(permissionLevel)) { - if (controllerClass?.isAnnotationPresent(RequirePermission.class)) { - permissionLevel = RequirePermission - } else if (controllerClass?.isAnnotationPresent(RequireLogin.class)) { + if (controllerClass?.isAnnotationPresent(RequireLogin.class)) { permissionLevel = RequireLogin } else if (controllerClass?.isAnnotationPresent(RequireAdmin.class)) { permissionLevel = RequireAdmin @@ -75,15 +51,7 @@ class LoginInterceptor { //Permission check def role // if require a certain level of ROLE - if (hasValidApiKey()) { - return true - } else if (permissionLevel == RequirePermission) { - if (authService.getUserId()) { - return true - } else { - return accessDenied(STATUS_UNAUTHORISED, 'Forbidden, ApiKey or user login required!') - } - } else if (permissionLevel == RequireAdmin) { + if (permissionLevel == RequireAdmin) { role = spatialConfig.auth.admin_role } else if (permissionLevel == RequireLogin) { RequireLogin requireAuthentication = method.getAnnotation(RequireLogin.class) @@ -126,44 +94,4 @@ class LoginInterceptor { return false } } - - def hasValidApiKey() { - isValid(getApiKey()) - } - - def isValid(key) { - if (key == null) { - return false - } - - Boolean result = testedKeys.get(key) - - if (result == null) { - String url = MessageFormat.format(grailsApplication.config.apiKeyCheckUrlTemplate.toString(), key) - - result = key == grailsApplication.config.serviceKey || Util.getUrl(url).contains('"valid":true') - testedKeys.put(key, result) - } - - return result - } - - private getApiKey() { - String apikey - def request = WebUtils.retrieveGrailsWebRequest().getCurrentRequest() - - for (name in API_KEY_HEADER_NAME) { - if (request.getHeader(name)) { - return request.getHeader(name).split(",|;")[0] - } - if (request.getParameter(name)) { - return request.getParameter(name).split(",|;")[0] - } - } - - //Last try - apikey = request.JSON?.api_key - - apikey - } } diff --git a/grails-app/controllers/au/org/ala/spatial/ManageLayersController.groovy b/grails-app/controllers/au/org/ala/spatial/ManageLayersController.groovy index 950172a..089e585 100644 --- a/grails-app/controllers/au/org/ala/spatial/ManageLayersController.groovy +++ b/grails-app/controllers/au/org/ala/spatial/ManageLayersController.groovy @@ -27,7 +27,6 @@ import javax.servlet.http.HttpServletResponse import javax.transaction.Transactional import java.text.SimpleDateFormat -@RequirePermission @Transactional class ManageLayersController { @@ -41,10 +40,11 @@ class ManageLayersController { AuthService authService /** - * admin only or api_key + * admin only * * @return */ + @RequireAdmin def index() { } @@ -53,6 +53,7 @@ class ManageLayersController { * * @return */ + @RequireAdmin def layers() { log.debug("List avaliable layers") Map map = [:] @@ -121,7 +122,6 @@ class ManageLayersController { * * @return */ - @RequireAdmin def uploads() { Map map = [:] @@ -174,7 +174,6 @@ class ManageLayersController { * admin only * * @param req - * @param apiKey * @return * @throws Exception */ diff --git a/grails-app/controllers/au/org/ala/spatial/ShapesController.groovy b/grails-app/controllers/au/org/ala/spatial/ShapesController.groovy index 9ab2bec..70fe3e4 100644 --- a/grails-app/controllers/au/org/ala/spatial/ShapesController.groovy +++ b/grails-app/controllers/au/org/ala/spatial/ShapesController.groovy @@ -647,12 +647,9 @@ class ShapesController { JSONRequestBodyParser reqBodyParser = new JSONRequestBodyParser() reqBodyParser.addParameter("user_id", String.class, false) reqBodyParser.addParameter("shp_file_url", String.class, false) - reqBodyParser.addParameter("api_key", String.class, false) if (reqBodyParser.parseJSON(jsonRequestBody)) { - String shpFileUrl = (String) reqBodyParser.getParsedValue("shp_file_url") - String apiKey = (String) reqBodyParser.getParsedValue("api_key") // Use shape file url from json body FileUtils.copyURLToFile(new URL(shpFileUrl), tmpZipFile) diff --git a/grails-app/controllers/au/org/ala/spatial/TasksController.groovy b/grails-app/controllers/au/org/ala/spatial/TasksController.groovy index 18fec11..8694caf 100644 --- a/grails-app/controllers/au/org/ala/spatial/TasksController.groovy +++ b/grails-app/controllers/au/org/ala/spatial/TasksController.groovy @@ -75,7 +75,7 @@ class TasksController { } /** - * admin only or api_key + * admin only * * @return */ @@ -238,7 +238,7 @@ class TasksController { * @param task * @return */ - @RequirePermission + @RequireLogin def show(Long id) { def task = tasksService.getStatus(id) if (task) { @@ -258,7 +258,7 @@ class TasksController { method = "POST", tags = "tasks", operationId = "create", - summary = "Create a task", + summary = "Create a task with JSON body or query parameters", parameters = [ @Parameter( name = "name", @@ -294,27 +294,33 @@ class TasksController { @Transactional(readOnly = false) @RequireApiKey create() { + String name = params.containsKey('name') ? params.name : request.JSON.name + String sessionId = params.containsKey('sessionId') ? params.sessionId : request.JSON.sessionId + String identifier = params.containsKey('identifier') ? params.identifier : request.JSON.identifier + String email = params.containsKey('email') ? params.email : request.JSON.email + Map input = null if (params.containsKey('input')) { input = ((JSONObject) JSON.parse(params.input.toString())).findAll { k, v -> v != null } + } else { + input = request.JSON.input } //Validate input. It may update input def errors - def userId + def userId = params.containsKey('userId') ? params.userId : request.JSON.userId if (spatialConfig.security.oidc.enabled || spatialConfig.security.cas.enabled) { - errors = tasksService.validateInput(params.name, input, spatialAuthService.userInRole(spatialConfig.auth.admin_role)) - userId = authService.getUserId() ?: params.userId + errors = tasksService.validateInput(name, input, spatialAuthService.userInRole(spatialConfig.auth.admin_role)) + userId = authService.getUserId() ?: userId } else { - errors = tasksService.validateInput(params.name, input, true) - userId = params.userId + errors = tasksService.validateInput(name, input, true) } if (errors) { response.status = 400 render errors as JSON } else { - Task task = tasksService.create(params.name, params.identifier, input, params.sessionId, userId, params.email).task + Task task = tasksService.create(name, identifier, input, sessionId, userId, email).task render task as JSON } } @@ -386,7 +392,7 @@ class TasksController { * @param task * @return */ - @RequirePermission + @RequireLogin def download(Task task) { String file = spatialConfig.publish.dir + task.id + ".zip" @@ -395,7 +401,7 @@ class TasksController { /** * - * admin only or api_key + * admin only * * @param task * @return diff --git a/grails-app/init/au/org/ala/spatial/BootStrap.groovy b/grails-app/init/au/org/ala/spatial/BootStrap.groovy index 1764bbe..b6674c2 100644 --- a/grails-app/init/au/org/ala/spatial/BootStrap.groovy +++ b/grails-app/init/au/org/ala/spatial/BootStrap.groovy @@ -15,7 +15,6 @@ import org.locationtech.jts.geom.Geometry import org.locationtech.jts.geom.GeometryCollection @Slf4j -//@CompileStatic class BootStrap { def dataSource @@ -33,8 +32,6 @@ class BootStrap { "classpath:messages" ) - ((AlaApiKeyAuthenticator) getAlaApiKeyClient.authenticator).setUserDetailsClient(userDetailsClient) - [Geometry, GeometryCollection].each { JSON.registerObjectMarshaller(it) { it?.toString() diff --git a/grails-app/services/au/org/ala/spatial/LogService.groovy b/grails-app/services/au/org/ala/spatial/LogService.groovy index 799f2e6..5b5eba7 100644 --- a/grails-app/services/au/org/ala/spatial/LogService.groovy +++ b/grails-app/services/au/org/ala/spatial/LogService.groovy @@ -51,6 +51,14 @@ class LogService { params.groupBy = columnFormat(params.groupBy) params.countBy = columnFormat(params.countBy) + if (!params.groupBy && !userIsAdmin) { + params.groupBy = 'id' + } + + if (!params.countBy && !userIsAdmin) { + params.countBy = 'record' + } + if (params.groupBy && params.countBy) { //search all over logs init() List columns = (params.groupBy as String)?.split(',')?.collect { logColumns.contains(it) ? it : extraColumns.containsKey(it) ? extraColumns.get(it) : null }?.findAll { it != null } @@ -58,22 +66,48 @@ class LogService { def where = where(params, userId, userIsAdmin) def groupBy = params.groupBy ? "GROUP BY ${columns.join(',')} ORDER BY ${columns.join(',')} DESC" : "ORDER BY created DESC" - def sql = "SELECT ${(columns + counts).join(",")} FROM Log ${where} ${groupBy}" - def response - if (params.max) - response = Log.executeQuery(sql.toString(), [max: params.max, offset: params.offset ?: 0]) - else - response = Log.executeQuery(sql.toString(), [offset: params.offset ?: 0]) - List headers = columns.toList() if (counts) headers.addAll(counts.collect { it -> (it as String).replaceAll(".* AS ", "") }) - response.collect { it -> toMap(it, headers) } + def sql = "SELECT ${(columns + counts).join(",")} FROM Log ${where} ${groupBy} LIMIT ? OFFSET ?" + def response = [] + Sql.newInstance(dataSource).query(sql.toString(), [params.max as Integer ?: 10, params.offset as Integer ?: 0], { ResultSet rs -> + if (rs.next()) { + response.add(toMap(rs, headers)) + } + }) + return response } else if (params.category2) { //search a type of work log - def result = Log.executeQuery("SELECT user_id, category2, session_d, data, created FROM Log WHERE category2 ='" + (params.category2 as String) + "' ORDER BY created DESC", [max: params.max as Integer ?: 10, offset: params.offset as Integer ?: 0]) - result.collect { it -> toMap(it, ["user_id", "category2", "session_id", "data", "created"]) } - } + String sql = "SELECT user_id, category2, session_id, data, created FROM Log WHERE category2 = ? ORDER BY created DESC LIMIT ? OFFSET ?" + def response = [] + Sql.newInstance(dataSource).query(sql.toString(), [params.category2, params.max as Integer ?: 10, params.offset as Integer ?: 0], { ResultSet rs -> + if (rs.next()) { + response.add(toMap(rs, ["user_id", "category2", "session_id", "data", "created"])) + } + }) + return response + } else if (userIsAdmin) { + String sql = "SELECT user_id, category2, session_id, data, created FROM Log ORDER BY created DESC LIMIT ? OFFSET ?" + def response = [] + Sql.newInstance(dataSource).query(sql.toString(), [params.max as Integer ?: 10, params.offset as Integer ?: 0], { ResultSet rs -> + if (rs.next()) { + response.add(toMap(rs, ["user_id", "category2", "session_id", "data", "created"])) + } + }) + return response + } else { + def where = where(params, userId, userIsAdmin) + String sql = "SELECT user_id, category2, session_id, data, created FROM Log ${where} ORDER BY created DESC LIMIT ? OFFSET ?" + def response = [] + Sql.newInstance(dataSource).query(sql.toString(), [params.max as Integer ?: 10, params.offset as Integer ?: 0], { ResultSet rs -> + if (rs.next()) { + response.add(toMap(rs, ["user_id", "category2", "session_id", "data", "created"])) + } + }) + return response + + } } def searchCount(params, userId, userIsAdmin) { @@ -91,7 +125,7 @@ class LogService { def buildCountSql(params, userId, userIsAdmin) { init() - def columns = 'id' + def columns = ['id'] if (params.groupBy) { columns = (params.groupBy as String)?.split(',')?.collect { logColumns.contains(it) ? it : extraColumns.containsKey(it) ? extraColumns.get(it) : null }?.findAll { it != null } } @@ -106,12 +140,9 @@ class LogService { def map = [:] if (list) { - if (list.getClass().isArray()) { - for (int i = 0; i < list.size() && i < headers.size(); i++) { - map.put(headers[i], list[i]) - } - } else if (headers.size() > 0) { - map.put(headers[0], list) + for (int i = 0; i < headers.size(); i++) { + // list is a ResultSet, 1 to n + map.put(headers[i], list.getObject(i + 1)) } } diff --git a/grails-app/services/au/org/ala/spatial/SandboxService.groovy b/grails-app/services/au/org/ala/spatial/SandboxService.groovy index f87f134..f3724f3 100644 --- a/grails-app/services/au/org/ala/spatial/SandboxService.groovy +++ b/grails-app/services/au/org/ala/spatial/SandboxService.groovy @@ -576,7 +576,7 @@ class SandboxService { logger.error("Error deleting directory: " + processedDir.getAbsolutePath(), e); } - // double check SOLR + // double check SOLR has the records try { long sleepMs = 500; // 0.5s Thread.sleep(sleepMs); @@ -589,13 +589,16 @@ class SandboxService { null, Map.class); + // This will wait only until the first SOLR count > 0 is returned. It is concievable that SOLR may still + // be processing records. if (response.getStatusCode().is2xxSuccessful() && ((Integer) ((Map) response.getBody().get("response")).get("numFound")) > 0) { int solrCount = ((Integer) ((Map) response.getBody().get("response")).get("numFound")); + logger.info("SOLR import successful: " + solrCount + " records"); sandboxIngress.status = "finished"; - sandboxIngress.message = "SOLR import successful: " + solrCount + " records (subject to in progress indexing)" + sandboxIngress.message = "Import complete: " + solrCount + " records" return solrCount; } diff --git a/grails-app/services/au/org/ala/spatial/TaskQueueService.groovy b/grails-app/services/au/org/ala/spatial/TaskQueueService.groovy index 893e685..cf064c9 100644 --- a/grails-app/services/au/org/ala/spatial/TaskQueueService.groovy +++ b/grails-app/services/au/org/ala/spatial/TaskQueueService.groovy @@ -201,10 +201,20 @@ class TaskQueueService { } // flush task because it is finished - Task.withTransaction { + try { if (!taskWrapper.task.save(flush: true)) { taskWrapper.task.errors.each { log.error it + + } + } + } catch (Exception e) { + // some workflows require a separate transaction wrapper + Task.withTransaction { + if (!taskWrapper.task.save(flush: true)) { + taskWrapper.task.errors.each { + log.error it + } } } } diff --git a/src/main/groovy/au/org/ala/spatial/RequireLogin.groovy b/src/main/groovy/au/org/ala/spatial/RequireLogin.groovy index 9e25d73..445b166 100644 --- a/src/main/groovy/au/org/ala/spatial/RequireLogin.groovy +++ b/src/main/groovy/au/org/ala/spatial/RequireLogin.groovy @@ -4,7 +4,7 @@ import java.lang.annotation.* /** * RequireLogin() - * Requires a valid ApiKey AND userId (Api call) + * Requires a valid JWT * Or a user login * * RequireLogin(role=ROLE_ADMIN) diff --git a/src/main/groovy/au/org/ala/spatial/RequirePermission.groovy b/src/main/groovy/au/org/ala/spatial/RequirePermission.groovy deleted file mode 100644 index 5bbcc44..0000000 --- a/src/main/groovy/au/org/ala/spatial/RequirePermission.groovy +++ /dev/null @@ -1,17 +0,0 @@ -package au.org.ala.spatial - -import java.lang.annotation.* - -/** - * Annotation to check if a valid api key has been provided - * or user has logged in - */ -@Target([ElementType.TYPE, ElementType.METHOD]) -@Retention(RetentionPolicy.RUNTIME) -@Documented - -/** - * Minimum ApiKey check or login user - */ -@interface RequirePermission { -} diff --git a/src/main/groovy/au/org/ala/spatial/SpatialConfig.groovy b/src/main/groovy/au/org/ala/spatial/SpatialConfig.groovy index 80956ff..a416c58 100644 --- a/src/main/groovy/au/org/ala/spatial/SpatialConfig.groovy +++ b/src/main/groovy/au/org/ala/spatial/SpatialConfig.groovy @@ -16,8 +16,6 @@ class SpatialConfig { String serverURL } - String serviceKey // used to authenticate copying layers from one spatial service to another - DotTask task Double [] shpResolutions @@ -59,7 +57,6 @@ class SpatialConfig { DotUrl namematching DotUrl records - String api_key DotUrl lists DotUrl collections DotGeoserver geoserver diff --git a/src/main/groovy/au/org/ala/spatial/process/FieldCreation.groovy b/src/main/groovy/au/org/ala/spatial/process/FieldCreation.groovy index 40151fb..0f9cecb 100644 --- a/src/main/groovy/au/org/ala/spatial/process/FieldCreation.groovy +++ b/src/main/groovy/au/org/ala/spatial/process/FieldCreation.groovy @@ -40,8 +40,6 @@ class FieldCreation extends SlaveProcess { void start() { String fieldId = getInput('fieldId') Boolean ignoreNullObjects = getInput('ignoreNullObjects') as Boolean - //TODO: check if we need to skip SLD creation from input params - // Query geoserver to check - SlaveService.peekFile to check // get layer info Fields field = getField(fieldId) diff --git a/src/test/resources/application-test.yml b/src/test/resources/application-test.yml index b673f1e..bb48d24 100644 --- a/src/test/resources/application-test.yml +++ b/src/test/resources/application-test.yml @@ -139,21 +139,14 @@ biocacheUrl: 'https://biocache.ala.org.au' openstreetmap: url: 'https://tile.openstreetmap.org' -slave.enable: true -service.enable: true - spatialService: url: "https://spatial.ala.org.au/ws" -serviceKey: "" batch_sampling_passwords: '' batch_sampling_points_limit: 1000000 batch_sampling_fields_limit: 1000 --- -# -# au.org.ala.spatial.slave config -# spatialService.url: "http://localhost:8080/ws" data.dir: "/data/spatial-data" shp2pgsql.path: "/usr/bin/shp2pgsql" @@ -178,9 +171,6 @@ maxent.threads: 4 sampling.threads: 4 -slaveKey: "" -serviceKey: "" - # time between pushing status updates to the master for a task statusTime: 5000 retryCount: 10 @@ -230,8 +220,6 @@ security: enabled: true auth: serviceUrl: https://auth.ala.org.au/apikey/ws/check/ - check: - serviceUrl: https://auth.ala.org.au/apikey/ws/check?apikey= userdetails: serviceUrl: https://auth.ala.org.au/userdetails/userDetails/ @@ -254,7 +242,6 @@ namematching.url: 'https://namematching-ws.ala.org.au' records.url: 'https://archives.ala.org.au/archives/exports/lat_lon_taxon.zip' -api_key: '' lists.url: 'https://lists.ala.org.au' collections.url: 'https://collections.ala.org.au' sandboxHubUrl: 'https://sandbox.ala.org.au/ala-hub' @@ -266,7 +253,6 @@ spatialHubUrl: 'https://spatial.ala.org.au' gazField: 'cl915' userObjectsField: 'cl1083' -apiKeyCheckUrlTemplate: 'https://auth.ala.org.au/apikey/ws/check?apikey={0}' spatialService.remote: "https://spatial.ala.org.au/ws" journalmap.api_key: '' @@ -390,7 +376,7 @@ environments: dir: "/Library/Frameworks/GDAL.framework/Programs" spatialHubUrl: "http://devt.ala.org.au:8079/" - # Slave config + spatialService: url: "http://devt.ala.org.au:8081/ws" geoserver: