GithubHelp home page GithubHelp logo

arthurmco / warden Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 0.0 13 KB

simple WebDAV server. Share files across the network without hassle

License: BSD 3-Clause "New" or "Revised" License

Clojure 100.00%
webdav webdav-server clojure cli

warden's Introduction

warden

WebDAV server, own/nextCloud server like, written in Clojure.

The objective is to make a server up and running with minimal configuration. You just point where to read, the valid users and run the server.

For now, it will offer no graphical or web interface, but it might in the future, if there is demand for that.

Objectives

  • full WebDAV support
  • maybe LDAP support, for user authentication?
  • encryption
  • the server will run in all major OSs

Usage

$ java -jar warden-0.1.0-standalone.jar [args]

Structures

Read https://tools.ietf.org/html/rfc4918

  • User
  • Directory
  • File
  • Permissions

A file is a single unit. It can have data. It has a size. It might or might not have locks. It is called a collection member in the RFC.

A directory is a container for files. A directory is a type of file that can contain multiple files. Thus, it can have every property a file has. It is called a collection in the RFC.

An user is someone who access a file. It has permissions for a file. A file can be accessed, or cannot be, depending of the permissions.

Files with a lock cannot be modified by anyone, only read. A lock has an owner, who is an user. Each lock is identified by a token, and has a lifetime. Locks can be refreshed.


WebDAV is a XML-based protocol

Planned Support

Lock support will not be enforced on first builds, but it will be later (see the RFC 4918, section 7.2)

WebDAV servers that support locking can reduce the likelihood that clients will accidentally overwrite each other's changes by requiring clients to lock resources before modifying them. Such servers would effectively prevent HTTP 1.0 and HTTP 1.1 clients from modifying resources.

warden's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

warden's Issues

Read a file (GET)

Read the content of a file, and return it in the GET method

Path constraints mentioned in #2 applies here too.

How to implement file locking

How does locking will be implemented?
(the LOCK and UNLOCK methods)

This is open for discussions.
I will not really enforce locking for now

Load a list of files (PROPFIND)

Just show a list of files, without worrying about contents

Need to:

  • read a directory
  • show directory information
  • return this information in the PROPFIND method
  • do not allow querying data levels below the server root (e.g, so /root/../../../../../etc/passwd does not send info about your password file)
  • test everything.

Add tests

Learn how to test in Clojure, and add nice tests

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.