{"id":15069107,"url":"https://github.com/entur/tiamat","last_synced_at":"2025-04-10T17:43:09.597Z","repository":{"id":25457074,"uuid":"58922077","full_name":"entur/tiamat","owner":"entur","description":"Module also known as the backend for Stop Place Register (\"nasjonalt stoppestedregister - nsr\")","archived":false,"fork":false,"pushed_at":"2024-10-29T11:12:52.000Z","size":13152,"stargazers_count":15,"open_issues_count":14,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-29T13:12:37.552Z","etag":null,"topics":["abzu","java-11","netex","nsr","postgresql","publictransport","ror","spring-boot","stopplaces"],"latest_commit_sha":null,"homepage":"https://stoppested.entur.org","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/entur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-16T09:55:50.000Z","updated_at":"2024-10-23T09:53:22.000Z","dependencies_parsed_at":"2023-10-04T14:32:39.264Z","dependency_job_id":"e5ce4d82-2848-4980-b4eb-141d1b4ada3a","html_url":"https://github.com/entur/tiamat","commit_stats":null,"previous_names":[],"tags_count":635,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entur%2Ftiamat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entur%2Ftiamat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entur%2Ftiamat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entur%2Ftiamat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/entur","download_url":"https://codeload.github.com/entur/tiamat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248262216,"owners_count":21074264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abzu","java-11","netex","nsr","postgresql","publictransport","ror","spring-boot","stopplaces"],"created_at":"2024-09-25T01:40:30.582Z","updated_at":"2025-04-10T17:43:09.589Z","avatar_url":"https://github.com/entur.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tiamat ![Build](https://github.com/entur/tiamat/actions/workflows/entur-push.yml/badge.svg)\n\nTiamat is the Stop Place Register.\nIt is used nationally in Norway, and other places.\nTiamat is created with technologies like Spring Boot, Hibernate, Postgis, Jersey and Jackson.\n\n## Core functionality\n### NeTEx imports\n* Supports different pre steps and merging options for stop places, handling bad data quality.\n* Assigns unique IDs to stop places (if desired).\n* Validates incoming data against the XML schema.\n\n### NeTEx exports\nSupports exporting stop places and other entities to the http://netex-cen.eu/ format.\nThere are many options for exports:\n* Asynchronous exports to google cloud storage. Asynchronous exports handles large amount of data, even if exporting thousands of stop places.\n* Synchronous exports directly returned\n* Several export parameters and filtering (ex: query or administrative polygons filtering)\n* Exports can be validated against the NeTEx schema, ensuring quality.\n\n### GraphQL API\nTiamat provides a rich GraphQL API for stop places, topographic places, path links, tariff zones and so on, support the same parameters as the NeTEx export API.\nIt also supports mutations. So you can update or create entities.\nThere are also graphql processes (named functions) which allows functionality like merging quays or stop places.\n\n### A ReactJS Frontend\nA frontend for Tiamat is available. It's name is Abzu.\nSee https://github.com/entur/abzu\n\n### Supports running multiple instances\nTiamat uses Hazelcast memory grid to communicate with other instances in kubernetes.\nThis means that you can run multiple instances.\n\n### Mapping of IDs\nAfter import stop places and assigning new IDs to stop places, tiamat keeps olds IDs in a mapping table.\nThe mapping table between old and new IDs is available through the GraphQL API and a REST endpoint.\n\n### Automatic topographic place and tariff zone lookup\nTiamat supports looking up and populating references to tariff zones and topographic places from polygon matches when saving a stop place.\n\n### Versioning\nStop places and other entities are versioned. This means that you have full version history of stop places and what person that made those changes.\nTiamat also includes a diff tool. This is used to compare and show the difference between two versions of a stop place (or other entity).\n\n\n## Build\n\n```shell\nmvn clean install\n```\n\nYou need the directory `/deployments/data` with rights for the user who\nperforms the build.\n\n## Integration tests\nTiamat uses testcontainers to run integration tests against a real database.  To run Testcontainers-based tests, you need a Docker-API compatible container runtime\nfor more detail see https://www.testcontainers.org/supported_docker_environment/\n\n(default profiles are set in application.properties)\n\n## Running the service\n\nThere are several options for running the service depending on what you need.\n\n - [Run locally for development](#run-locally-for-development) is for people intending to maintain, modify and improve \n   tiamat's source code\n - [Run tiamat with Docker compose](#run-tiamat-with-docker-compose) if you just need to get the service running\n - [Run with external properties file and PostgreSQL](#run-with-external-properties-file-and-postgresql) for low \n   level debugging\n\n\u003e **Note!** Each of these configurations use unique port numbers and such, be sure to read the provided documentation \n\u003e and configuration files for more details.\n\n## Run locally for development\n\nLocal development is a combination of using Docker Compose based configuration for starting up the supporting \nservices and running Spring Boot with at least `local` profile enabled.\n\nWhen running,\n\n - tiamat will be available at `http://localhost:37888`\n - PostGIS will be available at `localhost:37432`\n\n### 1. Start Local Environment through Docker Compose\n\nTiamat has [docker-compose.yml](./docker-compose.yml) which contains all necessary dependent services for running tiamat in\nvarious configurations. It is assumed this environment is always running when the service is being run locally\n(see below).\n\n\u003e **Note!** This uses the compose version included with modern versions of Docker, not the separately installable\n\u003e `docker-compose` command.\n\nAll Docker Compose commands run in relation to the `docker-compose.yml` file located in the same directory in which the\ncommand is executed.\n\n```shell\n# run with defaults - use ^C to shutdown containers\ndocker compose up\n# run with additional profiles, e.g. with LocalStack based AWS simulator\ndocker compose --profile aws up\n# run in background\ndocker compose up -d # or --detach\n# shutdown containers\ndocker compose down\n# shutdown containers included in specific profile\ndocker compose --profile aws down\n```\n\n#### Supported Docker Compose profiles\n\nDocker Compose has its own profiles which start up additional supporting services to e.g. make specific feature \ndevelopment easier. You may include any number of additional profiles when working with Docker Compose by listing \nthem in the commands with the `--profile {profile name}` argument. Multiple profiles are activated by providing the \nsame attribute multiple times, for example starting Compose environment with profiles a and b would be\n```shell\ndocker compose --profile a --profile b up\n```\n\nThe provided profiles for Tiamat development are\n\n\n| profile | description                                                                                       |\n|:--------|---------------------------------------------------------------------------------------------------|\n| `aws`   | Starts up [LocalStack](https://www.localstack.cloud/) meant for developing AWS specific features. |\n\n\nSee [Docker Compose reference](https://docs.docker.com/compose/reference/) for more details.\n\nSee [Supported Docker Compose Profiles](#supported-docker-compose-profiles) for more information on provided profiles.\n\n### 2. Run the Service\n\n#### Available Spring Boot Profiles\n\n\u003e **Note!** You must choose at least one of the options from each category below!\n\n\u003e **Note!** `local` profile must always be included!\n\n##### Storage\n\n| profile                | description                                                                                                                                                     |\n|:-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `gcs-blobstore`        | GCP GCS implementation of tiamat's blob storage                                                                                                                 |\n| `local-blobstore`      | Use local directory as backing storage location.                                                                                                                |\n| `rutebanken-blobstore` | Use [`rutebanken-helpers/storage`][rutebanken-storage] based implementation for storage. Must be combined with one of the supported extra profiles (see below). |\n\n[rutebanken-storage]: https://github.com/entur/rutebanken-helpers/tree/master/storage\n\n###### Supported `rutebanken-blobstore` extra profiles\n\nIf this profile is chosen, an additional implementation must be chosen to activate the underlying actual implementation.\nSupported extra profiles are\n\n| extra profile          | description                              |\n|:-----------------------|------------------------------------------|\n| `local-disk-blobstore` | Similar to `local-blobstore`.            |\n| `in-memory-blobstore`  | Entirely in-memory based implementation. |\n| `s3-blobstore`         | AWS S3 implementation.                   |\n\n**Example: Activating `in-memory-blobstore` for local development**\n```properties\nspring.profiles.active=local,rutebanken-blobstore,in-memory-blobstore,local-changelog\n```\n\nSee the [`RutebankenBlobStoreServiceConfiguration`](./src/main/java/org/rutebanken/tiamat/config/RutebankenBlobStoreConfiguration.java)\nclass for configuration keys and additional information.\n\n##### Changelog\n\n| profile           | description                                                        |\n|:------------------|--------------------------------------------------------------------|\n| `local-changelog` | Simple local implementation which logs the sent events to `stdout` |\n| `activemq`        | JMS based ActiveMQ implementation.                                 |\n| `google-pubsub`   | GCP PubSub implementation for publishing tiamat entity changes.    |\n\n#### Supported Docker Compose Profiles\n\nTiamat's [`docker-compose.yml`](./docker-compose.yml) comes with built-in profiles for various use cases. The profiles \nare mostly optional, default profile contains all mandatory configuration while the named profiles add features on \ntop of that. You can always activate zero or more profiles at the same time, e.g.\n\n```shell\ndocker compose --profile first --profile second up\n# or\nCOMPOSE_PROFILES=first,second docker compose up\n```\n\n### Default profile (no activation key)\n\nStarts up PostGIS server with settings matching the ones in [`application-local.properties`](./src/main/resources/application-local.properties).\n\n### `aws` profile\n\nStarts up [LocalStack](https://www.localstack.cloud/) meant for developing AWS specific features.\n\nSee also [Disable AWS S3 Autoconfiguration](#disable-aws-s3-autoconfiguration), [NeTEx Export](#netex-export).\n\n#### Run It!\n\n**IntelliJ**: Right-click on `TiamatApplication.java` and choose Run (or Cmd+Shift+F10). Open Run -\u003e Edit \nconfigurations, choose the correct configuration (Spring Boot -\u003e App), and add a comma separated list of desired \nprofiles (e.g. `local,local-blobstore,activemq`) to Active profiles. Save the configuration.\n\n**Command line**: `mvn spring-boot:run`\n\n## Run tiamat with Docker compose\nTo run Tiamat with Docker compose, you need to have a docker-compose.yml file. In docker-compose folder you will find a compose.yml file.:\n\n```shell\ndocker compose up\n```\n\nThis will start Tiamat with PostgreSQL and Hazelcast. and you can access Tiamat on http://localhost:1888 and the database on http://localhost:5433 \nand graphiql on http://localhost:8777/services/stop_places/graphql , At start up tiamat copy empty schema to the database. Spring properties are set in application.properties.\nSecurity is disabled in this setup.\n\n## Run with external properties file and PostgreSQL\nTo run with PostgreSQL you need an external `application.properties`. Below is an example of `application.properties`:\n\n```properties\nspring.jpa.database=POSTGRESQL\nspring.datasource.platform=postgres\nspring.jpa.properties.hibernate.hbm2ddl.import_files_sql_extractor=org.hibernate.tool.hbm2ddl.MultipleLinesSqlCommandExtractor\nspring.jpa.hibernate.hbm2ddl.import_files_sql_extractor=org.hibernate.tool.hbm2ddl.MultipleLinesSqlCommandExtractor\nspring.jpa.hibernate.ddl-auto=none\n\nspring.http.gzip.enabled=true\n\n#spring.jpa.properties.hibernate.format_sql=true\n\nspring.jpa.properties.hibernate.order_updates=true\nspring.jpa.properties.hibernate.batch_versioned_data=true\n\nspring.flyway.enabled=true\nspring.flyway.table=schema_version\n\nserver.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain\n\nspring.jpa.hibernate.id.new_generator_mappings=true\nspring.jpa.hibernate.use-new-id-generator-mappings=true\nspring.jpa.properties.hibernate.cache.use_second_level_cache=false\nspring.jpa.properties.hibernate.cache.use_query_cache=false\nspring.jpa.properties.hibernate.cache.use_minimal_puts=false\nspring.jpa.properties.hibernate.cache.region.factory_class=org.rutebanken.tiamat.hazelcast.TiamatHazelcastCacheRegionFactory\n\nnetex.import.enabled.types=MERGE,INITIAL,ID_MATCH,MATCH\n\nhazelcast.performance.monitoring.enabled=true\nhazelcast.performance.monitoring.delay.seconds=2\n\nmanagement.endpoints.web.exposure.include=info,env,metrics\nmanagement.endpoints.prometheus.enabled=true\nmanagement.metrics.endpoint.export.prometheus.enabled=true\n\nspring.jpa.properties.hibernate.jdbc.batch_size=20\nspring.jpa.properties.hibernate.default_batch_fetch_size=16\nspring.jpa.properties.hibernate.generate_statistics=false\n\nchangelog.publish.enabled=false\n\njettyMaxThreads=10\njettyMinThreads=1\n\nspring.datasource.hikari.maximumPoolSize=40\nspring.datasource.hikari.leakDetectionThreshold=30000\n\ntiamat.locals.language.default=eng\n\ntariffZoneLookupService.resetReferences=true\n\ndebug=true\n\n# Disable feature detection by this undocumented parameter. Check the org.hibernate.engine.jdbc.internal.JdbcServiceImpl.configure method for more details.\nspring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false\n\n# Because detection is disabled you have to set correct dialect by hand.\nspring.jpa.database-platform=org.hibernate.dialect.PostgreSQL9Dialect\n\ntariffzoneLookupService.resetReferences=true\n\nspring.jpa.properties.hibernate.dialect=org.hibernate.spatial.dialect.postgis.PostgisDialect\n\nspring.database.driverClassName=org.postgresql.Driver\nspring.datasource.url=jdbc:postgresql://localhost:5436/tiamat\nspring.datasource.username=tiamat\nspring.datasource.password=tiamat\n\n#OAuth2 Resource Server\nspring.security.oauth2.resourceserver.jwt.issuer-uri=https:http://localhost:8082/realms/entur\ntiamat.oauth2.resourceserver.auth0.ror.jwt.audience=abzu\ntiamat.oauth2.resourceserver.auth0.ror.claim.namespace=role_assignments\n\nspring.cloud.gcp.pubsub.enabled=false\n\naspect.enabled=true\n\nnetex.id.valid.prefix.list={TopographicPlace:{'KVE','WOF','OSM','ENT','LAN'},TariffZone:{'*'},FareZone:{'*'},GroupOfTariffZones:{'*'}}\n\nserver.port=1888\n\nblobstore.gcs.blob.path=exports\nblobstore.gcs.bucket.name=tiamat-test\nblobstore.gcs.credential.path=gcloud-storage.json\nblobstore.gcs.project.id=carbon-1287\n\nsecurity.basic.enabled=false\nmanagement.security.enabled=false\nauthorization.enabled = true\nrutebanken.kubernetes.enabled=false\n\nasync.export.path=/tmp\n\npublicationDeliveryUnmarshaller.validateAgainstSchema=false\npublicationDeliveryStreamingOutput.validateAgainstSchema=false\nnetex.validPrefix=NSR\nnetex.profile.version=1.12:NO-NeTEx-stops:1.4\nblobstore.local.folder=/tmp/local-gcs-storage/tiamat/export\nspring.profiles.active=local-blobstore,activemq\n```\n\nTo start Tiamat with this configuration, specify **spring.config.location**:\n\n`java -jar -Dspring.config.location=/path/to/tiamat.properties --add-opens java.base/java.lang=ALL-UNNAMED -Denv=dev tiamat-0.0.2-SNAPSHOT.jar`\n\n## Database\n\n### HikariCP\nTiamat is using HikariCP. Most properties should be be possible to be specified in in application.properties, like `spring.datasource.initializationFailFast=false`. More information here. https://github.com/brettwooldridge/HikariCP/wiki/Configuration\nSee also http://stackoverflow.com/a/26514779\n\n## ID Generation\n### Background\nDuring the implementation of Tiamat was desirable to produce NeTEx IDs for stop places more or less gap less.\nThe reason for this implementation was legacy systems with restrictions of maximum number of digits.\n\n### Configure ID generation\nIt is possible to control whether IDs should be generated outside Tiamat or not. See the class ValidPrefixList.\nSetting the property `netex.validPrefix` tells Tiamat to generate IDs for new entities.\nPlease note that it is not possible to do an initial import (see ImportType) multiple times with the same IDs.\n\n### How its all connected\nIt's all initiated by an entity listener annotated with `PrePersist` on the class `IdentifiedEntity` called `IdentifiedEntityListener`.\n`NetexIdAssigner` determines if the entity already has an ID or not. `NetexIdProvider` either return a new ID or handles explicity claimed IDs if the configured prefix matches. See `ValidPrefixList` for the configuration of valid prefixes, and prefixes for IDs generated elsewhere. The `GaplessIdGeneratorService` uses Hazelcast to sync state between instances and avoid conflicts.\n\n\n## Keycloak/Auth0\nBoth Tiamat and Abzu are set up to be used with Keycloak or Auth0.\nA detailed guide on how to setup Keycloak can be found [here](./Keycloak_Setup_Guide.md).\n\n## Validation for incoming and outgoing NeTEx publication delivery\n\nIt is possible to configure if tiamat should validate incoming and outgoing NeTEx xml when unmarshalling or marshalling publication deliveries.\nDefault values are true. Can be deactivated with setting properties to false.\n```properties\npublicationDeliveryStreamingOutput.validateAgainstSchema=false\npublicationDeliveryUnmarshaller.validateAgainstSchema=true\n```\n\n## Synchronous NeTEx export with query params\nIt is possible to export stop places and topographic places directly to NeTEx format. This is the endpoint:\nhttps://api.dev.entur.io/stop-places/v1/netex\n\n### Query by name example:\n```http request\nGET https://api.dev.entur.io/stop-places/v1/netex?q=Arne%20Garborgs%20vei\n```\n\n### Query by ids that contains the number 3115\n```http request\nGET https://api.dev.entur.io/stop-places/v1/netex?q=3115\n```\n\n### Query by stop place type\n```http request\nGET https://api.dev.entur.io/stop-places/v1/netex?stopPlaceType=RAIL_STATION\n```\nIt is also possible with multiple types.\n\n### Query by municipality ID\n```http request\nGET https://api.dev.entur.io/stop-places/v1/netex?municipalityReference=KVE:TopographicPlace:1003\n```\n\n### Query by county ID\n```http request\nGET https://api.dev.entur.io/stop-places/v1/netex?countyReference=KVE:TopographicPlace:11\n```\n\n### Limit size of results\n```http request\nGET https://api.dev.entur.io/stop-places/v1/netex?size=1000\n```\n\n### Page\n```http request\nGET https://api.dev.entur.io/stop-places/v1/netex?page=1\n```\n\n### ID list\nYou can specify a list of NSR stop place IDs to return\n```http request\nGET https://api.dev.entur.io/stop-places/v1/netex?idList=NSR:StopPlace:3378\u0026idList=NSR:StopPlace:123\n```\n\n### All Versions\n```allVersions```. Acceptable values are true or false. If set to true, all versions of matching stop places will be returned.\nIf set to false, the highest version by number will be returned for matching stop places. This parameter is not enabled when using the version valitity parmaeter.\n\n### Stop places without location\nMatch only stop places without location\nUse the parameter: ```withoutLocationOnly=true```\n\n### Topographic export mode\nThe parameter ```topographicPlaceExportMode``` can be set to *NONE*, *RELEVANT* or *ALL*\nRelevant topographic places will be found from the exported list of stop places.\n\n### Tariff Zone export mode\nThe parameter ```tariffZoneExportMode``` can be set to *NONE*, *RELEVANT* or *ALL*\nRelevant tariff zones with be found from the exported list of stop places. Because stop places can have a list of tariff zone refs.\n\n### Group of stop places export mode\nThe parameter ```groupOfStopPlacesExportMode``` can be set to *NONE*, *RELEVANT* or *ALL*\nRelevant group of stop places can be found from the exported list of stop places.\n\n### Version validity\nThe ```versionValidity``` parameter controls what stop places to return.\n* ALL: returns all stops in any version (See allVersions attribute), regardless of version validity\n* CURRENT: returns only stop place versions valid at the current time\n* FUTURE_CURRENT: returns only stop place versions valid at the current time, as well as versions valid in the future.\n\n### Example\n```\nhttps://api.dev.entur.io/stop-places/v1/netex?tariffZoneExportMode=RELEVANT\u0026topographicPlaceExportMode=RELEVANT\u0026groupOfStopPlacesExportMode=NONE\u0026q=Nesbru\u0026versionValidity=CURRENT\u0026municipalityReference=KVE:TopographicPlace:0220\n```\n\nReturns stop places with current version validity now, matching the query 'Nesbru' and exists in municipality 0220. Fetches relevant tariff zones and topographic places.\n\n## Async NeTEx export from Tiamat\nAsynchronous export uploads exported data to google cloud storage. When initiated, you will get a job ID back.\nWhen the job is finished, you can download the exported data.\n\n*Most of the parameters from synchronous export works with asynchronous export as well!*\n\n### Start async export:\n```\ncurl https://api.dev.entur.io/stop-places/v1/netex/export/initiate\n```\nPro tip: Pipe the output from curl to xmllint to format the output:\n```\ncurl https://api.dev.entur.io/stop-places/v1/netex/export/initiate | xmllint --format -\n```\n\n### Check job status:\n```\ncurl https://api.dev.entur.io/stop-places/v1/netex/export\n```\n\n### When job is done. Download it:\n```\ncurl https://api.dev.entur.io/stop-places/v1/netex/export/130116/content | zcat | xmllint --format - \u003e export.xml\n```\n\nSee also https://rutebanken.atlassian.net/browse/NRP-924\n\n## Truncate data in tiamat database\nClean existing data in postgresql (streamline if frequently used):\n```\nTRUNCATE stop_place CASCADE;\nTRUNCATE quay CASCADE;\nTRUNCATE topographic_place CASCADE;\n```\n\n## Import data into Tiamat\n\nIf you are running this from `spring:run`, then you need to make sure that you have enough memory available for the java process (in case of large data sets).\nAnother issue is thread stack size, which might need to be increased when coping with really large NeTEx imports.\nExample:\n```\nexport MAVEN_OPTS='-Xms256m -Xmx1712m -Xss256m -XX:NewSize=64m -XX:MaxNewSize=128m -Dfile.encoding=UTF-8'\n```\n\n### Import NeTEx file without *NSR* IDs\nThis NeTEx file should not contain NSR ID. (The NSR prefix is configurable in the class ValidPrefixList)\n* Tiamat will match existing stops based on name and coordinates.\n* Tiamat will merge Quays inside stops that are close, have the same original ID and does not have too different compass bearing.\n\nTiamat will return the modified NeTEx structure with it's own NSR IDs. Original IDs will be present in key value list on each object.\n\n```shell\ncurl -XPOST -H\"Content-Type: application/xml\" -d@my-nice-netex-file.xml http://localhost:1997/services/stop_places/netex\n```\n\n### Importing with importType=INITIAL\n\nWhen importing with _importType=INITIAL_, a parallel stream will be created, spawning the original process. During import, user authorizations is checked, thus accessing SecurityContextHolder.\nBy default, SecurityContextHolder use DEFAULT\\_LOCAL\\_STRATEGY. When using INITIAL importType, you should tell Spring to use MODE\\_INHERITABLETHREADLOCAL for SecurityContextHolder, allowing Spring to duplicate Security Context in spawned threads.\nThis can be done setting env variable :\n```shell\n-Dspring.security.strategy=MODE_INHERITABLETHREADLOCAL\n```\n\nIf not, the application may complain about user not being authenticated if Spring tries to check authorization in a spawned process\n\n## GraphQL\nGraphQL endpoint is available on\n```\nhttps://api.dev.entur.io/stop-places/v1/graphql\n```\n\nTip: GraphiQL UI available on https://api.dev.entur.io/graphql-explorer/stop-places using *GraphiQL*:\nhttps://github.com/graphql/graphiql\n(Use e.g. `Modify Headers` for Chrome to add bearer-token for mutations)\n\n## Flyway\nTo create the database for tiamat, download and use the flyway command line tool:\nhttps://flywaydb.org/documentation/commandline/\n\n### Migrations\nMigrations are executed when tiamat is started.\n\n### Schema changes\nCreate a new file according to the flyway documentation in the folder `resources/db/migrations`.\nCommit the migration together with code changes that requires this schema change. Follow the naming convention.\n\n\n## Tiamat scripts\nVarious queries and scripts related to tiamat, has been collected here:\nhttps://github.com/entur/tiamat-scripts\n\n\n## CircleCI\nTiamat is built using CircleCI. See the .circleci folder.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentur%2Ftiamat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fentur%2Ftiamat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentur%2Ftiamat/lists"}