mozreview: change password of privileged mozreview account
authorGregory Szorc <gps@mozilla.com>
Tue, 05 Jan 2016 17:33:23 -0800
changeset 362072 30dab86c2248f9e9438e0248bb76bc67280b1d39
parent 362071 2f4d7c427eb986bb2c7b015057c626fcd8338f38
child 362073 01efb008d1f2d3c76c61d654de808348bb6be38f
push id16998
push userrwood@mozilla.com
push dateMon, 02 May 2016 19:42:03 +0000
mozreview: change password of privileged mozreview account Let's not use the same password everywhere. This exposes us to bugs around using the wrong accounts in tests.
ansible/roles/docker-hg-reviewboard/tasks/main.yml
hgext/reviewboard/tests/helpers.sh
testing/vcttesting/mozreview.py
testing/vcttesting/reviewboard/mach_commands.py
--- a/ansible/roles/docker-hg-reviewboard/tasks/main.yml
+++ b/ansible/roles/docker-hg-reviewboard/tasks/main.yml
@@ -18,17 +18,17 @@
 
 - name: Install psutil
   pip: name=psutil
 
 - name: Configure MozReview user
   ini_file: dest=/etc/mercurial/hgrc section={{ item.section }} option={{ item.option }} value="{{ item.value }}"
   with_items:
     - { section: reviewboard, option: username, value: mozreview }
-    - { section: reviewboard, option: password, value: password }
+    - { section: reviewboard, option: password, value: mrpassword }
 
 - name: add LDAP settings file
   template: src=ldap.json.j2
             dest=/etc/mercurial/ldap.json
             owner=root
             group=root
             mode=0644
   tags: docker-startup
--- a/hgext/reviewboard/tests/helpers.sh
+++ b/hgext/reviewboard/tests/helpers.sh
@@ -1,14 +1,14 @@
 repoconfig() {
   cat >> $1 << EOF
 [reviewboard]
 repoid = 1
 username=mozreview
-password=password
+password=mrpassword
 EOF
 }
 
 clientconfig() {
   cat >> $1 << EOF
 [ui]
 ssh = $TESTDIR/testing/mozreview-ssh
 
--- a/testing/vcttesting/mozreview.py
+++ b/testing/vcttesting/mozreview.py
@@ -230,17 +230,17 @@ class MozReview(object):
         self.pulse_id = mr_info['pulse_id']
         self.pulse_host = mr_info['pulse_host']
         self.pulse_port = mr_info['pulse_port']
 
         self.admin_username = bugzilla.username
         self.admin_password = bugzilla.password
         self.hg_rb_username = "mozreview"
         self.hg_rb_email = "mozreview@example.com"
-        self.hg_rb_password = "password"
+        self.hg_rb_password = "mrpassword"
         self.ldap_uri = mr_info['ldap_uri']
         self.hgrb_id = mr_info['hgrb_id']
         self.ssh_hostname = mr_info['ssh_hostname']
         self.ssh_port = mr_info['ssh_port']
         self.mercurial_url = mr_info['mercurial_url']
         self.hgweb_id = mr_info['hgweb_id']
         self.hgweb_url = mr_info['hgweb_url']
 
--- a/testing/vcttesting/reviewboard/mach_commands.py
+++ b/testing/vcttesting/reviewboard/mach_commands.py
@@ -502,34 +502,34 @@ class ReviewBoardCommands(object):
         data[u.id] = o
 
         print(yaml.safe_dump(data, default_flow_style=False).rstrip())
 
     @Command('dump-user-ldap', category='reviewboard',
         description='Print the ldap username of a Review Board user.')
     @CommandArgument('username', help='Username whose info the print')
     def dump_user_ldap(self, username):
-        root = self._get_root(username="mozreview", password="password")
+        root = self._get_root(username="mozreview", password="mrpassword")
         ext = root.get_extension(
             extension_name='mozreview.extension.MozReviewExtension')
         user = ext.get_ldap_associations().get_item(username).ldap_username
 
         if user:
             print('ldap username: %s' % user)
         else:
             print('no ldap username associated with %s' % username)
 
     @Command('associate-ldap-user', category='reviewboard',
         description='Associate an LDAP email address with a user.')
     @CommandArgument('username', help='Username to associate with ldap')
     @CommandArgument('email', help='LDAP email to associate')
     def associate_ldap_user(self, username, email):
         # We use the "mozreview" account which has the special permission
         # to read / associate ldap email addresses.
-        root = self._get_root(username="mozreview", password="password")
+        root = self._get_root(username="mozreview", password="mrpassword")
         ext = root.get_extension(
             extension_name='mozreview.extension.MozReviewExtension')
 
         association = ext.get_ldap_associations().get_item(username)
         association.update(ldap_username=email)
 
         print('%s associated with %s' % (email, username))