-
Notifications
You must be signed in to change notification settings - Fork 113
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
Feature/storage/owncloud #150
Conversation
Codecov Report
@@ Coverage Diff @@
## master #150 +/- ##
=======================================
Coverage 94.65% 94.65%
=======================================
Files 6 6
Lines 187 187
=======================================
Hits 177 177
Misses 5 5
Partials 5 5
Continue to review full report at Codecov.
|
8bedc65
to
a2d101c
Compare
a2d101c
to
a9eb0af
Compare
cmd/revad/svcs/grpcsvcs/usershareprovidersvc/usershareprovidersvc.go
Outdated
Show resolved
Hide resolved
@butonic can you make CI happy? |
cmd/revad/svcs/grpcsvcs/storageprovidersvc/storageprovidersvc.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor things, happy to approve after, this is a super nice job ! :)
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
a9eb0af
to
b43edca
Compare
my gateway, # This config file will start a reva gateway that:
# - handles incoming HTTP requests
# - forwards GRPC requests to the backend
[core]
log_file = "stderr"
log_mode = "dev"
max_cpus = "100%"
#tracing_enabled = true
[log]
level = "debug"
mode = "console"
# What http services should be started?
[http]
network = "tcp"
address = "0.0.0.0:9998"
enabled_services = [
"appregistrysvc",
"ocdavsvc",
"ocssvc",
"datasvc",
"preferencessvc",
"prometheussvc",
"oidcprovider",
"wellknown"
]
enabled_middlewares = ["cors", "auth"]
# HTTP middlewares
[http.middlewares.auth]
priority = 100
# directly talk to the backend for authentication to save a grpc request
gatewaysvc = "0.0.0.0:9999"
credential_strategy = "oidc"
token_strategy = "header"
token_writer = "header"
token_manager = "jwt"
skip_methods = [
"/status.php",
"/oauth2",
"/oauth2/auth",
"/oauth2/token",
"/oauth2/introspect",
"/oauth2/userinfo",
"/oauth2/sessions",
"/.well-known/openid-configuration",
"/metrics"
]
[http.middlewares.auth.token_managers.jwt]
secret = "Uv38ByGCZU8WP18PmmIdcpVmx00QA3xN"
[http.middlewares.cors]
priority = 200
allowed_origins = ["*"]
allow_credentials = true
allowed_methods = ["OPTIONS", "GET", "PUT", "POST", "DELETE", "MKCOL", "PROPFIND", "PROPPATCH", "MOVE", "COPY", "REPORT", "SEARCH"]
allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "Authorization", "Ocs-Apirequest", "If-None-Match"]
options_passthrough = true
# HTTP services
[http.services.appregistrysvc]
prefix = "appregistry"
gatewaysvc = "localhost:10000"
[http.services.preferencessvc]
prefix = "preferences"
gatewaysvc = "localhost:10000"
[http.services.iframeuisvc]
prefix = "iframe"
[http.services.webuisvc]
prefix = "ui"
[http.services.ocdavsvc]
prefix = ""
gatewaysvc = "localhost:10000"
chunk_folder = "/var/tmp/owncloud/chunks"
[http.services.ocssvc]
prefix = "ocs"
gatewaysvc = "localhost:10000"
# the list of share recipients is taken fro the user.json file
user_manager = "json"
[http.services.ocssvc.user_managers.json]
users = "/data/users.json"
[http.services.ocssvc.config]
version = "1.8"
website = "nexus"
host = "https://localhost:9998"
contact = "admin@localhost"
ssl = "true"
[http.services.ocssvc.capabilities.capabilities.core]
poll_interval = 60
webdav_root = "remote.php/webdav"
[http.services.ocssvc.capabilities.capabilities.core.status]
installed = true
maintenance = false
needsDbUpgrade = false
version = "10.0.9.5"
versionstring = "10.0.9"
edition = "community"
productname = "reva"
hostname = ""
[http.services.ocssvc.capabilities.capabilities.checksums]
supported_types = ["SHA256"]
preferred_upload_type = "SHA256"
[http.services.ocssvc.capabilities.capabilities.files]
private_links = true
bigfilechunking = true
blacklisted_files = ["foo"]
undelete = true
versioning = true
[http.services.ocssvc.capabilities.capabilities.dav]
chunking = "1.0"
[http.services.ocssvc.capabilities.capabilities.files_sharing]
api_enabled = true
resharing = true
group_sharing = true
auto_accept_share = true
share_with_group_members_only = true
share_with_membership_groups_only = true
default_permissions = 22
search_min_length = 3
[http.services.ocssvc.capabilities.capabilities.files_sharing.public]
enabled = true
send_mail = true
social_share = true
upload = true
multiple = true
supports_upload_only = true
[http.services.ocssvc.capabilities.capabilities.files_sharing.public.password]
enforced = true
[http.services.ocssvc.capabilities.capabilities.files_sharing.public.password.enforced_for]
read_only = true
read_write = true
upload_only = true
[http.services.ocssvc.capabilities.capabilities.files_sharing.public.expire_date]
enabled = true
[http.services.ocssvc.capabilities.capabilities.files_sharing.user]
send_mail = true
[http.services.ocssvc.capabilities.capabilities.files_sharing.user_enumeration]
enabled = true
group_members_only = true
[http.services.ocssvc.capabilities.capabilities.files_sharing.federation]
outgoing = true
incoming = true
[http.services.ocssvc.capabilities.capabilities.notifications]
endpoints = ["list", "get", "delete"]
[http.services.ocssvc.capabilities.version]
edition = "nexus"
major = 10
minor = 0
micro = 11
string = "10.0.11"
[http.services.datasvc]
driver = "owncloud"
prefix = "data"
temp_folder = "/var/tmp/"
[http.services.datasvc.drivers.owncloud]
datadirectory = "/data"
[http.services.oidcprovider]
prefix = "oauth2"
[http.services.wellknown]
prefix = ".well-known"
# also start the grpc gateway for other cs3 services so we have one frontend process
[grpc]
network = "tcp"
address = "0.0.0.0:10000"
enabled_services = ["gatewaysvc"]
[grpc.services.gatewaysvc]
storageregistrysvc = "localhost:9999"
authsvc = "localhost:9999"
usershareprovidersvc = "localhost:9999"
appregistrysvc = "localhost:9999"
preferencessvc = "localhost:9999"
commit_share_to_storage_grant = true
commit_share_to_storage_ref = true The background services # This config file will start a reva grpc service backend that:
# - stores files in the local storage
# - reads users from users.json
# - uses basic authentication to authenticate requests
[core]
log_file = "stderr"
log_mode = "dev"
max_cpus = "2"
tracing_enabled = true
disable_http = true
[log]
level = "debug"
mode = "console"
# What grpc services should be started?
[grpc]
network = "tcp"
address = "0.0.0.0:9999"
enabled_services = ["storageprovidersvc", "authsvc", "storageregistrysvc", "appregistrysvc", "appprovidersvc", "preferencessvc", "usershareprovidersvc"]
enabled_interceptors = ["auth"]
# Order and configuration of grpc interceptors
# GRPC interceptors
[grpc.interceptors.auth]
# keys for grpc metadata are always lowercase, so interceptors headers need to use lowercase.
token_manager = "jwt"
# GenerateAccessToken contains the credentials in the payload. Skip auth, otherwise services cannot obtain a token.
skip_methods = ["/cs3.authv0alpha.AuthService/GenerateAccessToken", "/cs3.authv0alpha.AuthService/WhoAmI"]
[grpc.interceptors.auth.token_managers.jwt]
secret = "Uv38ByGCZU8WP18PmmIdcpVmx00QA3xN"
# GRPC services
## The authentication service
[grpc.services.authsvc]
token_manager = "jwt"
# users are authorized by checking their password matches the one in the users.json file
auth_manager = "oidc"
# user info is read from the user.json file
user_manager = "oidc"
[grpc.services.authsvc.auth_managers.oidc]
provider = "http://localhost:9998"
insecure = true
# the client credentials for the token introspection beckchannel
client_id = "phoenix"
client_secret = "foobar"
[grpc.services.authsvc.token_managers.jwt]
secret = "Uv38ByGCZU8WP18PmmIdcpVmx00QA3xN"
## The storage registry service
[grpc.services.storageregistrysvc]
driver = "static"
[grpc.services.storageregistrysvc.drivers.static.rules]
"/" = "localhost:9999"
"123e4567-e89b-12d3-a456-426655440000" = "localhost:9999"
## The storage provider service
[grpc.services.appregistrysvc]
driver = "static"
[grpc.services.appregistrysvc.static.rules]
".txt" = "localhost:9999"
"text/plain" = "localhost:9999"
[grpc.services.appprovidersvc]
driver = "demo"
[grpc.services.appprovidersvc.demo]
iframe_ui_provider = "http://localhost:9998/iframeuisvc"
[grpc.services.storageprovidersvc]
driver = "owncloud"
mount_path = "/"
mount_id = "123e4567-e89b-12d3-a456-426655440000"
data_server_url = "http://127.0.0.1:9998/data"
[grpc.services.storageprovidersvc.available_checksums]
md5 = 100
unset = 1000
[grpc.services.storageprovidersvc.drivers.owncloud]
datadirectory = "/data"
## The user share provider service
[grpc.services.usershareprovidersvc]
driver = "memory" |
currently using phoenix commit ca2b13f Update settings.yml |
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
3acd155
to
c5d366a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome work
add a storage that
works on top of an existing owncloud data directory
generates a uuid and stores it in the filesystem via extended attributes
stores sharing metadata as nfsv4 like acls in a user extended attribute in the filesystem
uses redis to cache fileid to path lookups
no dbms reuired
data migration is tracked in Data Format V2 owncloud/data_exporter#77 (comment)
It also adds the versioning endpoint to ocs, which is submitted with this PR because it was tested with the owncloud storage