Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Commit bd5ab2d

Browse files
committed
update permissions docs with ga4gh implementation
1 parent c7fa2bc commit bd5ab2d

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

docs/permissions.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@ As per Beacon specification there are three types of permissions:
1010
e.g. ELIXIR bona_fide or researcher status. Requires a JWT Token;
1111
* ``CONTROLLED`` - data available for users that have been granted access to a protected resource by a Data Access Committee (DAC).
1212

13+
.. note:: In this page we are illustrating permissions according to:
14+
`GA4GH Authentication and Authorization Infrastructure (AAI) OpenID Connect Profile <https://github.com/ga4gh/data-security/blob/master/AAI/AAIConnectProfile.md>`_.
1315

1416
Registered Data
1517
---------------
1618

1719
For retrieving ``REGISTERED`` permissions the function below forwards the TOKEN to another server
20+
(e.g ELIXIR ``userinfo`` endpoint)
1821
that validates the information in the token is for a registered user/token and retrieves a JSON
1922
message that contains data regarding the Bona Fide status. Custom servers can be set up to mimic this functionality.
2023

@@ -28,7 +31,7 @@ researcher.
2831

2932
.. literalinclude:: /../beacon_api/permissions/ga4gh.py
3033
:language: python
31-
:lines: 103-128
34+
:lines: 267-305
3235

3336
.. note:: The ``ga4gh.AcceptedTermsAndPolicies`` and ``ga4gh.ResearcherStatus`` keys' values must be equal to those mandated by GA4GH.
3437

@@ -47,21 +50,22 @@ there is no standard way for delivering access to datasets via JWT Tokens
4750
and each AAI authority provides different claims with different structures.
4851

4952
By default we include :meth:`beacon_api.permissions.ga4gh` add-on that offers the means to retrieve
50-
permissions following the `GA4GH format <https://docs.google.com/document/d/11Wg-uL75ypU5eNu2p_xh9gspmbGtmLzmdq5VfPHBirE>`_ via a token provided by ELIXIR AAI.
53+
permissions following the `GA4GH format <https://docs.google.com/document/d/11Wg-uL75ypU5eNu2p_xh9gspmbGtmLzmdq5VfPHBirE>`_
54+
via a token provided by ELIXIR AAI.
5155

5256
If a token contains ``ga4gh_userinfo_claims`` JWT claim with ``ga4gh.ControlledAccessGrants``, these are parsed
5357
and retrieved as illustrated in:
5458

5559
.. literalinclude:: /../beacon_api/permissions/ga4gh.py
5660
:language: python
57-
:lines: 85-100
61+
:lines: 248-264
5862

5963
The permissions are then passed in :meth:`beacon_api.utils.validate` as illustrated below:
6064

6165
.. literalinclude:: /../beacon_api/utils/validate.py
6266
:language: python
6367
:dedent: 16
64-
:lines: 179-192
68+
:lines: 183-200
6569

6670
If there is no claim for GA4GH permissions as illustrated above, they will not be added to
6771
``controlled_datasets``.

0 commit comments

Comments
 (0)