Open sevein opened 6 years ago
Assuming a URL is scheme:[//[user[:password]@]host[:port]][/path][?query][#fragment]
, are you proposing adding a new attribute to Pipeline
so that Pipeline().remote_url
must be a valid scheme:[//host[:port]]
?
Or are you thinking of modifying the logic around Pipeline().remote_name
so we can accept both scheme-less and schemed URLs?
Or are you thinking of modifying the logic around Pipeline().remote_name so we can accept both scheme-less and schemed URLs?
I didn't think much about it but I like the way ^ sounds. It would mean that we can solve the problem without a database migration - is that ok?
Sounds good to me.
I think that this issue needs to remain open until SS learns a new parameter that allows the user to indicate the URI of the pipeline in the create pipeline endpoint. This parameter should be provided by Archivematica when it performs the self-registration process.
@sromkey, I think that we can close this issue.
SS v0.11 included https://github.com/artefactual/archivematica-storage-service/pull/267 which made the following changes:
Pipeline.remote_name
as URLs (797d6a91c657a6a42296c3215b7ec634704a5e10).remote_name
(134e33b108d1304f68794de51389f94e4c34ddd1)SS_INSECURE_SKIP_VERIFY
env so TLS cert verification can be disabled when the scheme found in the URI is https
(ecacbec7d066f072966fc15342417b3ac381b929
)I think that these changes together already enabled the dashboard to provide a URI as the remote name. The remaining changes (provide a URI) need to happen in the AM repo.
SS stores the
remote_name
of a pipeline when it's created for consequent API access, e.g. re-ingest.This field is also editable from the web interface.
When a pipeline is created via the SS API, this field is populated after the
REMOTE_ADDR
header unless the client provides a value via theremote_name
property.The problem is that the dashboard doesn't allow users to provide a custom value so SS always fallbacks to the value found in the
REMOTE_ADDR
header which is problematic under some circumstances.