Skip to content

Implement Webdav#1390

Open
dylanmcreynolds wants to merge 2 commits into
bluesky:mainfrom
als-computing:webdav
Open

Implement Webdav#1390
dylanmcreynolds wants to merge 2 commits into
bluesky:mainfrom
als-computing:webdav

Conversation

@dylanmcreynolds
Copy link
Copy Markdown
Contributor

Checklist

  • Add a Changelog entry
  • Add tests
  • Add user documnetation
  • Add UI for token generation
  • Remove WebDAV-specific scopes
  • Look at writable WebDAV
  • Add default max for number of children to present...most recent 200?

WebDAV is a protocal for access folders over HTTP requests. Several methods and status codes were added to HTTP for WebDAV.

MacOs, Linux and Windows all have native support for mapping WebDAV servers from their explorers. (For Linux, I tested Nautilus, but I'm pretty sure the Konquerer can as well.) This makes a WebDAV endpoint a pretty useful way for people to access the data in WebDAV servers. This PR is intended to make it easier for users to use tiled in their day to day workflows.

Tiled does not by default present data as files. To make easy for users to interact with their data on the desktop, this endpoint presents nodes for the underlying file. So, for example, if you expnd an array node, the server will present the underlying component files as children.

WebDAV does not have any built-semantics for paging. Once can certaily use query parameters, but the stock clients (Finder, Win Explorer, Nautilus) don't support it. So, we need some mechanism to reduce overall number of children to return in a collection. This is especially true of bluesky beamline data, where there may be tens or hundreds of thousands of runs in a single collection.

@checkmarx-gh-ast-us-povs
Copy link
Copy Markdown

Logo
Checkmarx One – Scan Summary & Details31bfa315-b969-42fa-8789-1c2c206afafa


New Issues (3) Checkmarx found the following issues in this Pull Request
# Severity Issue Source File / Package Checkmarx Insight
1 HIGH Passwords And Secrets - Password in URL /ci.yml: 99
detailsQuery to find passwords and secrets in infrastructure code.
ID: QUmz9X6yBZuVaUloUb6xPRYcCDs%3D
2 LOW Unpinned Actions Full Length Commit SHA /ci.yml: 106
detailsPinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA help...
ID: Cqw750324UGkCz%2BazK2AmtPv65o%3D
3 LOW Unpinned Actions Full Length Commit SHA /ci.yml: 128
detailsPinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA help...
ID: CaE9OvLGjo9XJGQN2EzjZt6O66k%3D

Fixed Issues (3) Great job! The following issues were fixed in this Pull Request
Severity Issue Source File / Package
HIGH Passwords And Secrets - Password in URL /ci.yml: 95
LOW Unpinned Actions Full Length Commit SHA /ci.yml: 104
LOW Unpinned Actions Full Length Commit SHA /ci.yml: 126

Communicate with Checkmarx by submitting a PR comment with @Checkmarx followed by one of the supported commands. Learn about the supported commands here.

Comment thread tiled/server/app.py

app.include_router(get_zarr_router_v2(), prefix="/zarr/v2")
app.include_router(get_zarr_router_v3(), prefix="/zarr/v3")
app.include_router(get_webdav_router(), prefix="/api/webdav")
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.

should this be /api/v1 to match the rest of the endpoints?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I debated this. I can go either way, but my reasoning for omitting the the /api/v1 is that the WebDAV API is very well established. I don't think we'd make any modifications to the API itself other than possibly adding to it. Anything where we had to make a changes would be more of a bug fix than a functionality change.

There are a host of related "extra" specs in the webdav world that we don't support, and I'm not sure we would ever want to. For example, there's a spec for using webdav to change access controls on a resource. Even if we did decide to support one of them in the future, I think they would have to parts:

  • Additional HTTP methods to support
  • Additions to the XML documents that are part of the payload of some requests

},
"read:webhooks": {"description": "Read webhooks and delivery history."},
"write:webhooks": {"description": "Register and delete webhooks."},
"webdav:read": {"description": "Read data and metadata via WebDAV."},
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.

Should the order be reversed? E.g. read:webdav.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes it should. However, @danielballan and I talked about this, and I think the way we'll go is to delete webdav-specific scopes and just use the read:data and read:metadata

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.

2 participants