Skip to content

Commit

Permalink
Merge 8d6e69b into 2fb0647
Browse files Browse the repository at this point in the history
  • Loading branch information
Avantol13 committed Jan 21, 2022
2 parents 2fb0647 + 8d6e69b commit 1c42182
Show file tree
Hide file tree
Showing 31 changed files with 1,834 additions and 1,289 deletions.
14 changes: 5 additions & 9 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@
"filename": "fence/resources/google/utils.py",
"hashed_secret": "1348b145fa1a555461c1b790a2f66614781091e9",
"is_verified": false,
"line_number": 125,
"is_secret": false
"line_number": 127
}
],
"fence/utils.py": [
Expand All @@ -209,16 +208,14 @@
"filename": "tests/conftest.py",
"hashed_secret": "1348b145fa1a555461c1b790a2f66614781091e9",
"is_verified": false,
"line_number": 1362,
"is_secret": false
"line_number": 1472
},
{
"type": "Base64 High Entropy String",
"filename": "tests/conftest.py",
"hashed_secret": "227dea087477346785aefd575f91dd13ab86c108",
"is_verified": false,
"line_number": 1385,
"is_secret": false
"line_number": 1495
}
],
"tests/credentials/google/test_credentials.py": [
Expand Down Expand Up @@ -273,8 +270,7 @@
"filename": "tests/ras/test_ras.py",
"hashed_secret": "d9db6fe5c14dc55edd34115cdf3958845ac30882",
"is_verified": false,
"line_number": 105,
"is_secret": false
"line_number": 120
}
],
"tests/test-fence-config.yaml": [
Expand All @@ -288,5 +284,5 @@
}
]
},
"generated_at": "2022-01-03T05:29:40Z"
"generated_at": "2021-12-20T23:13:45Z"
}
13 changes: 6 additions & 7 deletions bin/fence_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
delete_client_action,
delete_users,
delete_expired_google_access,
cleanup_expired_ga4gh_information,
google_init,
list_client_action,
link_external_bucket,
Expand All @@ -34,7 +35,7 @@
force_update_google_link,
migrate_database,
google_list_authz_groups,
update_user_visas,
access_token_polling_job,
)
from fence.settings import CONFIG_SEARCH_FOLDERS

Expand Down Expand Up @@ -149,6 +150,7 @@ def parse_arguments():
subparsers.add_parser("expired-service-account-delete")
subparsers.add_parser("bucket-access-group-verify")
subparsers.add_parser("delete-expired-google-access")
subparsers.add_parser("cleanup-expired-ga4gh-information")

hmac_create = subparsers.add_parser("hmac-create")
hmac_create.add_argument("yaml-input")
Expand Down Expand Up @@ -407,9 +409,6 @@ def main():
STORAGE_CREDENTIALS = os.environ.get("STORAGE_CREDENTIALS") or config.get(
"STORAGE_CREDENTIALS"
)
usersync = config.get("USERSYNC", {})
sync_from_visas = usersync.get("sync_from_visas", False)
fallback_to_dbgap_sftp = usersync.get("fallback_to_dbgap_sftp", False)

arborist = None
if args.arborist:
Expand Down Expand Up @@ -463,6 +462,8 @@ def main():
verify_bucket_access_group(DB)
elif args.action == "delete-expired-google-access":
delete_expired_google_access(DB)
elif args.action == "cleanup-expired-ga4gh-information":
cleanup_expired_ga4gh_information(DB)
elif args.action == "sync":
sync_users(
dbGaP,
Expand All @@ -474,8 +475,6 @@ def main():
sync_from_local_yaml_file=args.yaml,
folder=args.folder,
arborist=arborist,
sync_from_visas=sync_from_visas,
fallback_to_dbgap_sftp=fallback_to_dbgap_sftp,
)
elif args.action == "dbgap-download-access-files":
download_dbgap_files(
Expand Down Expand Up @@ -576,7 +575,7 @@ def main():
elif args.action == "migrate":
migrate_database(DB)
elif args.action == "update-visas":
update_user_visas(
access_token_polling_job(
DB,
chunk_size=args.chunk_size,
concurrency=args.concurrency,
Expand Down
1 change: 1 addition & 0 deletions fence/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def set_flask_session_values(user):

if id_from_idp:
user.id_from_idp = id_from_idp
# TODO: update iss_sub mapping table?

# setup idp connection for new user (or existing user w/o it setup)
idp = (
Expand Down
Loading

0 comments on commit 1c42182

Please sign in to comment.