Commit 6765623
refactor(flow): use GCP KMS client library instead of raw HTTP
Replace manual metadata token fetch + raw REST API calls with the
official cloud.google.com/go/kms client library. The client handles
authentication via Application Default Credentials (Workload Identity
on GKE) automatically.
This reduces ~50 lines of HTTP plumbing to ~15 lines of typed SDK calls
and eliminates manual token management, JSON serialization, and error
response parsing.
Pinned cloud.google.com/go/kms at v1.24.0 to stay within the
google.golang.org/api v0.257.0 constraint.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent db62df5 commit 6765623
3 files changed
Lines changed: 18 additions & 50 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
99 | 104 | | |
100 | 105 | | |
101 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | | - | |
9 | | - | |
10 | 7 | | |
11 | 8 | | |
12 | 9 | | |
13 | | - | |
14 | 10 | | |
15 | 11 | | |
| 12 | + | |
| 13 | + | |
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
| |||
103 | 101 | | |
104 | 102 | | |
105 | 103 | | |
106 | | - | |
107 | | - | |
108 | | - | |
| 104 | + | |
109 | 105 | | |
110 | | - | |
| 106 | + | |
111 | 107 | | |
112 | | - | |
| 108 | + | |
113 | 109 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
140 | 114 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 115 | + | |
155 | 116 | | |
156 | 117 | | |
157 | | - | |
| 118 | + | |
158 | 119 | | |
159 | 120 | | |
160 | 121 | | |
| |||
0 commit comments