microsoft / monosize

Bundle size tooling for monorepos
MIT License
25 stars 9 forks source link

Feature: enable Federated Identity access to monosize-storage-azure #76

Closed TristanWatanabe closed 2 weeks ago

TristanWatanabe commented 1 month ago

With recent security push, using key based credentials is no longer security compliant. The monosize-storage-azure package solely uses key based credentials (see below) and would need to be extended to allow for federated identity as well.

https://github.com/microsoft/monosize/blob/351ae8e05fa2c01876120ff151f0255b50362c91/packages/monosize-storage-azure/src/uploadReportToRemote.mts#L33-L35

TristanWatanabe commented 1 month ago

Chatted with @Hotell offline and agreed on this approach:

In order to support managed identity: 1) adding an extra type to AzureStorageConfig like managedIdentity: boolean 2) and then simply updating this function and use step 1 as a conditional to use the new managed identity approach. This would support the old key based secret approach while also adding an option for managed identity