kit-data-manager / kit-data-manager/wap-server

Handling of low ports (80, 443)

Open
#72 0 comments 0 reactions 0 assignees View on GitHub
documentation
Dominant language
Java
Stars
4
Forks
3
PR merge metrics
No merged PRs in 30d

Description

This needs further investigation, but something may be amiss with using low ports which should be excluded from requests.

1.
The RESTapi is quite benevolent and will answer both to http://localhost/ and http://localhost:80 requests, while internally the IRI will be set to http://localhost. This may cause confusing side effects such as empty results for SPARQL requests expecting IRIs starting with localhost:80. While this is already somewhat documented in https://github.com/kit-data-manager/wap-server/blob/main/howtos/root_container.md , a more prominent documentation may be warranted.

2.
Running the dockerized version, the following combination works:
- setting host port to 80
- setting `WapBaseUrl` to `http://localhost`

However, if `WapBaseUrl` is erronously set to `http://localhost:80`, this is taken literally (IRIs in the jena db now start with localhost:80, but due to request rewriting, they basically become unreachable, because all requests will go to http://localhost/wap/ instead. While this is somewhat of an configuration error, we may still be able to handle this case more gracefully. At minimum this may also warrant more prominent documentation -> URI definitions (and requests) should never include those low ports explicitly to avoid problems.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with howtos/root_container.md and the WapBaseUrl configuration used by the Dockerized version. Reproduce the behavior with ports 80 and 443, then trace how request rewriting and stored IRIs differ. Done means the low-port behavior is clearly documented and, if feasible, the configuration error is handled more gracefully.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
api, backend, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.