Expected behaviour
When editing a pipeline in the Storage Service, leaving the API key field blank on form submission should preserve the existing value instead of overwriting it.
Current behaviour
When the API key field is left blank and the form is submitted, the existing value is overwritten with an empty string.
Steps to reproduce
- Start an AIP reingest from either the Archivematica Dashboard or the Storage Service.
- Confirm that a new
Approve AIP reingest job appears in the Ingest tab of the Dashboard. This shows that the Storage Service can successfully authenticate with the pipeline.
- In the Storage Service, go to the
Pipelines tab and click Edit for a pipeline.
- Beware: submitting this form with a blank
API key field will erase the existing API key value.
- Change the pipeline
Description, leaving the API key field blank, then click Edit Pipeline.
- Start another AIP reingest in the edited pipeline.
- Notice that authentication now fails, either in the Storage Service UI or in the Storage Service logs.
DEBUG 2026-03-18 15:01:50 archivematica.storage_service.locations.models.pipeline:pipeline:_request_api:174: URL: https://myserver.example.com/api/ingest/reingest; headers {'Authorization': 'ApiKey test:'}; data: {'name': 'tmphiku5h5y/reingest-test-e9bd5c80-4ec4-43ad-a868-8a065e5f642c', 'uuid': 'e9bd5c80-4ec4-43ad-a868-8a065e5f642c'}
DEBUG 2026-03-18 15:01:50 archivematica.storage_service.locations.models.pipeline:pipeline:_request_api:189: Response: 403 {"message": "API key not valid.", "error": true}
ERROR 2026-03-18 15:01:50 archivematica.storage_service.locations.models.package:package:start_reingest:2369: Error approving reingest in pipeline for package e9bd5c80-4ec4-43ad-a868-8a065e5f642c
Traceback (most recent call last):
File "/opt/archivematica/archivematica-storage-service/src/archivematica/storage_service/locations/models/package.py", line 2366, in start_reingest
resp = pipeline.reingest(relative_path, self.uuid, reingest_target)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/archivematica/archivematica-storage-service/src/archivematica/storage_service/locations/models/pipeline.py", line 224, in reingest
raise requests.exceptions.RequestException(
requests.exceptions.RequestException: Pipeline Archivematica on myserver (dc158f14-8f54-4276-91ca-8bcb05281479) returned an unexpected status code: 403 (API key not valid.)
Your environment (version of Archivematica, operating system, other relevant details)
artefactual/archivematica@0948311
artefactual/archivematica-storage-service@4f7d151
Found during a 1.18.0 upgrade.
For Artefactual use:
Before you close this issue, you must check off the following:
Expected behaviour
When editing a pipeline in the Storage Service, leaving the
API keyfield blank on form submission should preserve the existing value instead of overwriting it.Current behaviour
When the
API keyfield is left blank and the form is submitted, the existing value is overwritten with an empty string.Steps to reproduce
Approve AIP reingestjob appears in theIngesttab of the Dashboard. This shows that the Storage Service can successfully authenticate with the pipeline.Pipelinestab and clickEditfor a pipeline.API keyfield will erase the existing API key value.Description, leaving theAPI keyfield blank, then clickEdit Pipeline.Your environment (version of Archivematica, operating system, other relevant details)
artefactual/archivematica@0948311
artefactual/archivematica-storage-service@4f7d151
Found during a 1.18.0 upgrade.
For Artefactual use:
Before you close this issue, you must check off the following: