Skip to content

SAV/Fix dspace-customers 1083 finding 29: create the Shibboleth SP key when the container starts - #1697

Open
milanmajchrak wants to merge 2 commits into
customer/savfrom
sav/be-shib-sp-key-at-start
Open

milanmajchrak wants to merge 2 commits into
customer/savfrom
sav/be-shib-sp-key-at-start

Conversation

@milanmajchrak

@milanmajchrak milanmajchrak commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

References

dspace-customers issue 1083, finding 29. Same change as #1693 (commits d34a597 and 4c07eb6) on dtq-dev.

Description

The dspace-shibboleth test image now creates the Shibboleth SP key pair and Apache's self-signed certificate when a container starts for the first time, not during docker build. The image itself contains no private key file.

Instructions for Reviewers

List of changes in this PR:

  • Dockerfile: the shib-keygen step is removed. The ssl-cert-snakeoil files that the ssl-cert package creates are deleted in the same step that installs it.
  • httpd-shibd-foreground.sh: same file as on dtq-dev. It runs shib-keygen -b -o /etc/shibboleth and make-ssl-cert generate-default-snakeoil before shibd and Apache start, keeps files that already exist, and stops with a clear message if only one of sp-key.pem and sp-cert.pem exists.
  • README.md: a short note on where the keys come from and how to keep a fixed SP key.

The test commands from the dtq-dev PR pass on #1694, whose dspace-shibboleth folder is the same as on this branch: the image has no private key file, two containers get different keys, a mounted pair is kept, a restart keeps the key, and shibd and Apache run.

Codex review (gpt-6.2-sol, high) of the first commit: it raised new IdP metadata after recreating a container (step 5 of the docker-compose README covers the upload, and the README says how to keep a fixed key). Left as is. The second commit is the same diff as on dtq-dev, where Codex reviewed it.

AI Disclosure (REQUIRED)

Were AI tools used in the creation of this PR?

  • No (This PR does NOT include AI-generated or AI-assisted content that requires disclosure.)
  • Yes (This PR includes AI-generated or AI-assisted content that requires disclosure.)

Claude Code applied the dtq-dev change to this branch and ran the same Docker test on #1694, which has the same files.

Checklist

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & integration tests). Exceptions may be made if previously agreed upon.
  • My PR follows all coding best practices based on the Code Conventions Guide.
  • My PR passes Checkstyle validation based on the Code Style Guide.
  • My PR includes Javadoc for all new (or modified) public methods and classes. It also includes Javadoc for large or complex private methods.
  • My PR passes all tests and includes new/updated Unit or Integration Tests based on the Code Testing Guide.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in any pom.xml), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR modifies REST API endpoints, I've opened a separate REST Contract PR related to this change.
  • If my PR includes new configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

🤖 Generated with Claude Code

milanmajchrak and others added 2 commits November 18, 2026 13:43
The test image ran shib-keygen at build time, so every container shared one key pair stored in an image layer. The startup script now creates it on the first start and keeps an existing or mounted pair.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit d34a597)
The startup script now also runs make-ssl-cert, so the image contains no private key file. Existing files are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 4c07eb6)

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.

1 participant