From d9f9465c19af412177c259536fae2fca611e2fa2 Mon Sep 17 00:00:00 2001 From: Hugo Gonzalez Labrador Date: Tue, 3 Mar 2020 19:10:04 +0100 Subject: [PATCH] config: add standalone configuration --- examples/standalone/standalone.toml | 77 +++++++++++++++++++++++++++++ examples/standalone/users.demo.json | 35 +++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 examples/standalone/standalone.toml create mode 100644 examples/standalone/users.demo.json diff --git a/examples/standalone/standalone.toml b/examples/standalone/standalone.toml new file mode 100644 index 0000000000..1ff9abb8ad --- /dev/null +++ b/examples/standalone/standalone.toml @@ -0,0 +1,77 @@ +[shared] +jwt_secret = "Pive-Fumkiu4" +gatewaysvc = "localhost:19000" + +[grpc] +address = "0.0.0.0:19000" + +[grpc.services.gateway] +authregistrysvc = "localhost:19000" +storageregistrysvc = "localhost:19000" +preferencessvc = "localhost:19000" +userprovidersvc = "localhost:19000" +usershareprovidersvc = "localhost:19000" +publicshareprovidersvc = "localhost:19000" +ocmshareprovidersvc = "localhost:19000" +commit_share_to_storage_grant = false +datagateway = "http://localhost:19001/data" +transfer_shared_secret = "replace-me-with-a-transfer-secret" # for direct uploads +transfer_expires = 6 # give it a moment + +[grpc.services.authregistry] +driver = "static" +[grpc.services.authregistry.drivers.static.rules] +basic = "localhost:19000" + +[grpc.services.storageregistry] +driver = "static" +[grpc.services.storageregistry.drivers.static] +home_provider = "/" +[grpc.services.storageregistry.drivers.static.rules] +"/" = "localhost:19000" +"123e4567-e89b-12d3-a456-426655440000" = "localhost:19000" + +[grpc.services.usershareprovider] +driver = "memory" + +[grpc.services.publicshareprovider] +driver = "memory" + +[grpc.services.storageprovider] +driver = "local" +mount_path = "/" +mount_id = "123e4567-e89b-12d3-a456-426655440000" +expose_data_server = true +data_server_url = "http://localhost:19001/data" +enable_home_creation = true + +[grpc.services.storageprovider.drivers.local] +namespace = "/var/tmp/reva/" +user_layout = "{{.Username}}" +enable_home = true + +[grpc.services.authprovider] +auth_manager = "json" +[grpc.services.authprovider.auth_managers.json] +users = "users.demo.json" + +[grpc.services.userprovider] +driver = "json" + +[grpc.services.userprovider.drivers.json] +users = "users.demo.json" + +[http] +address = "0.0.0.0:19001" + +[http.services.dataprovider] +driver = "local" +temp_folder = "/var/tmp/" + +[http.services.dataprovider.drivers.local] +namespace = "/var/tmp/reva/" +user_layout = "{{.Username}}" +enable_home = true + +#[http.services.datagateway] +#transfer_shared_secret = "replace-me-with-a-transfer-secret" # for direct uploads diff --git a/examples/standalone/users.demo.json b/examples/standalone/users.demo.json new file mode 100644 index 0000000000..2e7567da97 --- /dev/null +++ b/examples/standalone/users.demo.json @@ -0,0 +1,35 @@ +[ + { + "id": { + "opaque_id": "4c510ada-c86b-4815-8820-42cdf82c3d51", + "idp": "http://localhost:20080" + }, + "username": "einstein", + "secret": "relativity", + "mail": "einstein@example.org", + "display_name": "Albert Einstein", + "groups": ["sailing-lovers", "violin-haters", "physics-lovers"] + }, + { + "id": { + "opaque_id": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c", + "idp": "http://localhost:20080" + }, + "username": "marie", + "secret": "radioactivity", + "mail": "marie@example.org", + "display_name": "Marie Curie", + "groups": ["radium-lovers", "polonium-lovers", "physics-lovers"] + }, + { + "id": { + "opaque_id": "932b4540-8d16-481e-8ef4-588e4b6b151c", + "idp": "http://localhost:20080" + }, + "username": "richard", + "secret": "superfluidity", + "mail": "richard@example.org", + "display_name": "Richard Feynman", + "groups": ["quantum-lovers", "philosophy-haters", "physics-lovers"] + } +]