Skip to content
Permalink
Browse files
[build.webkit.org] Allow configuring multiple user credentials
https://bugs.webkit.org/show_bug.cgi?id=240826

Reviewed by Aakash Jain.

Allow configuring multiple user credentials for build.webkit.org as we
did for ews-build.webkit.org in 246332@main. This also loads credentials
from passwords.json instead of environment variables.

* Tools/CISupport/build-webkit-org/master.cfg:

Canonical link: https://commits.webkit.org/250919@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
ryanhaddad committed May 24, 2022
1 parent 197387a commit 7f90acb5f3e386b90e4c564b812540606b7cc14d
Showing 1 changed file with 5 additions and 6 deletions.
@@ -42,17 +42,16 @@ c['www']['ui_default_config'] = {
}

if not is_test_mode_enabled:
admin_username = load_password('ADMIN_USERNAME')
admin_password = load_password('ADMIN_PASSWORD')
if not admin_username or not admin_password:
print('\n\nERROR: Admin username/password missing from passwords.json.\n')
credentials = load_password('BUILD_WEBKIT_CREDENTIALS')
if not credentials:
print('BUILD_WEBKIT credentials not found. Please ensure BUILD_WEBKIT_CREDENTIALS is configured either in env variables or in passwords.json')
sys.exit(1)
# See https://docs.buildbot.net/2.10.0/manual/configuration/www.html#example-configs
authz = util.Authz(
allowRules=[util.AnyControlEndpointMatcher(role="admin")],
roleMatchers=[util.RolesFromEmails(admin=[admin_username])]
roleMatchers=[util.RolesFromEmails(admin=list(credentials.keys()))]
)
auth = util.UserPasswordAuth({admin_username: admin_password})
auth = util.UserPasswordAuth(credentials)
c['www']['auth'] = auth
c['www']['authz'] = authz

0 comments on commit 7f90acb

Please sign in to comment.