Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbie-Microsoft committed Aug 27, 2024
1 parent 7740fd6 commit 14baefe
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .pipelines/3p-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,28 @@ extends:
- stage: e2e_test
displayName: "3P E2E Tests"
jobs:
- template: .pipelines/template-install-keyvault-secrets.yml
# Task to download Azure Key Vault secrets using the Azure Key Vault task version 2.
- task: AzureKeyVault@2
displayName: "Connect to Key Vault"
inputs:
azureSubscription: "AuthSdkResourceManager" # string. Workload identity service connection to use managed identity authentication
KeyVaultName: "msidlabs" # string. Required. The name of the Key Vault containing the secrets.
#setting secrets filter to fetch only MSIDLABCertificate cert from the vault
SecretsFilter: "LabAuth" # string. Required. Specifies the secret to download. Use '*' for all secrets.
#RunAsPreJob: false # boolean. Make secrets available to whole job. Default: false.

- powershell: |
$kvSecretBytes = [System.Convert]::FromBase64String('$(LabAuth)')
$certCollection = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2Collection
$certCollection.Import($kvSecretBytes, $null, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable)
$protectedCertificateBytes = $certCollection.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Pkcs12)
$pfxPath = "C:\tmp\TestCert.pfx"
[System.IO.File]::WriteAllBytes($pfxPath, $protectedCertificateBytes)
Import-PfxCertificate -FilePath $pfxPath -CertStoreLocation Cert:\LocalMachine\My
displayName: "Install Keyvault Secrets"
- template: .pipelines/templates/e2e-tests.yml@1P
parameters:
jobName: "validate_msal_browser"
Expand Down

0 comments on commit 14baefe

Please sign in to comment.