Version Summary
Version Number : v2.0.0 [tag: v2.0.0]
Date: 14-November-2024
Projects / Repos Included in this release: OGC Resource Server, DX Deployment and installation, DX Documentation
Release Summary :
Centre of Data for Public Good (CDPG) | OGC Resource Server v2.0.0 is released with enhanced features.
Highlights:
- Added support for vector tilesets
- Implemented OGC coverages Core conformance
- Implemented STAC Items and Items Search
- Added the following processes
- append dynamic feature data to an existing OGC feature collection
- add tiles metadata to the database for an existing tileset in S3
- generate a pre-signed URL to upload data into S3
- Incorporated auditing flows for Tiles API
- Added support for provider-delegate authorization for process execution
- Refactored authentication to use handlers and changed token header to
Authorization: Bearer ...
- Updated the client SDK for OGC and STAC
- Added HTML versions of API docs
- Added detailed server documentation
- Enhanced Software Testing with RESTAssured
Test Reports:
Please find the release test details and reports here
API Docs
The api docs can be found here
How to use the Release:
Prerequisites
- Make a config file based on the template in example-config/config-example.json
- Set up AWS S3 for serving tiles and STAC assets
- Set up PostGIS for storing information related to geo spatial data
- Set up RabbitMQ for publishing the auditing data
- Set up the database using Flyway
AWS S3 setup
- AWS S3 is used to serve map tiles as well as STAC asset files
- An S3 bucket can be set up by following the AWS S3 documentation, after which the S3 bucket name, region name, access key and secret key can be added to the config.
PostGIS
- PostGIS is an extension for PostgreSQL that adds support for geographic objects, allowing users to store and query spatial data.
- To setup PostgreSQL refer setup and installation instructions available here
Table Name | Purpose |
---|---|
collections_details | To store metadata about collections, including title, description, and bounding box |
processes_table | To store details of processes including input, output, and execution modes |
ri_details | To store information related to resource instance (RI) details, including role and access type |
roles | To store user roles, such as provider, consumer, or delegate |
jobs_table | To store job details, including status, type, progress, and timestamps, related to different processes |
collection_type | To store types associated with collections, based on the type column from collections_details |
tilematrixset_metadata | To store metadata for tile matrix sets, including scale, cell size, and matrix dimensions |
tilematrixsets_relation | To store the relation between collections and tile matrix sets |
collection_supported_crs | To store the Coordinate Reference Systems (CRS) supported by specific collections |
crs_to_srid | To map Coordinate Reference Systems (CRS) to Spatial Reference Identifiers (SRID) |
stac_collections_assets | To store assets linked to collections, such as thumbnails, data, and metadata, including their size, type, and role |
collection_coverage | To store the coverage schema and associated hrefs related to collections, helping define the spatial/temporal extent of collections |
Auditing
- Auditing is done using the DX Auditing Server which uses Postgres for storing the audit logs for OGC Resource Server
- The schema for auditing table in PostgreSQL is present here - postgres auditing table schema
Table Name | Purpose | DB |
---|---|---|
auditing_ogc | To store audit logs for operations in the OGC Resource Server | PostgreSQL |
RabbitMQ
- RabbitMQ is used to push the logs which is consumed by the auditing server
- To setup RabbitMQ refer the setup and installation instructions available here
- After deployment of RabbitMQ, we need to ensure that there are certain prerequisites met. Incase if it is not met, please login to RabbitMQ management portal using the RabbitMQ management UI and create a the following
Create vHost
Type | Name | Details |
---|---|---|
vHost | IUDX-INTERNAL | Create a vHost in RabbitMQ |
Create Exchange
Exchange Name | Type of exchange | features | Details |
---|---|---|---|
auditing | direct | durable | Create an exchange in vHost IUDX-INTERNAL to allow audit information to be published |
Create Queue and Bind to Exchange
Exchange Name | Queue Name | vHost | routing key | Details |
---|---|---|---|---|
auditing | direct | durable | # | Create a queue in vHost IUDX-INTERNAL to allow audit information to be consumed. Ensure that the queue is binded to the auditing exchange |
Database Migration using Flyway
- Database flyway migrations help in updating the schema, permissions, grants, triggers etc., with the latest version
- Each flyway schema file is versioned with the format
V<majorVersion>_<minorVersion>__<description>.sql
, ex :V1_1__init-tables.sql
to manage the database schema and handle migrations - The migration files are located at src/main/resources/db/migrations. The following pre-requisites are needed before running
flyway
:- An admin user - a database user who has created schema/table privileges for the database. It can be the super user.
- A normal user - this is the database user that will be configured to make queries from the server
(e.g.CREATE USER ogc WITH PASSWORD 'randompassword';
)
flyway.conf must be updated with the required data.
flyway.url
- the database connection URLflyway.user
- the username of the admin userflyway.password
- the password of the admin userflyway.schemas
- the name of the schema under which the tables are createdflyway.placeholders.ogcUser
- the username of the server user
Please refer here for more information about Flyway config parameters.
After this, the info
command can be run to test the config. Then, the migrate
command can be run to set up the database. At the /ogc-resource-server
directory, run
mvn flyway:info -Dflyway.configFiles=flyway.conf
mvn flyway:migrate -Dflyway.configFiles=flyway.conf
Installation Steps
Maven based execution
- Install Java 11 and maven
- Set Environment variables
export LOG_LEVEL=INFO
- Use the maven exec plugin based starter to start the server
mvn clean compile exec:java@ogc-resource-server
- The server will be up on port 8080. To change the port, add
httpPort:<desired_port_number>
to the config in theApiServerVerticle
module. See configs/config-example.json for an example.
JAR based execution
- Install Java 11 and maven
- Set Environment variables
export LOG_LEVEL=INFO
- Use maven to package the application as a JAR
mvn clean package -Dmaven.test.skip=true
- 2 JAR files would be generated in the
target/
directoryogc-resource-server-dev-0.0.1-SNAPSHOT-fat.jar
- non-clustered vert.x and does not contain micrometer metrics
Docker based execution
- Install docker and docker-compose
- Clone this repo
- Build the images
./docker/build.sh
- Modify the
docker-compose.yml
file to map the config file you just created - Start the server in production (prod) or development (dev) mode using docker-compose
docker-compose up prod
- The server will be up on port 8080. To change the port, add
httpPort:<desired_port_number>
to the config in theApiServerVerticle
module. See example-config/config-example.json for an example
License
See LICENSE
Issues and Suggestions
Any Release related issues/suggestions, please raise here
For all other issues/suggestions related specific projects, please raise them to the respective project repo/issues.
What's Changed
- bug-log-added by @gopal-mahajan in #131
- log-fix by @gopal-mahajan in #132
- Added onFailure block for S3 operations by @ThorodanBrom in #133
- s3-bug-fix by @gopal-mahajan in #134
- oas-html-output by @tanvi029 in #135
- Apidoc Title fixed by @tanvi029 in #136
- authentication refactor by @tanvi029 in #137
- Bump org.bouncycastle:bcpkix-jdk18on from 1.77 to 1.78 by @dependabot in #129
- Authorization refactor by @tanvi029 in #142
- Tiles metadata fix by @code-akki in #143
- removed old auth classes by @tanvi029 in #144
- Set HTML version of OpenAPI spec as default version when
/api
is accessed. Update OGC and STAC landing pages by @ThorodanBrom in #145 - Add handling of Accept header for OpenAPI spec format by @ThorodanBrom in #147
- Bug-Fix: Add 'disable.auth' property check in token authentication and OGC APIs authorization for OGC compliance tests by @ThorodanBrom in #148
- Collection Appending Process by @DivyaSreeMunagavalasa in #139
- IT test for Processes and Collection Onboarding Process by @gopal-mahajan in #138
- Integration Tests for Collection Appending Process by @DivyaSreeMunagavalasa in #150
- BUG FIX: Fixed next link for Features API by @code-akki in #155
- Code refactor for CRS check in onboarding process by @DivyaSreeMunagavalasa in #152
- Reordering collection existence check and resource ownership check for succeeding the tests. by @DivyaSreeMunagavalasa in #157
- Add SQL plugin for setup/teardown of data before/after integration tests by @ThorodanBrom in #153
- Refactor by @code-akki in #151
- Use Focal image of maven-eclipse-temurin by @ThorodanBrom in #165
- Changed token header from
token
toAuthorization:Bearer ...
by @ThorodanBrom in #159 - OGC Coverage related changes by @tanvi029 in #163
- Bug-Fix: Fix spec generation for OGC collections by @ThorodanBrom in #146
- fixes in collection response for type coverage by @tanvi029 in #166
- Fix auditing flows - remove usage of authInfo JSON object in
updateAuditTable
and rely on AuthInfo object by @ThorodanBrom in #164 - audit-code-remove by @gopal-mahajan in #168
- Adding provider delegate auth check for processes by @DivyaSreeMunagavalasa in #170
- Update: Tiles Metadata Table Refactor by @code-akki in #172
- Update V15__add_collection_coverage_table.sql by @code-akki in #174
- fetching Coverage JSON from S3 by @tanvi029 in #173
- S3 Pre Signed URL Generation Process by @DivyaSreeMunagavalasa in #190
- Tiles Meta Data Onboarding Process and RestAssured Integration Tests by @DivyaSreeMunagavalasa in #171
- Minor Code Fix in ProcessesRunnerImpl Class by @DivyaSreeMunagavalasa in #195
- Add STAC and DX-Metering API doc links to main OGC API doc by @ThorodanBrom in #188
- Tiles Meta Data Onboarding Process Tests Fix by @DivyaSreeMunagavalasa in #197
- Using Awaitility instead of Thread.sleep() in the integration tests to check for the job status by @DivyaSreeMunagavalasa in #200
- Integration Tests for coverages by @tanvi029 in #194
- Using Awaitility instead of Thread.sleep() in the integration tests to check for the job status by @DivyaSreeMunagavalasa in #201
- Fix S3 Object Existence Check in S3PreSignedURLGenerationProcess by @DivyaSreeMunagavalasa in #206
- Added monitoring metrics by @tanvi029 in #212
- Fix: S3PreSignedURLProcess by @DivyaSreeMunagavalasa in #209
- [DRAFT] STAC Items API by @code-akki in #189
- BUG FIX: by @code-akki in #218
- [Draft] STAC Item Search API by @code-akki in #219
- build response for coverage by @tanvi029 in #217
- Tiles metering by @tanvi029 in #220
- Documentation of OGC Resource Server by @DivyaSreeMunagavalasa in #215
- Bug-Fix : Comment out the STAC Item Search API route by @ThorodanBrom in #223
- Implement missing jobs endpoints- /jobs and /jobs/{jobId}/results by @DivyaSreeMunagavalasa in #222
New Contributors
- @dependabot made their first contribution in #129
- @DivyaSreeMunagavalasa made their first contribution in #139
Full Changelog: v1.0.1...v2.0.0