Informatievlaanderen / VSDS-LDESServer4J

Linked Data Event Streams Server for Java
https://informatievlaanderen.github.io/VSDS-LDESServer4J
European Union Public License 1.2
9 stars 8 forks source link

Profiles not used? #1142

Closed bauwelp-awv closed 4 months ago

bauwelp-awv commented 6 months ago

Describe the bug On the github readme, a lot is written about using profiles to enable specific parts, but I have the feeling that the profiles are not used at runtime and everything is always enabled.

To Reproduce In our environment we want to split the LDES-server in a read-only process to serve the eventstreams and a write process to do the ingestation and administration.

For this we run the docker image with environment variable SPRING_PROFILES_ACTIVE=http-fetch,storage-mongo for the read-only process.

In the logs I see that these profiles are picked up:

b.v.i.ldes.server.Application : The following 2 profiles are active: "http-fetch", "storage-mongo"

But I am able to for example DELETE an event-stream:

.s.a.r.c.AdminEventStreamsRestController : START deleting generic-eventstream

Expected behavior Endpoints under the /admin endpoint should not work, but they DO work!

Additional context Our goal is to run the LDES-server in a Kubernetes environment, split up the admin/ingest from the event-stream servers to apply different security to both and to allow different scaling to both (multiple event-stream servers).

Tomvbe commented 6 months ago

The profiles mentioned in the documentation are maven profiles. These can be used to include/exclude modules when building your own jar files or docker images. If you are using our published ldes-server image, then all maven modules are included. I will take this idea to the team to discuss if we want to make this more dynamic using spring profiles.

Note that we recently merged a story (https://github.com/Informatievlaanderen/VSDS-LDESServer4J/pull/1129/files) that could help for your use case of splitting admin/ingest. It is possible to serve ingest/fetch/admin on different ports. This way you can disable the admin endpoint as well.

Yalz commented 6 months ago

@bauwelp-awv does this proposed solution suit your needs? this should be avaiable in the latest snapshot build on dockerhub.

Yalz commented 4 months ago

Closing issue because of staleness