| |
@@ -35,16 +35,24 @@
|
| |
BUGZILLA_URL = 'https://bugzilla.stage.redhat.com'
|
| |
BUGZILLA_API_KEY = ''
|
| |
BODHI_URL = 'https://bodhi.stg.fedoraproject.org/'
|
| |
- FAS_ENABLED = False
|
| |
+ OIDC_ENABLED = False
|
| |
"""When FAS is not enabled, a fake stub is used instead, which allows the user to log in (under
|
| |
the credentials+groups defined here in this config) without authentication."""
|
| |
FAS_ADMIN_GROUP = 'qa-admin'
|
| |
- FAS_USER = 'developer'
|
| |
+ OIDC_TESTING_PROFILE = {
|
| |
+ 'nickname': 'developer',
|
| |
+ 'groups': [FAS_ADMIN_GROUP],
|
| |
+ }
|
| |
"""This is mostly useful for developers, when they want to simulate a login for a certain
|
| |
user."""
|
| |
- FAS_HTTPS_REQUIRED = False
|
| |
- FAS_CHECK_CERT = False
|
| |
- FAS_BASE_URL = 'https://admin.stg.fedoraproject.org/accounts/'
|
| |
+ # https://flask-oidc.readthedocs.io/en/latest/#settings-reference
|
| |
+ OIDC_CLIENT_SECRETS = "conf/oidc.json"
|
| |
+ OIDC_SCOPES = (
|
| |
+ 'openid email profile '
|
| |
+ 'https://id.fedoraproject.org/scope/groups '
|
| |
+ 'https://id.fedoraproject.org/scope/agreements'
|
| |
+ )
|
| |
+ OIDC_USER_INFO_ENABLED = True
|
| |
LOGFILE = '/var/log/blockerbugs/blockerbugs.log'
|
| |
FILE_LOGGING = False
|
| |
SYSLOG_LOGGING = False
|
| |
@@ -85,13 +93,12 @@
|
| |
DEBUG = False
|
| |
BUGZILLA_URL = 'https://bugzilla.redhat.com'
|
| |
BODHI_URL = 'https://bodhi.fedoraproject.org/'
|
| |
- FAS_ENABLED = True
|
| |
- FAS_HTTPS_REQUIRED = True
|
| |
- FAS_BASE_URL = 'https://admin.fedoraproject.org/accounts/'
|
| |
+ OIDC_ENABLED = True
|
| |
PAGURE_URL = "https://pagure.io/"
|
| |
PAGURE_API = "https://pagure.io/api/0/"
|
| |
PAGURE_REPO = "fedora-qa/blocker-review"
|
| |
SHOW_DB_URI = False
|
| |
+ OIDC_CLIENT_SECRETS = "/etc/blockerbugs/oidc.json"
|
| |
|
| |
|
| |
class DevelopmentConfig(Config):
|
| |
@@ -127,7 +134,7 @@
|
| |
additional_env_keys = ["FAS_ADMIN_GROUP", "PAGURE_REPO_TOKEN", "PAGURE_REPO_WEBHOOK_KEY",
|
| |
"PAGURE_REPO", "PAGURE_BOT_USERNAME", "PAGURE_BOT_ENABLED", "PAGURE_URL", "PAGURE_API",
|
| |
"BUGZILLA_URL", "BUGZILLA_API_KEY", "BODHI_URL", "BLOCKERBUGS_URL", "BLOCKERBUGS_API",
|
| |
- "SECRET_KEY", "FAS_BASE_URL"]
|
| |
+ "SECRET_KEY"]
|
| |
missing_data = False
|
| |
|
| |
for key in additional_env_keys:
|
| |
@@ -151,7 +158,5 @@
|
| |
|
| |
# Adjust testing config to match staging
|
| |
if openshift_production == "0":
|
| |
- config_object["FAS_FLASK_COOKIE_REQUIRES_HTTPS"] = False
|
| |
- config_object["FAS_CHECK_CERT"] = False
|
| |
config_object["PRODUCTION"] = False
|
| |
- config_object["FAS_ENABLED"] = True
|
| |
+ config_object["OIDC_ENABLED"] = True
|
| |
Authentication now uses Flask-OIDC instead of the deprecated FAS OpenID library.
Fixes: #288