-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
892 additions
and
312 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Fence Multifactor Authentication Guide | ||
|
||
Fence is capable of using token claims from IdPs to identify when multifactor authentication (MFA) was used during the authentication process. | ||
|
||
## File Level Enforcement | ||
To restrict access to files to user who've authenticated with MFA, the following resource *MUST* be present in the indexd record's `authz`: | ||
`/multifactor_auth` | ||
|
||
And the following configs must be updated: | ||
- fence-config.yaml | ||
- user.yaml | ||
|
||
### fence-config.yaml changes | ||
|
||
MFA claim checking is configured on a per-IdP basis. For a given IdP, define the name of the claim in the id_token and is possible values that indicate MFA. If the id_token claim value matches at least one value in the configured multifactor_auth_claim_info.values, then "/multifactor_auth" resource will be assigned to the user. | ||
|
||
For example, Okta may issue the following id_token when MFA is used: | ||
``` | ||
{ | ||
"amr": ["otp", "pwd"], | ||
"aud": "6joRGIzNCaJfdCPzRjlh", | ||
"auth_time": 1311280970, | ||
"exp": 1311280970, | ||
"iat": 1311280970, | ||
"idp": "00ok1u7AsAkrwdZL3z0g3", | ||
"iss": "https://$" | ||
"jti": "Tlenfse93dgkaksginv", | ||
"sub": "00uk1u7AsAk6dZL3z0g3", | ||
"ver": 1 | ||
} | ||
``` | ||
|
||
And fence-config.yaml is configured as follows: | ||
``` | ||
OPENID_CONNECT: | ||
okta: | ||
client_id: 'redacted' | ||
client_secret: 'redacted' | ||
multifactor_auth_claim_info: | ||
claim: 'amr' | ||
values: [ "mfa", "otp", "sms" ] | ||
``` | ||
|
||
Then fence will assign the "/multifactor_auth" resource to the user in Arborist. | ||
|
||
### user.yaml changes | ||
The `mfa_policy` policy and `multifactor_auth` resource must be added to user.yaml so the appropriate policy and resource are created in arborist when usersync runs. | ||
|
||
NOTE: The role_ids provided here are an example and should be changed to the appropriate arborist roles for the commons. | ||
|
||
Add the following to the `resources` section: | ||
```yaml | ||
- name: multifactor_auth | ||
``` | ||
Add the following the `policies` section: | ||
```yaml | ||
- id: mfa_policy | ||
role_ids: | ||
- read-storage | ||
- read | ||
resource_paths: | ||
- /multifactor_auth | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,6 +111,9 @@ OPENID_CONNECT: | |
user_id_field: '' # optional (default "sub"); claims field to get the user_id from | ||
email_field: '' # optional (default "email"); claims field to get the user email from | ||
scope: '' # optional (default "openid") | ||
multifactor_auth_claim_info: # optional, include if you're using arborist to enforce mfa on a per-file level | ||
claim: '' # claims field that indicates mfa, either the acr or acm claim. | ||
values: [ "" ] # possible values that indicate mfa was used. At least one value configured here is required to be in the token | ||
# These Google values must be obtained from Google's Cloud Console | ||
# Follow: https://developers.google.com/identity/protocols/OpenIDConnect | ||
# | ||
|
@@ -181,6 +184,9 @@ OPENID_CONNECT: | |
client_secret: '' | ||
redirect_url: '{{BASE_URL}}/login/ras/callback' | ||
scope: 'openid email profile ga4gh_passport_v1' | ||
# multifactor_auth_claim_info: | ||
# claim: 'acr' | ||
# values: [ 'https://stsstg.nih.gov/assurance/aal/2' ] | ||
# if mock is true, will fake a successful login response for login | ||
# WARNING: DO NOT ENABLE IN PRODUCTION (for testing purposes only) | ||
mock: false | ||
|
@@ -207,6 +213,9 @@ OPENID_CONNECT: | |
# WARNING: DO NOT ENABLE IN PRODUCTION (for testing purposes only) | ||
mock: false | ||
mock_default_user: '[email protected]' | ||
# multifactor_auth_claim_info: | ||
# claim: 'amr' | ||
# values: [ "mfa", "otp", "rsa", "ngcmfa", "wiaormfa" ] | ||
# For information on configuring an Okta tenant as an OIDC IdP refer to Okta documentation at: | ||
# https://developer.okta.com/docs/reference/api/oidc/#2-okta-as-the-identity-platform-for-your-app-or-api | ||
okta: | ||
|
@@ -215,6 +224,9 @@ OPENID_CONNECT: | |
client_secret: '' | ||
redirect_url: '{{BASE_URL}}/login/okta/login/' | ||
scope: 'openid email' | ||
# multifactor_auth_claim_info: | ||
# claim: 'amr' | ||
# values: [ "mfa", "otp", "sms" ] | ||
cognito: | ||
# You must create a user pool in order to have a discovery url | ||
discovery_url: 'https://cognito-idp.{REGION}.amazonaws.com/{USER-POOL-ID}/.well-known/openid-configuration' | ||
|
@@ -241,6 +253,9 @@ OPENID_CONNECT: | |
# WARNING: DO NOT ENABLE IN PRODUCTION (for testing purposes only) | ||
mock: false | ||
mock_default_user: 'http://cilogon.org/serverT/users/64703' | ||
# multifactor_auth_claim_info: | ||
# claim: 'acr' | ||
# values: [ "https://refeds.org/profile/mfa" ] | ||
synapse: | ||
discovery_url: '' | ||
client_id: '' | ||
|
@@ -532,6 +547,25 @@ dbGaP: | |
# | ||
# NOTE: when this is "false" the above would become "phs000123" | ||
parse_consent_code: true | ||
# When a dbGaP study authorizes access to child studies through a parent study ID, | ||
# you can use this mapping. When a user gets access to the first ID, they automatically | ||
# get access to the list of projects to the right. | ||
# | ||
# There's usually a note in the "Authorized Access" section of the dbGaP study page | ||
# (https://www.ncbi.nlm.nih.gov/projects/gap/cgi-bin/study.cgi?study_id=phs001843.v1.p2) | ||
# along the lines of: | ||
# Note: The data for this study is collected as a substudy of | ||
# phs001194.v3.p2. dbGaP Authorized Access requests for | ||
# this data should be made for study phs001194.v3.p2 and | ||
# not phs001843.v1.p2 | ||
# | ||
# There are also other dbGaP APIs that expose this parent/child mapping. | ||
# Example: https://dbgap.ncbi.nlm.nih.gov/ss/dbgapssws.cgi?request=Study&phs=000571&v=6 | ||
# | ||
# If `parse_consent_code` is true, then a user will be given access to the exact | ||
# same consent codes in the child studies | ||
parent_to_child_studies_mapping: | ||
# 'phs001194': ['phs000571', 'phs001843'] | ||
# A consent of "c999" can indicate access to that study's "exchange area data" | ||
# and when a user has access to one study's exchange area data, they | ||
# have access to the parent study's "common exchange area data" that is not study | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.