Skip to content

Commit 2328ed2

Browse files
committed
Release version 5.1.0
2 parents c5a42dd + ca8238a commit 2328ed2

157 files changed

Lines changed: 5437 additions & 2079 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.DS_Store
22
/target
33
/.env
4-
/data
54
/uploads
65
/nb-configuration.xml
76
/node
@@ -12,4 +11,5 @@
1211
/ssl
1312
/http-tests/ssl
1413
/http-tests/datasets
15-
/http-tests/uploads
14+
/http-tests/uploads
15+
/fuseki

CHANGELOG.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,67 @@
1+
## [5.1.0] - 2025-12-12
2+
### Added
3+
- ORCID OpenID Connect login support with JWT token verification
4+
- `CORSFilter` response filter for cross-origin resource sharing on static assets
5+
- Cache invalidation (BAN requests) for agent and user account lookup queries
6+
- New `Application::normalizeOrigin` method for origin normalization
7+
- `ldh:parent-origin` XPath function for parent origin retrieval
8+
- HTTP tests for CORS functionality, internal IP blocking, and form proxying
9+
- `ForbiddenExceptionMapper` for handling forbidden exceptions
10+
- `Content-Security-Policy` header for uploaded files to prevent XSS attacks
11+
- Sticky left and right navigation panels
12+
- Support for recursive content blocks
13+
- Docker volume for Varnish cache file persistence
14+
15+
### Changed
16+
- **BREAKING**: Admin application moved from `/admin/` path to `admin.` subdomain
17+
- **BREAKING**: Replaced `ldt:base` with `ldh:origin` in configuration (now uses absolute URIs with full domain names)
18+
- Refactored OAuth2 authentication with extracted base classes `AuthorizeBase`, `LoginBase`, and `JWTVerifier`
19+
- Provider-specific implementations for Google and ORCID OAuth flows in separate packages
20+
- Authorization queries now isolated by dataspace using `FILTER(strstarts(str(?g), str($base)))`
21+
- Optimized Varnish caching for authenticated requests with proper cache bypass for user-specific content
22+
- Root domain extraction logic replaced with configured `BASE_URI` from `Application.getBaseURI()`
23+
- Eliminated unnecessary wrapper methods (`getRootContextURI()`) in favor of direct `getSystem().getBaseURI()` calls
24+
- Client-side XSLT now uses `ldt:base()` function instead of `$ldt:base` parameter
25+
- OAuth and access request endpoints moved to end-user dataspace (no longer extend `GraphStoreImpl` or `SPARQLEndpointImpl`)
26+
- ID tokens now returned via URL fragment instead of query parameters
27+
- CLI scripts refactored: `--fragment` parameter renamed to `--uri`
28+
- Nginx configuration now exempts internal requests from rate limiting
29+
- Parameterized nginx and Varnish configurations for better flexibility
30+
- Improved `ClientUriRewriteFilter` to use configured host instead of hardcoded localhost
31+
- Agent metadata and authorizations now managed per-app in entrypoint.sh
32+
- Separated templates for owner and secretary authorizations
33+
- Fuseki data directory changed in Docker configuration
34+
- `$ORIGIN` environment variable now excludes default ports (80/443)
35+
- WYMEditor cross-origin compatibility fixes
36+
- Replaced `ldh:new` with `ixsl:new` in client-side code
37+
38+
### Fixed
39+
- Fixed security vulnerability [LNK-002 (cache poisoning)](https://github.com/AtomGraph/LinkedDataHub/issues/253)
40+
- Fixed security vulnerability [LNK-004 (path traversal)](https://github.com/AtomGraph/LinkedDataHub/issues/252)
41+
- Fixed security vulnerability [LNK-009 (SSRF - internal IP address proxying)](https://github.com/AtomGraph/LinkedDataHub/issues/250)
42+
- Fixed security vulnerability [LNK-011 (XSS via uploaded files)](https://github.com/AtomGraph/LinkedDataHub/issues/254)
43+
- Fixed Billion Laughs [XML entity expansion exploit](https://github.com/AtomGraph/LinkedDataHub/issues/249) by excluding Xerces dependency
44+
- Fixed OpenLayers map dragging functionality
45+
- Fixed graph layout rendering issues
46+
- Fixed SPARQL update and `application/x-www-form-urlencoded` proxying
47+
- Fixed access request URL building and modal form display
48+
- Fixed `ldh:Shape` mode in XSLT
49+
- Fixed HTML reloading after OAuth login
50+
- Improved SHACL support in UI with better form controls
51+
- Fixed performance regression in `ClientUriRewriteFilter` for production deployments
52+
- Fixed agent and user account duplicate creation via proper cache invalidation
53+
- Fixed same-site URI resolution for XSLT document loading across subdomains
54+
- Fixed entrypoint to load datasets for all configured apps
55+
- Fixed authorization filter to handle non-existent dataspaces (throws `NotFoundException`)
56+
57+
### Removed
58+
- Removed `RequestAccess` resource from admin package (moved to end-user)
59+
- Removed `admin/oauth2` package (OAuth moved to end-user dataspace)
60+
- Removed XOM dependency
61+
- Removed rate limiting tests from HTTP test suite
62+
- Removed debug output from entrypoint and test scripts
63+
- Removed unused namespace declarations
64+
165
## [5.0.23] - 2025-09-11
266
### Added
367
- Drag handles for content blocks - blocks can now only be dragged by their dedicated drag handles

Dockerfile

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RUN mvn -Pstandalone clean install
2222

2323
# ==============================
2424

25-
FROM atomgraph/letsencrypt-tomcat:10.1.34
25+
FROM atomgraph/letsencrypt-tomcat:10.1.46
2626

2727
LABEL maintainer="martynas@atomgraph.com"
2828

@@ -72,14 +72,12 @@ ENV OWNER_CERT_ALIAS=root-owner
7272
ENV OWNER_KEYSTORE=/var/linkeddatahub/ssl/owner/keystore.p12
7373
ENV OWNER_CERT=/var/linkeddatahub/ssl/owner/cert.pem
7474
ENV OWNER_PUBLIC_KEY=/var/linkeddatahub/ssl/owner/public.pem
75-
ENV OWNER_PRIVATE_KEY=/var/linkeddatahub/ssl/owner/private.key
7675

7776
ENV SECRETARY_COMMON_NAME=LinkedDataHub
7877
ENV SECRETARY_CERT_ALIAS=root-secretary
7978
ENV SECRETARY_KEYSTORE=/var/linkeddatahub/ssl/secretary/keystore.p12
8079
ENV SECRETARY_CERT=/var/linkeddatahub/ssl/secretary/cert.pem
8180
ENV SECRETARY_PUBLIC_KEY=/var/linkeddatahub/ssl/secretary/public.pem
82-
ENV SECRETARY_PRIVATE_KEY=/var/linkeddatahub/ssl/secretary/private.key
8381

8482
ENV CLIENT_KEYSTORE_MOUNT=/var/linkeddatahub/ssl/secretary/keystore.p12
8583
ENV CLIENT_KEYSTORE="$CATALINA_HOME/webapps/ROOT/WEB-INF/keystore.p12"
@@ -147,12 +145,22 @@ COPY platform/import-letsencrypt-stg-roots.sh import-letsencrypt-stg-roots.sh
147145

148146
COPY platform/select-root-services.rq select-root-services.rq
149147

150-
# copy the metadata of the built-in secretary agent
148+
COPY platform/select-agent-metadata.rq select-agent-metadata.rq
149+
150+
# copy the metadata of built-in agents
151151

152152
COPY platform/root-secretary.trig.template root-secretary.trig.template
153153

154154
COPY platform/root-owner.trig.template root-owner.trig.template
155155

156+
COPY platform/root-secretary-authorization.trig.template root-secretary-authorization.trig.template
157+
158+
COPY platform/root-owner-authorization.trig.template root-owner-authorization.trig.template
159+
160+
# copy the metadata of the namespace ontology
161+
162+
COPY platform/namespace-ontology.trig.template namespace-ontology.trig.template
163+
156164
# copy default datasets
157165

158166
COPY platform/datasets/admin.trig /var/linkeddatahub/datasets/admin.trig
@@ -197,7 +205,7 @@ RUN useradd --no-log-init -U ldh && \
197205
RUN ./import-letsencrypt-stg-roots.sh
198206

199207
HEALTHCHECK --start-period=80s --retries=5 \
200-
CMD curl -f -I "http://localhost:${HTTP_PORT}/ns" -H "Accept: application/n-triples" || exit 1 # relies on public access to the namespace document
208+
CMD curl -f -I "http://localhost:7070/ns" -H "Accept: application/n-triples" || exit 1 # relies on public access to the namespace document
201209

202210
USER ldh
203211

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,17 @@ It takes a few clicks and filling out a form to install the product into your ow
2828
### Prerequisites
2929

3030
* `bash` shell 4.x. It should be included by default on Linux. On Windows you can install the [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10).
31-
* [`openssl`](https://www.openssl.org/) available on `$PATH`
3231
* [Docker](https://docs.docker.com/install/) installed. At least 8GB of memory dedicated to Docker is recommended.
3332
* [Docker Compose](https://docs.docker.com/compose/install/) installed
3433

34+
#### CLI scripts
35+
36+
The following tools are required for CLI scripts in the `bin/` directory:
37+
38+
* [`curl`](https://curl.se/)
39+
* [`openssl`](https://www.openssl.org/)
40+
* `python` 3.x
41+
3542
### Steps
3643

3744
1. [Fork](https://guides.github.com/activities/forking/) this repository and clone the fork into a folder
@@ -270,11 +277,11 @@ LinkedDataHub includes an HTTP [test suite](https://github.com/AtomGraph/LinkedD
270277
* [SPARQLBuilder](https://github.com/AtomGraph/sparql-builder)
271278
* [OpenLayers](https://openlayers.org)
272279
* [Google Charts](https://developers.google.com/chart)
280+
* [xml-c14n-sync](https://github.com/AtomGraph/xml-c14n-sync)
273281

274282
### Java
275283

276284
* [Jersey](https://eclipse-ee4j.github.io/jersey/)
277-
* [XOM](http://www.xom.nu)
278285
* [JavaMail](https://javaee.github.io/javamail/)
279286
* [Guava](https://github.com/google/guava)
280287
* [java-jwt](https://github.com/auth0/java-jwt)

bin/add-generic-service.sh

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env bash
2+
set -eo pipefail
23

34
print_usage()
45
{
@@ -16,6 +17,7 @@ print_usage()
1617
printf " --description DESCRIPTION Description of the service (optional)\n"
1718
printf " --slug SLUG String that will be used as URI path segment (optional)\n"
1819
printf "\n"
20+
printf " --uri URI URI of the service (optional)\n"
1921
printf " --endpoint ENDPOINT_URI Endpoint URI\n"
2022
printf " --graph-store GRAPH_STORE_URI Graph Store URI (optional)\n"
2123
printf " --auth-user AUTH_USER Authorization username (optional)\n"
@@ -43,6 +45,11 @@ do
4345
shift # past argument
4446
shift # past value
4547
;;
48+
--proxy)
49+
proxy="$2"
50+
shift # past argument
51+
shift # past value
52+
;;
4653
--title)
4754
title="$2"
4855
shift # past argument
@@ -53,8 +60,8 @@ do
5360
shift # past argument
5461
shift # past value
5562
;;
56-
--fragment)
57-
fragment="$2"
63+
--uri)
64+
uri="$2"
5865
shift # past argument
5966
shift # past value
6067
;;
@@ -69,7 +76,8 @@ do
6976
shift # past value
7077
;;
7178
--auth-user)
72-
auth_user=true
79+
auth_user="$2"
80+
shift # past argument
7381
shift # past value
7482
;;
7583
--auth-pwd)
@@ -85,6 +93,8 @@ do
8593
done
8694
set -- "${args[@]}" # restore args
8795

96+
target="$1"
97+
8898
if [ -z "$cert_pem_file" ] ; then
8999
print_usage
90100
exit 1
@@ -112,10 +122,13 @@ args+=("-p")
112122
args+=("$cert_password")
113123
args+=("-t")
114124
args+=("text/turtle") # content type
125+
if [ -n "$proxy" ]; then
126+
args+=("--proxy")
127+
args+=("$proxy")
128+
fi
115129

116-
if [ -n "$fragment" ] ; then
117-
# relative URI that will be resolved against the request URI
118-
subject="<#${fragment}>"
130+
if [ -n "$uri" ] ; then
131+
subject="<${uri}>"
119132
else
120133
subject="_:subject"
121134
fi
@@ -142,8 +155,8 @@ if [ -n "$auth_pwd" ] ; then
142155
turtle+="${subject} a:authPwd \"${auth_pwd}\" .\n"
143156
fi
144157
if [ -n "$description" ] ; then
145-
turtle+="_:query dct:description \"${description}\" .\n"
158+
turtle+="${subject} dct:description \"${description}\" .\n"
146159
fi
147160

148161
# submit Turtle doc to the server
149-
echo -e "$turtle" | post.sh "${args[@]}"
162+
echo -e "$turtle" | turtle --base="$target" | post.sh "${args[@]}"

bin/add-result-set-chart.sh

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env bash
2+
set -eo pipefail
23

34
print_usage()
45
{
@@ -14,7 +15,7 @@ print_usage()
1415
printf "\n"
1516
printf " --title TITLE Title of the chart\n"
1617
printf " --description DESCRIPTION Description of the chart (optional)\n"
17-
printf " --fragment STRING String that will be used as URI fragment identifier (optional)\n"
18+
printf " --uri URI URI of the chart (optional)\n"
1819
printf "\n"
1920
printf " --query QUERY_URI URI of the SELECT query\n"
2021
printf " --chart-type TYPE_URI URI of the chart type\n"
@@ -43,6 +44,11 @@ do
4344
shift # past argument
4445
shift # past value
4546
;;
47+
--proxy)
48+
proxy="$2"
49+
shift # past argument
50+
shift # past value
51+
;;
4652
--title)
4753
title="$2"
4854
shift # past argument
@@ -53,8 +59,8 @@ do
5359
shift # past argument
5460
shift # past value
5561
;;
56-
--fragment)
57-
fragment="$2"
62+
--uri)
63+
uri="$2"
5864
shift # past argument
5965
shift # past value
6066
;;
@@ -86,6 +92,8 @@ do
8692
done
8793
set -- "${args[@]}" # restore args
8894

95+
target="$1"
96+
8997
if [ -z "$cert_pem_file" ] ; then
9098
print_usage
9199
exit 1
@@ -125,10 +133,13 @@ args+=("-p")
125133
args+=("$cert_password")
126134
args+=("-t")
127135
args+=("text/turtle") # content type
136+
if [ -n "$proxy" ]; then
137+
args+=("--proxy")
138+
args+=("$proxy")
139+
fi
128140

129-
if [ -n "$fragment" ] ; then
130-
# relative URI that will be resolved against the request URI
131-
subject="<#${fragment}>"
141+
if [ -n "$uri" ] ; then
142+
subject="<${uri}>"
132143
else
133144
subject="_:subject"
134145
fi
@@ -148,4 +159,4 @@ if [ -n "$description" ] ; then
148159
fi
149160

150161
# submit Turtle doc to the server
151-
echo -e "$turtle" | post.sh "${args[@]}"
162+
echo -e "$turtle" | turtle --base="$target" | post.sh "${args[@]}"

0 commit comments

Comments
 (0)