Changeset 243854 in webkit


Ignore:
Timestamp:
Apr 3, 2019 8:57:11 PM (5 years ago)
Author:
aakash_jain@apple.com
Message:

[ews-build] Cancel build and similar operations should have authentication
https://bugs.webkit.org/show_bug.cgi?id=196520

Reviewed by Dewei Zhu.

  • BuildSlaveSupport/ews-build/master.cfg: Configure authentication using admin's username and password from

environment variables.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/BuildSlaveSupport/ews-build/master.cfg

    r243509 r243854  
    11import os
    22import socket
     3import sys
     4
     5from buildbot.plugins import util
    36
    47import loadConfig
     
    1619    'Workers.showWorkerBuilders': True,
    1720}
     21
     22if not is_test_mode_enabled:
     23    admin_username = os.getenv('EWS_ADMIN_USERNAME')
     24    admin_password = os.getenv('EWS_ADMIN_PASSWORD')
     25    if not admin_username or not admin_password:
     26        print('Environment variables for admin username/password not found. Please ensure these variables are set.')
     27        sys.exit(1)
     28    # See https://docs.buildbot.net/current/manual/configuration/www.html#example-configs
     29    authz = util.Authz(
     30        allowRules=[util.AnyControlEndpointMatcher(role="admin")],
     31        roleMatchers=[util.RolesFromEmails(admin=[admin_username])]
     32    )
     33    auth = util.UserPasswordAuth({admin_username: admin_password})
     34    c['www']['auth'] = auth
     35    c['www']['authz'] = authz
    1836
    1937c['protocols'] = {'pb': {'port': 17000}}
  • trunk/Tools/ChangeLog

    r243852 r243854  
     12019-04-03  Aakash Jain  <aakash_jain@apple.com>
     2
     3        [ews-build] Cancel build and similar operations should have authentication
     4        https://bugs.webkit.org/show_bug.cgi?id=196520
     5
     6        Reviewed by Dewei Zhu.
     7
     8        * BuildSlaveSupport/ews-build/master.cfg: Configure authentication using admin's username and password from
     9        environment variables.
     10
    1112019-04-03  Aakash Jain  <aakash_jain@apple.com>
    212
Note: See TracChangeset for help on using the changeset viewer.