xref: /aosp_15_r20/external/chromium-trace/catapult/common/lab/keychain_unlock.sh (revision 1fa4b3da657c0e9ad43c0220bacf9731820715a5)
1*1fa4b3daSHector Dearman#!/bin/sh
2*1fa4b3daSHector Dearman# Copyright 2016 The Chromium Authors. All rights reserved.
3*1fa4b3daSHector Dearman# Use of this source code is governed by a BSD-style license that can be
4*1fa4b3daSHector Dearman# found in the LICENSE file.
5*1fa4b3daSHector Dearman#
6*1fa4b3daSHector Dearman# Script to SSH into a list of bots and set up their keychains for Telemetry.
7*1fa4b3daSHector Dearman# https://www.chromium.org/developers/telemetry/telemetry-mac-keychain-setup
8*1fa4b3daSHector Dearman
9*1fa4b3daSHector Dearmanfor hostname in "$@"
10*1fa4b3daSHector Dearmando
11*1fa4b3daSHector Dearman  ssh -t "$hostname" 'security unlock-keychain login.keychain
12*1fa4b3daSHector Dearmansecurity delete-generic-password -s "Chrome Safe Storage" login.keychain
13*1fa4b3daSHector Dearmansecurity add-generic-password -a Chrome -w "+NTclOvR4wLMgRlLIL9bHQ==" \
14*1fa4b3daSHector Dearman  -s "Chrome Safe Storage" -A login.keychain'
15*1fa4b3daSHector Dearmandone
16