Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not persist the jupyter baseUrl in pipelines #2775

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

ajbozarth
Copy link
Member

The changes in #2728 cause the pipeline-editor to persist the full
url for a node's image. This could cause issues with surfacing PI,
as such I've updated that fix to instead use the full URL path,
which will behave the same as before the fix, but including the
URL path from the baseUrl if one exists.

Note that if a baseUrl path conatains PI that would still be
persisted, but putting PI in a URL path is considered inappropriate
handling of PI by the server owner, not Elyra.

Fixes #2773

Developer's Certificate of Origin 1.1

   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

The changes in elyra-ai#2728 cause the pipeline-editor to persist the full
url for a node's image. This could cause issues with surfacing PI,
as such I've updated that fix to instead use the full URL base,
which will behave the same as before the fix, but including the
URL path from the baseUrl if one exists.

Note that if a baseUrl path conatains PI that would still be
persisted, but puting PI in a URL path is considered inappropriate
handling of PI by the server owner, not Elyra.

Fixes elyra-ai#2773
@ajbozarth ajbozarth added this to the 3.9.1 milestone Jun 8, 2022
@ajbozarth ajbozarth self-assigned this Jun 8, 2022
@elyra-bot
Copy link

elyra-bot bot commented Jun 8, 2022

Thanks for making a pull request to Elyra!

To try out this branch on binder, follow this link: Binder

Copy link
Member

@marthacryan marthacryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM but I haven't tested locally

Copy link
Member

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Confirmed entries change:
ui_data entry goes from ...

            "ui_data": {
              "label": "Calculate data hash",
              "image": "http://localhost:8888/static/elyra/kubeflow.svg",
              "x_pos": 37,
              "y_pos": 364.5
            }

to

            "ui_data": {
              "label": "Calculate data hash",
              "image": "/static/elyra/kubeflow.svg",
              "x_pos": 37,
              "y_pos": 364.5
            }

@ajbozarth
Copy link
Member Author

Also as a note due to how this field is handled this will also update any pipeline that is opened/edited, so there no worry about pipelines that already persisted the full url with a domain or ip

@ptitzler
Copy link
Member

ptitzler commented Jun 9, 2022

Note that if a baseUrl path conatains PI that would still be
persisted, but putting PI in a URL path is considered inappropriate
handling of PI by the server owner, not Elyra.

A user might not necessarily have control over this. For example, Elyra deployments running as Kubeflow Notebook Server the URL is
http://<host-domain>:<port>/notebook/<kubernetes-namespace>/<user-provided-name>/static/elyra/kubeflow.svg:

image

The namespace is something an administrator configures, not necessarily the person who deploys Elyra as a notebook server.

@kevin-bates
Copy link
Member

@ptitzler - that's a good point. Couldn't we persist the "suffix portion" and strip anything prior to static/elyra? Then, these values are identical across pipelines and independent of base_url.

@ajbozarth
Copy link
Member Author

Couldn't we persist the "suffix portion" and strip anything prior to static/elyra

That was the behavior prior to my fix that caused this, so that would just revert the fix and bring back the issue it solved.

Overall this is a limitation of canvas not elyra, and if including any of the baseUrl is a problem then we will just need to return to using base64 encoded strings for the images like we did before moving them to the server

Copy link
Member

@ptitzler ptitzler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Confirmed that host/domain/port information is no longer persisted in the .pipeline file. We should follow up in the future and implement a solution that does not expose potentially sensitive information that might be included in the URL path. Example value for an Elyra deployment on a Kubeflow Notebook server:

/notebook/kubeflow-user-example-com/test2/static/elyra/kubeflow.svg

@lresende
Copy link
Member

lresende commented Jun 9, 2022

Note that, storing environment-specific details, such as host+port also breaks the ability to share the pipelines with others.

@ptitzler
Copy link
Member

ptitzler commented Jun 9, 2022

Note that, storing environment-specific details, such as host+port also breaks the ability to share the pipelines with others.

Right, that concern was why I've created the issue in the first place! In this specific case though it turns out it doesn't impact portability of pipeline files between environments. We definitely need to continue to watch out for these things.

@akchinSTC akchinSTC merged commit ad8f993 into elyra-ai:main Jun 9, 2022
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.

pipeline file contains reference to potentially invalid custom component image
6 participants