Skip to content

Added a public certificate service for downloading certificates - #459

Open
stasel wants to merge 2 commits into
mainfrom
certificate-public-service
Open

stasel wants to merge 2 commits into
mainfrom
certificate-public-service

Conversation

@stasel

@stasel stasel commented Nov 5, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI balanced review requested due to automatic review settings November 5, 2026 19:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The certificate page repeats the unsupported inline PDF embed in its fallback and provides no download link, preventing affected users from opening or downloading valid certificates.

1 open issue
What changed in this PR

Adds a public certificate site to the Spring backend so visitors can verify certificates and access their PDFs without signing in.

Changes:

  • Adds certificate pages, PDF delivery, static assets, and storage existence checks.
  • Routes the certificates domain through nginx and permits public access and same-origin PDF embedding.
  • Adds endpoint tests and documents the certificate service.
File Description
server-spring/​src/​test/​java/​nl/​hackyourfuture/​dojoserver/​certificate/​CertificateTest.java Tests public pages, PDFs, assets, and missing certificates.
server-spring/​src/​main/​resources/​certificates/​static/​verified-icon.svg Adds the verification badge.
server-spring/​src/​main/​resources/​certificates/​static/​robots.txt Requests that crawlers avoid the site.
server-spring/​src/​main/​resources/​certificates/​static/​index.css Styles the certificate page and PDF border.
server-spring/​src/​main/​resources/​certificates/​static/​404.css Styles the not-found page.
server-spring/​src/​main/​resources/​certificates/​pages/​index.html Displays certificate validity and embeds the PDF.
server-spring/​src/​main/​resources/​certificates/​pages/​404.html Provides a certificate-not-found page.
server-spring/​src/​main/​java/​nl/​hackyourfuture/​dojoserver/​filestorage/​FileStorageService.java Adds a storage object existence check.
server-spring/​src/​main/​java/​nl/​hackyourfuture/​dojoserver/​config/​security/​SecurityConfig.java Allows public certificate access and same-origin embedding.
server-spring/​src/​main/​java/​nl/​hackyourfuture/​dojoserver/​certificate/​CertificateController.java Serves certificate pages, PDFs, assets, and HTML errors.
server-spring/​AGENTS.md Documents backend certificate behavior.
client/​nginx.conf Adds certificate-domain proxying and a content security policy.
AGENTS.md Documents the certificate feature’s location and routing.

Review effort: Balanced

Comment on lines +19 to +21
<object id="pdf-object" data="/XXXXXXXX?raw=1#toolbar=0" type="application/pdf">
<embed src="/XXXXXXXX?raw=1" type="application/pdf" />
</object>
@stasel
stasel force-pushed the certificate-public-service branch from 319131d to de74e23 Compare November 5, 2026 19:17
@stasel
stasel force-pushed the certificate-public-service branch from de74e23 to 1d67083 Compare November 6, 2026 09:47

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants