-
Notifications
You must be signed in to change notification settings - Fork 1
Problem: Edit pipeline form resets API key #1789
Copy link
Copy link
Open
Labels
Status: reviewThe issue's code has been merged and is ready for testing/review.The issue's code has been merged and is ready for testing/review.
Milestone
Description
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 reingestjob appears in theIngesttab of the Dashboard. This shows that the Storage Service can successfully authenticate with the pipeline. - In the Storage Service, go to the
Pipelinestab and clickEditfor a pipeline. - Beware: submitting this form with a blank
API keyfield will erase the existing API key value. - Change the pipeline
Description, leaving theAPI keyfield blank, then clickEdit 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:
- All pull requests related to this issue are properly linked
- All pull requests related to this issue have been merged
- A testing plan for this issue has been implemented and passed (testing plan information should be included in the issue body or comments)
- Documentation regarding this issue has been written and merged (if applicable)
- Details about this issue have been added to the release notes (if applicable)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Status: reviewThe issue's code has been merged and is ready for testing/review.The issue's code has been merged and is ready for testing/review.