MasterKey is an Azure Key Vault Key used to Encrypt and Decrypt SOPS' data key.
| 41 | // MasterKey is an Azure Key Vault Key used to Encrypt and Decrypt SOPS' |
| 42 | // data key. |
| 43 | type MasterKey struct { |
| 44 | // VaultURL of the Azure Key Vault. For example: |
| 45 | // "https://myvault.vault.azure.net/". |
| 46 | VaultURL string |
| 47 | // Name of the Azure Key Vault key in the VaultURL. |
| 48 | Name string |
| 49 | // Version of the Azure Key Vault key. Can be empty. |
| 50 | Version string |
| 51 | // EncryptedKey contains the SOPS data key encrypted with the Azure Key |
| 52 | // Vault key. |
| 53 | EncryptedKey string |
| 54 | // CreationDate of the MasterKey, used to determine if the EncryptedKey |
| 55 | // needs rotation. |
| 56 | CreationDate time.Time |
| 57 | |
| 58 | // tokenCredential contains the azcore.TokenCredential used by the Azure |
| 59 | // client. It can be injected by a (local) keyservice.KeyServiceServer |
| 60 | // using TokenCredential.ApplyToMasterKey. |
| 61 | // If nil, azidentity.NewDefaultAzureCredential is used. |
| 62 | tokenCredential azcore.TokenCredential |
| 63 | // clientOptions contains the azkeys.ClientOptions used by the Azure client. |
| 64 | clientOptions *azkeys.ClientOptions |
| 65 | } |
| 66 | |
| 67 | // newMasterKey creates a new MasterKey from a URL, key name and version, |
| 68 | // setting the creation date to the current date. |
nothing calls this directly
no outgoing calls
no test coverage detected