Arvados federation enables clients to transparently read, create and manipulate objects and collections across clusters in different regions or organizations. Federation supports workfows that integrate and analyze data across multiple clusters by sending computation to where the data is, reducing the technical and legal barriers to analyzing large, sensitive data sets.
This feature is under development. Support for federation is limited to certain types of requests. The behaviors described here should not be interpreted as a stable API.
Detailed configuration information is available on the federation admin section.
Clusters are identified by a five-digit alphanumeric id (numbers and lowercase letters). There are 36 5 = 60466176 possible cluster identifiers.
Cluster identifiers are mapped API server hosts one of two ways:
arvadosapi.comdomain. For example, the API server for the cluster
qr1hican be found at
qr1hi.arvadosapi.com. To register a cluster id for free under
arvadosapi.com, contact mailto:email@example.com
RemoteClusters section of
/etc/arvados/config.yml (for arvados-controller)
Clusters: clsr1: RemoteClusters: clsr2: Host: api.cluster2.com Proxy: true clsr3: Host: api.cluster3.com Proxy: true
remote_hosts section of
application.yml (for the API server)
production: remote_hosts: clsr2: api.cluster2.com clsr3: api.cluster3.com
In this example, the cluster
clsr1 is configured to contact
api.cluster2.com for requests involving
api.cluster3.com for requests involving
A federated user has a single identity across the cluster federation. This identity is a user account on a specific “home cluster”. When arvados-controller contacts a remote cluster, the remote cluster verifies the user’s identity (see below) and then creates a mirror of the user account with the same uuid of the user’s home cluster. On the remote cluster, permissions can then be granted to the federated user, and the federated user can create and own objects.
When making a request to the home cluster, authorization is established by looking up the API token in the
api_client_authorizations table to determine the user identity. When making a request to a remote cluster, we need to provide an API token which can be used to establish the user’s identity. The remote cluster will connect back to the home cluster to determine if the token valid and the user it corresponds to. However, we do not want to send along the same API token used for the original request. If the remote cluster is malicious or compromised, sending along user’s regular token would compromise the user account on the home cluster. Instead, the controller sends a “salted token”. The salted token is restricted to only to fetching the user account and group membership. The salted token consists of the uuid of the token in
api_client_authorizations and the SHA1 HMAC of the original token and the cluster id of remote cluster. To verify the token, the remote cluster contacts the home cluster and provides the token uuid, the hash, and its cluster id. The home cluster uses the uuid to look up the token re-computes the SHA1 HMAC of the original token and cluster id. If that hash matches, then the token is valid. To avoid having to re-validate the token on every request, it is cached for a short period.
The security properties of this scheme are:
In the REST API, GET and PUT/PATCH requests are used to fetch and update records.
In the REST API, POST requests create new records, so there is no uuid to use for the cluster id. In this case, to create an object on a remote cluster, the request includes the
cluster_id parameter. The flow is otherwise the same as described above.
Each collection record has
manifest_text, which describes how to reassemble keep blocks into files as described in the Storage in Keep.. Each block identifier in the manifest has an added signature which is used to confirm permission to read the block. To read a block from a keepstore server, the client must provide the block identifier, the signature, and the same API token used to retrieve the collection record.
When a collection record is returned through a federation request, the keep blocks listed in the manifest may not be available on the local cluster, and the keep block signatures returned by the remote cluster are not valid for the local cluster. To solve this, arvados-controller rewrites the signatures in the manifest to “remote cluster” signatures.
A local signature comes after the block identifier and block size, and starts with
A remote cluster signature starts with
+R, then the cluster id of the cluster it originated from (
zzzzz in this example), a dash, and then the original signature:
When the client provides a remote-signed block locator to keepstore, the keepstore proxies the request to the remote cluster.
+Rback to a local signature
The content of this documentation is licensed under the
Commons Attribution-Share Alike 3.0 United States licence.
Code samples in this documentation are licensed under the Apache License, Version 2.0.