Commit f7f47c8
feat: simplify AuthPolicy to pass full subscription-info object
Pass the complete subscription-info object instead of extracting individual
fields, simplifying the AuthPolicy and enabling consumers to access any field
without controller changes.
Changes:
- Add subscription_info field with full auth.metadata["subscription-info"] object
- Remove redundant top-level fields:
- organizationId (now: subscription_info.organizationId)
- costCenter (now: subscription_info.costCenter)
- subscription_labels (now: subscription_info.labels)
- Update TelemetryPolicy to access nested fields
- Add test coverage verifying subscription_info returns full object
Benefits:
- Cleaner policy: single object vs multiple extracted fields
- Extensibility: new subscription fields automatically available
- Consistency: field name matches source (subscription-info → subscription_info)
Consumers should update expressions:
Before: auth.identity.organizationId
After: auth.identity.subscription_info.organizationId
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 7e02117 commit f7f47c8
File tree
4 files changed
+51
-15
lines changed- deployment/base/observability
- docs/content/configuration-and-management
- maas-controller/pkg/controller/maas
4 files changed
+51
-15
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| |||
Lines changed: 5 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
488 | 485 | | |
489 | 486 | | |
490 | 487 | | |
| |||
Lines changed: 43 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1137 | 1137 | | |
1138 | 1138 | | |
1139 | 1139 | | |
1140 | | - | |
| 1140 | + | |
1141 | 1141 | | |
1142 | 1142 | | |
1143 | 1143 | | |
| |||
1148 | 1148 | | |
1149 | 1149 | | |
1150 | 1150 | | |
1151 | | - | |
1152 | | - | |
1153 | | - | |
| 1151 | + | |
1154 | 1152 | | |
1155 | 1153 | | |
1156 | 1154 | | |
1157 | 1155 | | |
1158 | 1156 | | |
1159 | 1157 | | |
1160 | 1158 | | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
1161 | 1200 | | |
1162 | 1201 | | |
1163 | 1202 | | |
| |||
0 commit comments