Skip to content

Commit

Permalink
Merge branch 'chore/fence-create-doc-update' of https://github.com/uc…
Browse files Browse the repository at this point in the history
…-cdis/fence into chore/fence-create-doc-update
  • Loading branch information
BinamB committed Mar 3, 2022
2 parents 7a31b36 + caa7b9b commit 0d6e757
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/image_build_push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Build Image and Push to Quay

on: push

jobs:
ci:
name: Build Image and Push to Quay
uses: uc-cdis/.github/.github/workflows/image_build_push.yaml@master
secrets:
ECR_AWS_ACCESS_KEY_ID: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
ECR_AWS_SECRET_ACCESS_KEY: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_ROBOT_TOKEN: ${{ secrets.QUAY_ROBOT_TOKEN }}
4 changes: 2 additions & 2 deletions fence/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ def wrapper(*args, **kwargs):
]
else:
# fall back on "providers"
enable_shib = "shibboleth" in config.get(
"ENABLED_IDENTITY_PROVIDERS", {}
enable_shib = "shibboleth" in (
config.get("ENABLED_IDENTITY_PROVIDERS") or {}
).get("providers", {})

if enable_shib and "SHIBBOLETH_HEADER" in config:
Expand Down
4 changes: 2 additions & 2 deletions fence/blueprints/login/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def get_login_providers_info():
# default login option
if config.get("DEFAULT_LOGIN_IDP"):
default_idp = config["DEFAULT_LOGIN_IDP"]
elif "default" in config.get("ENABLED_IDENTITY_PROVIDERS", {}):
elif "default" in (config.get("ENABLED_IDENTITY_PROVIDERS") or {}):
# fall back on ENABLED_IDENTITY_PROVIDERS.default
default_idp = config["ENABLED_IDENTITY_PROVIDERS"]["default"]
else:
Expand All @@ -188,7 +188,7 @@ def get_login_providers_info():
# other login options
if config["LOGIN_OPTIONS"]:
login_options = config["LOGIN_OPTIONS"]
elif "providers" in config.get("ENABLED_IDENTITY_PROVIDERS", {}):
elif "providers" in (config.get("ENABLED_IDENTITY_PROVIDERS") or {}):
# fall back on "providers" and convert to "login_options" format
enabled_providers = config["ENABLED_IDENTITY_PROVIDERS"]["providers"]
login_options = [
Expand Down
4 changes: 2 additions & 2 deletions fence/blueprints/oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def authorize(*args, **kwargs):

login_url = None
if not idp:
if not config.get("DEFAULT_LOGIN_IDP") and "default" not in config.get(
"ENABLED_IDENTITY_PROVIDERS", {}
if not config.get("DEFAULT_LOGIN_IDP") and "default" not in (
config.get("ENABLED_IDENTITY_PROVIDERS") or {}
):
# fall back on deprecated DEFAULT_LOGIN_URL
login_url = config.get("DEFAULT_LOGIN_URL")
Expand Down
2 changes: 1 addition & 1 deletion fence/config-default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ DEFAULT_LOGIN_URL: '{{BASE_URL}}/login/google'
LOGIN_REDIRECT_WHITELIST: []

### DEPRECATED and replaced by OPENID_CONNECT + LOGIN_OPTIONS configs
ENABLED_IDENTITY_PROVIDERS:
ENABLED_IDENTITY_PROVIDERS: {}


# //////////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 0d6e757

Please sign in to comment.