Skip to content

Conversation

@corps
Copy link
Contributor

@corps corps commented Jun 10, 2020

Built on top of #80

After that gets merged, the diff here shrinks.
What works: GET PROPFIND MOVE COPY DELETE PUT
Note; currently the default test environment doesn't include a private key to actual sign jwt tokens in the tests. It looks like you work around that by introducing a TestAuth middleware in place of normal Auth middleware. I'll need to backport some of the auth stuff into the etna gem and follow a similar pattern there, but for now I've commented out the parts.

@graft
Copy link
Contributor

graft commented Jun 11, 2020

I've had more and more trouble with the TestAuth and am starting to lean in favor of discarding it as Etna::Auth gets more complicated. I'm not sure exactly what pain the TestAuth is meant to solve at this point, and dancing around it is getting difficult. See my discussion of the difficulty making specs for metis_client in #68.

@graft
Copy link
Contributor

graft commented Jun 11, 2020

Hmm I see you are just reading the fake token right now - I might try replacing Etna::TestAuth with Etna::Auth in your tests (or even all tests). I think if you set a public/private key pair in the test config you can create a signed token with Metis.instance.sign and validate it with the same without too much trouble. If this works easily we can just replicate it elsewhere and ditch Etna::TestAuth.

You've inserted this before the Auth layer - would it be possible to insert it after the Auth layer and use the results of that operation in #authenticate?

@graft
Copy link
Contributor

graft commented Jun 11, 2020

Regarding PUT: I assume this will require posting the entire file in a single operation. If so, what sort of integrity checking are we doing? Or do we lose the opportunity to do so during this operation?


## Organization

### Projects
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be helpful (maybe here or somewhere else?), to include instructions on how to set up a WebDAV client to talk to Metis? Also examples of a client or recommendations for one? If this isn't the right spot for that, maybe the mountenta.github.io documentation site.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. I'm actively trying to determine which clients work best. I'm kind of not impressed by, all of them at the moment :P

@corps
Copy link
Contributor Author

corps commented Jun 11, 2020

Hmm I see you are just reading the fake token right now - I might try replacing Etna::TestAuth with Etna::Auth in your tests (or even all tests). I think if you set a public/private key pair in the test config you can create a signed token with Metis.instance.sign and validate it with the same without too much trouble. If this works easily we can just replicate it elsewhere and ditch Etna::TestAuth.

You've inserted this before the Auth layer - would it be possible to insert it after the Auth layer and use the results of that operation in #authenticate?

Yes, although I need to make changes to Etna gem directly, which is kind of why I was putting this off. I'll swap things around when I have the PR mature. My plan is to get the implementation stable and tested, then make the changes in Etna to support this approach.

@corps
Copy link
Contributor Author

corps commented Jun 11, 2020

Regarding PUT: I assume this will require posting the entire file in a single operation. If so, what sort of integrity checking are we doing? Or do we lose the opportunity to do so during this operation?

In theory some clients might provide checksums, or can be configured to do so. Some more testing will be necessary to see.

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.

4 participants