Skip to content

Read new env vars from updated DSpace credentials secrets - #269

Merged
jonavellecuerdo merged 1 commit into
mainfrom
DSO-126-read-new-env-vars-for-new-secrets
Sep 22, 2026
Merged

jonavellecuerdo merged 1 commit into
mainfrom
DSO-126-read-new-env-vars-for-new-secrets

Conversation

@jonavellecuerdo

@jonavellecuerdo jonavellecuerdo commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Purpose and background context

The old DSpace6 instances have been fully retired, and we are only dealing with credential sets for MIT Open Scholarship (dspace.mit.edu) and Digital Collections (dome.mit.edu). This allowed us the opportunity to clean up and rework storage and access to DSpace credentials used by DSO and other apps interacting with DSpace.

How can a reviewer manually see the effects of these changes?

Note the following logs:

2026-09-22 13:30:34,607 INFO root.authenticate_with_credentials(): Authenticated successfully as lib-dspace-submit@mit.edu
2026-09-22 13:30:34,607 INFO dsc.workflows.digitized_theses.workflow.dspace_client(): Successfully authenticated to https://dspace-test.mit.edu/server/api as lib-dspace-submit@mit.edu

Includes new or updated dependencies?

NO

Changes expectations for external applications?

NO

What are the relevant tickets?

Code review

  • Code review best practices are documented here and you are encouraged to have a constructive dialogue with your reviewers about their preferences and expectations.

@jonavellecuerdo
jonavellecuerdo force-pushed the DSO-126-read-new-env-vars-for-new-secrets branch from f00be47 to 472f409 Compare September 22, 2026 13:27
@jonavellecuerdo
jonavellecuerdo marked this pull request as ready for review September 22, 2026 13:31
@jonavellecuerdo
jonavellecuerdo requested a review from a team as a code owner September 22, 2026 13:31

@ghukill ghukill 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.

I've requested a change, but it's purely linting-esque. So my review is an approval and the change is ultimately optional; approval stands either way.

Looks good!

Comment thread dsc/workflows/digitized_theses/workflow.py Outdated
Comment thread dsc/config.py
Comment on lines +173 to +182
def get_dspace_credentials(self, submission_system: Literal["IR-8", "DDC-8"]) -> dict:
"""Get parsed dspace credentials."""
if submission_system == "IR-8":
return self.openschol_rw_api_credentials_json
if submission_system == "DDC-8":
return self.digcoll_rw_api_credentials_json

raise ValueError(
f"'submission_system' should be one of ['IR-8', 'DDC-8'], got '{submission_system}'" # noqa: E501
)

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.

This is nice!

Why these changes are being introduced:
* The old DSpace6 instances have been fully retired, and we are only
dealing with credential sets for MIT Open Scholarship (dspace.mit.edu) and
Digital Collections (dome.mit.edu). This allowed us the opportunity to
clean up and rework storage and access to DSpace credentials used by
DSO and other apps interacting with DSpace.

How this addresses that need:
* Config reads new DSpace API credentials env vars
* Config includes method to get correct dspace credentials based on
submission system (i.e., one of ["IR-8", "DDC-8"])
* Standardize `Workflow.submission_system` class attribute
* Digitized theses workflow updates `DSpaceClient` with access headers (if set)

Side effects of this change:
* None

Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/DSO-126
* https://mitlibraries.atlassian.net/browse/DSO-131
@jonavellecuerdo
jonavellecuerdo force-pushed the DSO-126-read-new-env-vars-for-new-secrets branch from 472f409 to fba73bb Compare September 22, 2026 13:58

workflow_name: str = "archivesspace"
submission_system: str = "Dome"
submission_system: Literal["IR-8", "DDC-8"] = "DDC-8"

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.

Sweet!

@jonavellecuerdo
jonavellecuerdo merged commit 6b436b1 into main Sep 22, 2026
6 checks passed
@jonavellecuerdo
jonavellecuerdo deleted the DSO-126-read-new-env-vars-for-new-secrets branch September 22, 2026 14:07
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.

3 participants