github.com/cs3org/reva/v2@v2.27.7/tests/oc-integration-tests/local/gateway.toml (about)

     1  # This config file will start a reva service that:
     2  # - serves as a gateway for all CS3 requests
     3  # - looks up the storageprovider using a storageregistry
     4  # - looks up the authprovider using an authregistry
     5  # - serves the gateway on grpc port 19000
     6  # - serves http datagateway on port 19001
     7  #   - /data - datagateway: file up and download
     8  
     9  [shared]
    10  jwt_secret = "Pive-Fumkiu4"
    11  gatewaysvc = "localhost:19000"
    12  
    13  [shared.grpc_client_options]
    14  tls_mode = "insecure"
    15  
    16  [log]
    17  #level = "warn"
    18  #mode = "json"
    19  
    20  [grpc]
    21  address = "0.0.0.0:19000"
    22  
    23  [grpc.tls_settings]
    24  enabled = true
    25  
    26  [grpc.services.gateway]
    27  # registries
    28  authregistrysvc = "localhost:19000"
    29  storageregistrysvc = "localhost:19000"
    30  # user metadata
    31  preferencessvc = "localhost:18000"
    32  userprovidersvc = "localhost:18000"
    33  groupprovidersvc = "localhost:18000"
    34  # an approvider lives on "localhost:18000" as well, see users.toml
    35  # sharing
    36  usershareprovidersvc = "localhost:17000"
    37  publicshareprovidersvc = "localhost:17000"
    38  # ocm
    39  ocmcoresvc = "localhost:14000"
    40  ocmshareprovidersvc = "localhost:14000"
    41  ocminvitemanagersvc = "localhost:14000"
    42  ocmproviderauthorizersvc = "localhost:14000"
    43  # permissions
    44  permissionssvc = "localhost:10000"
    45  # other
    46  commit_share_to_storage_grant = true
    47  share_folder = "Shares"
    48  datagateway = "http://localhost:19001/data"
    49  transfer_shared_secret = "replace-me-with-a-transfer-secret" # for direct uploads
    50  transfer_expires = 6 # give it a moment
    51  #disable_home_creation_on_login = true
    52  link_grants_file = "/tmp/reva/link_grants_file.json"
    53  create_home_cache_ttl = 10
    54  
    55  
    56  [grpc.services.authregistry]
    57  driver = "static"
    58  
    59  [grpc.services.authregistry.drivers.static.rules]
    60  publicshares = "localhost:17000" # started with the shares.toml
    61  basic = "localhost:18000" # started with the users.toml
    62  bearer = "localhost:20099" # started with the frontend.toml
    63  machine = "localhost:21000" # started with the machine-auth.toml
    64  
    65  [grpc.services.storageregistry]
    66  driver = "spaces"
    67  
    68  [grpc.services.storageregistry.drivers.spaces]
    69  home_template = "/users/{{.Id.OpaqueId}}"
    70  
    71  ## obviously, we do not want to define a rule for every user and space, which is why we can define naming rules:
    72  [grpc.services.storageregistry.drivers.spaces.providers."localhost:11000"]
    73  providerid = "1284d238-aa92-42ce-bdc4-0b0000009157"
    74  [grpc.services.storageregistry.drivers.spaces.providers."localhost:11000".spaces]
    75  "personal" = { "mount_point" = "/users", "path_template" = "/users/{{.Space.Owner.Id.OpaqueId}}" }
    76  
    77  ## users can be spread over multiple providers like this:
    78  #"localhost:11000" = {"mount_path" = "/users/[0-9]", "space_type" = "personal", "path_template" = "/users/{{.Space.Owner.Id.OpaqueId}}", "description" = "personal spaces 0-9"}
    79  #"localhost:11010" = {"mount_path" = "/users/[a-f]", "space_type" = "personal", "path_template" = "/users/{{.Space.Owner.Id.OpaqueId}}", "description" = "personal spaces a-f"}
    80  
    81  ## the virtual /Shares folder of every user is routed like this:
    82  ## whenever the path matches the pattern /users/{{.CurrentUser.Id.OpaqueId}}/Shares we forward requests to the sharesstorageprovider
    83  [grpc.services.storageregistry.drivers.spaces.providers."localhost:14000"]
    84  providerid = "a0ca6a90-a365-4782-871e-d44447bbc668"
    85  [grpc.services.storageregistry.drivers.spaces.providers."localhost:14000".spaces]
    86  "virtual" = { "mount_point" = "/users/{{.CurrentUser.Id.OpaqueId}}/Shares" }
    87  "grant" = { "mount_point" = "." }
    88  "mountpoint" = { "mount_point" = "/users/{{.CurrentUser.Id.OpaqueId}}/Shares", "path_template" = "/users/{{.CurrentUser.Id.OpaqueId}}/Shares/{{.Space.Name}}" }
    89  
    90  ## An alternative would be used to mount shares outside of the users home:
    91  #"localhost:14000" = {"mount_path" = "/shares", "space_type" = "share", "path_template" = "/shares/{{.Space.Name}}", "description" = "shares"}
    92  
    93  ## While public shares are mounted at /public logged in end will should never see that path because it is only created by the spaces registry when
    94  ## a public link is accessed.
    95  [grpc.services.storageregistry.drivers.spaces.providers."localhost:13000"]
    96  providerid = "7993447f-687f-490d-875c-ac95e89a62a4"
    97  [grpc.services.storageregistry.drivers.spaces.providers."localhost:13000".spaces]
    98  "grant" = { "mount_point" = "." }
    99  "mountpoint" = { "mount_point" = "/public", "path_template" = "/public/{{.Space.Root.OpaqueId}}" }
   100  
   101  [http]
   102  address = "0.0.0.0:19001"
   103  
   104  [http.services.datagateway]
   105  transfer_shared_secret = "replace-me-with-a-transfer-secret"