ReleaseEngineering/Archive/Update The Foxfooding Program IMEI Whitelist

From MozillaWiki
Jump to: navigation, search

This page is obsolete

The Foxfooding Program IMEI Whitelist as a listed of hashed IMEIs of Foxfooding devices that are allowed to receive updates on the "foxfood" channel. This list is maintained in Balrog as a strucuted piece of JSON. It was initially created as part of bug 1207313.

To make changes to it, follow these instructions:

  1. Determine which IMEI(s) need changes. IMEIs are hashed with SHA512, so you'll need the hashed version of each IMEI before you get started. To calculate this, you can use the "sha512sum" command (Linux) or "shasum -a 512" (OS X). Eg:
  2.  $ echo -n "123456789" | sha512sum
     ff3245abe317049ed1b8aa7aa2f4c4dcb8bf86f083ed67eb26b43e2fbe3ba8fdf759f9e2f46fcf2a06c2dfeddf0cedcd41a68034cd618b880785b34f759d1a69  -
     
     $ echo -n "123456789" | shasum -a 512
     ff3245abe317049ed1b8aa7aa2f4c4dcb8bf86f083ed67eb26b43e2fbe3ba8fdf759f9e2f46fcf2a06c2dfeddf0cedcd41a68034cd618b880785b34f759d1a69  -
    
  3. Locate The "B2G-Foxfood-IMEI-Whitelist" blob in Balrog's admin UI.
  4. Click the "Download" link, save the file to your computer:
  5. Imei whitelist release.png

  6. Open up the saved file in a text editor
  7. Edit the file as needed
    • If adding a new IMEI to the list:
      • Copy and paste the first block, then edit the IMEI. For example, let's add "abcdef9876" to this whitelist:
      • {
            "whitelist": [
                {
                    "imei": "abcdef123546"
                },
                {
                    "imei": "fedcba123546"
                },
                {
                    "imei": "fedcba654321"
                }
            ],
            "name": "B2G-Foxfood-IMEI-Whitelist",
            "schema_version": 3000
        }
        
      • Which now becomes:
      • {
            "whitelist": [
                {
                    "imei": "abcdef9876"
                },
                {
                    "imei": "abcdef123546"
                },
                {
                    "imei": "fedcba123546"
                },
                {
                    "imei": "fedcba654321"
                }
            ],
            "name": "B2G-Foxfood-IMEI-Whitelist",
            "schema_version": 3000
        }
        
    • If removing an IMEI:
      • Remove its block entirely. For example, let's remove "fedcba123456" from this whitelist:
      • {
            "whitelist": [
                {
                    "imei": "abcdef123546"
                },
                {
                    "imei": "fedcba123546"
                },
                {
                    "imei": "fedcba654321"
                }
            ],
            "name": "B2G-Foxfood-IMEI-Whitelist",
            "schema_version": 3000
        }
        
      • Which now becomes:
      • {
            "whitelist": [
                {
                    "imei": "abcdef123546"
                },
                {
                    "imei": "fedcba654321"
                }
            ],
            "name": "B2G-Foxfood-IMEI-Whitelist",
            "schema_version": 3000
        }
        
  8. When you have completed all of your edits, it's a good idea to validate that the JSON formatting is correct. You can do this by copying and pasting the new contents into an online JSON validator.</i>
  9. Now you're ready to upload the new whitelist to Balrog. You'll need to find it in the admin UI again. Click the "Update" button, then "Browse" (and choose the file you just edited locally), then click "Save":
  10. Imei upload.png

  11. If you get this dialog, the whitelist format is incorrect, otherwise the whitelist has been updated:
  12. Balrog form submission error.png

    Notes

    • To update the whitelist, the user needs permission "/releases/:name" with the "{"product":"B2G"} option.