-
Notifications
You must be signed in to change notification settings - Fork 4.2k
[Az.KeyVault] Included policy while importing Certificate to a KeyVault #21472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 11 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
5ca7ada
Half way upload.
NoriZC 3a126d5
Second time commit-halp way
NoriZC f94fbf7
sync 4/2
NoriZC 6bee852
Done transfer to track2
NoriZC 0375688
sync 4/5
NoriZC 74547ca
Complete import cert with policy
NoriZC 2591b88
complete all cases for policy
NoriZC fbf60aa
Update ChangeLog
NoriZC 794efa5
Remove unnecessary lines
NoriZC 3416bcd
Resolve comments
NoriZC c7b2dbf
Update pfx file name
NoriZC cf688e8
Update according to comments
NoriZC 1b94f0d
Remove unnecessary dependecies
NoriZC c95e61e
Modify the actions number
NoriZC 734b379
Update the contentType validation
NoriZC d51b4b4
solve paramaterset ambigious
NoriZC 676e0fe
Update ChangeLog.md
NoriZC 266f0bc
Merge the exceptions, update help file
NoriZC d95d512
Merge the exceptions, update help file
NoriZC 9580fa3
Resolve the comments 4/27
NoriZC 88b0f1c
Update descriptions of policyobject and policypath
NoriZC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
src/KeyVault/KeyVault.Test/PesterTests/Certificate.Tests.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| BeforeAll { | ||
| $vaultName = 'nori-kv765' | ||
| . "..\Scripts\Common.ps1" | ||
| } | ||
|
|
||
| Describe "Import Certificate with policy" { | ||
| It "ImportCertificateFromFileWithPolicyParameterSet" { | ||
| $certName = Get-CertificateName | ||
| $certFilePath = "..\Resources\importCertWithPolicy.pfx" | ||
| $policy = New-AzKeyVaultCertificatePolicy -SecretContentType "application/x-pkcs12" -SubjectName "CN=contoso.com" -IssuerName "Self" -ValidityInMonths 6 -ReuseKeyOnRenewal | ||
|
|
||
| $cert = Import-AzKeyVaultCertificate -VaultName $vaultName -Name $certName -FilePath $certFilePath -Policy $policy | ||
| $cert.Policy.SecretContentType | Should -Be "application/x-pkcs12" | ||
| } | ||
| It "ImportCertificateFromFileWithPolicyFileParameterSet" { | ||
| $certName = Get-CertificateName | ||
| $certFilePath = "..\Resources\importCertWithPolicy.pfx" | ||
| $policyPath = "..\Resources\certPolicy.json" | ||
|
|
||
| $cert = Import-AzKeyVaultCertificate -VaultName $vaultName -Name $certName -FilePath $certFilePath -PolicyPath $policyPath | ||
| $cert.Policy.SecretContentType | Should -Be "application/x-pkcs12" | ||
| } | ||
| It "ImportWithPrivateKeyFromStringWithPolicyFileParameterSet" { | ||
| $certName = Get-CertificateName | ||
| $certFilePath = "..\Resources\importCertWithPolicy.pfx" | ||
| $policyPath = "..\Resources\certPolicy.json" | ||
| $Base64StringCertificate = [System.Convert]::ToBase64String([System.IO.File]::ReadAllBytes($certFilePath)) | ||
|
|
||
| $cert = Import-AzKeyVaultCertificate -VaultName $vaultName -Name $certName -CertificateString $Base64StringCertificate -PolicyPath $policyPath | ||
| $cert.Policy.SecretContentType | Should -Be "application/x-pkcs12" | ||
| } | ||
| It "ImportWithPrivateKeyFromCollectionWithPolicyFileParameterSet" { | ||
| $certName = Get-CertificateName | ||
| $certFilePath = "..\Resources\importCertWithPolicy.pfx" | ||
| $policyPath = "..\Resources\certPolicy.json" | ||
| $certCollection = [System.Security.Cryptography.X509Certificates.X509Certificate2Collection]::new() | ||
| $certCollection.Import($certFilePath, $null, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable) | ||
|
|
||
| $cert = Import-AzKeyVaultCertificate -VaultName $vaultName -Name $certName -CertificateCollection $certCollection -PolicyPath $policyPath | ||
| $cert.Policy.SecretContentType | Should -Be "application/x-pkcs12" | ||
| } | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| { | ||
| "id": "https://myvault.vault.azure.net/certificates/updateCert01/policy", | ||
| "key_props": { | ||
| "exportable": true, | ||
| "kty": "RSA", | ||
| "key_size": 2048, | ||
| "reuse_key": false | ||
| }, | ||
|
|
||
| "secret_props": { | ||
| "contentType": "application/x-pkcs12" | ||
| }, | ||
|
|
||
| "x509_props": { | ||
| "subject": "CN=KeyVaultTest", | ||
| "ekus": [], | ||
| "key_usage": [], | ||
| "validity_months": 297 | ||
| }, | ||
|
|
||
| "lifetime_actions": [ | ||
| { | ||
| "trigger": { | ||
| "lifetime_percentage": 80 | ||
| }, | ||
| "action": { | ||
| "action_type": "EmailContacts" | ||
| } | ||
| } | ||
| ], | ||
|
|
||
| "issuer": { | ||
| "name": "Unknown" | ||
| }, | ||
| "attributes": { | ||
| "enabled": true, | ||
| "created": 1482188947, | ||
| "updated": 1482188947 | ||
| } | ||
| } |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -27,6 +27,9 @@ | |||||||||
| using Microsoft.Azure.Commands.Common.Exceptions; | ||||||||||
| using Microsoft.Azure.Commands.KeyVault.Properties; | ||||||||||
|
|
||||||||||
| using Newtonsoft.Json; | ||||||||||
| using System.Text.Json; | ||||||||||
|
|
||||||||||
| namespace Microsoft.Azure.Commands.KeyVault | ||||||||||
| { | ||||||||||
| /// <summary> | ||||||||||
|
|
@@ -36,15 +39,18 @@ namespace Microsoft.Azure.Commands.KeyVault | |||||||||
| /// importing an existing certificate package file that contains both the | ||||||||||
| /// certificate and private key (example: PFX or P12 files). | ||||||||||
| /// </summary> | ||||||||||
| [Cmdlet("Import", ResourceManager.Common.AzureRMConstants.AzurePrefix + "KeyVaultCertificate",SupportsShouldProcess = true,DefaultParameterSetName = ImportCertificateFromFileParameterSet)] | ||||||||||
| [Cmdlet("Import", ResourceManager.Common.AzureRMConstants.AzurePrefix + "KeyVaultCertificate",SupportsShouldProcess = true,DefaultParameterSetName = ImportCertificateFromFileWithPolicyParameterSet)] | ||||||||||
| [OutputType(typeof(PSKeyVaultCertificate))] | ||||||||||
| public class ImportAzureKeyVaultCertificate : KeyVaultCmdletBase | ||||||||||
| { | ||||||||||
| #region Parameter Set Names | ||||||||||
|
|
||||||||||
| private const string ImportCertificateFromFileParameterSet = "ImportCertificateFromFile"; | ||||||||||
| private const string ImportWithPrivateKeyFromCollectionParameterSet = "ImportWithPrivateKeyFromCollection"; | ||||||||||
| private const string ImportWithPrivateKeyFromStringParameterSet = "ImportWithPrivateKeyFromString"; | ||||||||||
| private const string ImportCertificateFromFileWithPolicyParameterSet = "ImportCertificateFromFileWithPolicy"; | ||||||||||
|
NoriZC marked this conversation as resolved.
Outdated
|
||||||||||
| private const string ImportWithPrivateKeyFromCollectionWithPolicyParameterSet = "ImportWithPrivateKeyFromCollectionWithPolicy"; | ||||||||||
| private const string ImportWithPrivateKeyFromStringWithPolicyParameterSet = "ImportWithPrivateKeyFromStringWithPolicy"; | ||||||||||
| private const string ImportCertificateFromFileWithPolicyFileParameterSet = "ImportCertificateFromFileWithPolicyFile"; | ||||||||||
| private const string ImportWithPrivateKeyFromCollectionWithPolicyFileParameterSet = "ImportWithPrivateKeyFromCollectionWithPolicyFile"; | ||||||||||
| private const string ImportWithPrivateKeyFromStringWithPolicyFileParameterSet = "ImportWithPrivateKeyFromStringWithPolicyFile"; | ||||||||||
|
|
||||||||||
| #endregion | ||||||||||
|
|
||||||||||
|
|
@@ -76,23 +82,32 @@ public class ImportAzureKeyVaultCertificate : KeyVaultCmdletBase | |||||||||
| /// File Path | ||||||||||
| /// </summary> | ||||||||||
| [Parameter(Mandatory = true, | ||||||||||
| ParameterSetName = ImportCertificateFromFileParameterSet, | ||||||||||
| ParameterSetName = ImportCertificateFromFileWithPolicyParameterSet, | ||||||||||
| HelpMessage = "Specifies the path to the file that contains the certificate to add to key vault.")] | ||||||||||
| [Parameter(Mandatory = true, | ||||||||||
| ParameterSetName = ImportCertificateFromFileWithPolicyFileParameterSet, | ||||||||||
| HelpMessage = "Specifies the path to the file that contains the certificate to add to key vault.")] | ||||||||||
| public string FilePath { get; set; } | ||||||||||
|
|
||||||||||
| /// <summary> | ||||||||||
| /// Base64 encoded representation of the certificate object to import | ||||||||||
| /// </summary> | ||||||||||
| [Parameter(Mandatory = true, | ||||||||||
| ParameterSetName = ImportWithPrivateKeyFromStringParameterSet, | ||||||||||
| ParameterSetName = ImportWithPrivateKeyFromStringWithPolicyParameterSet, | ||||||||||
| HelpMessage = "Base64 encoded representation of the certificate object to import. This certificate needs to contain the private key.")] | ||||||||||
| [Parameter(Mandatory = true, | ||||||||||
| ParameterSetName = ImportWithPrivateKeyFromStringWithPolicyFileParameterSet, | ||||||||||
| HelpMessage = "Base64 encoded representation of the certificate object to import. This certificate needs to contain the private key.")] | ||||||||||
| public string CertificateString { get; set; } | ||||||||||
|
|
||||||||||
| /// <summary> | ||||||||||
| /// Specifies type of the certificate to be imported. | ||||||||||
| /// </summary> | ||||||||||
| [Parameter(Mandatory = false, | ||||||||||
| ParameterSetName = ImportWithPrivateKeyFromStringParameterSet, | ||||||||||
| ParameterSetName = ImportWithPrivateKeyFromStringWithPolicyParameterSet, | ||||||||||
| HelpMessage = "Specifies the type of the certificate to be imported. Regards certificate string as PFX format by default.")] | ||||||||||
| [Parameter(Mandatory = false, | ||||||||||
| ParameterSetName = ImportWithPrivateKeyFromStringWithPolicyFileParameterSet, | ||||||||||
| HelpMessage = "Specifies the type of the certificate to be imported. Regards certificate string as PFX format by default.")] | ||||||||||
| [PSArgumentCompleter(Constants.Pkcs12ContentType, Constants.PemContentType)] | ||||||||||
| public string ContentType { get; set; } = Constants.Pkcs12ContentType; | ||||||||||
|
|
@@ -101,20 +116,65 @@ public class ImportAzureKeyVaultCertificate : KeyVaultCmdletBase | |||||||||
| /// Password | ||||||||||
| /// </summary> | ||||||||||
| [Parameter(Mandatory = false, | ||||||||||
| ParameterSetName = ImportCertificateFromFileParameterSet, | ||||||||||
| ParameterSetName = ImportCertificateFromFileWithPolicyParameterSet, | ||||||||||
| HelpMessage = "Specifies the password for the certificate and private key file to import.")] | ||||||||||
| [Parameter(Mandatory = false, | ||||||||||
| ParameterSetName = ImportWithPrivateKeyFromStringWithPolicyParameterSet, | ||||||||||
| HelpMessage = "Specifies the password for the certificate and private key base64 encoded string to import.")] | ||||||||||
| [Parameter(Mandatory = false, | ||||||||||
| ParameterSetName = ImportWithPrivateKeyFromCollectionWithPolicyParameterSet, | ||||||||||
| HelpMessage = "Specifies the password for the certificate collection and private key to import.")] | ||||||||||
| [Parameter(Mandatory = false, | ||||||||||
| ParameterSetName = ImportCertificateFromFileWithPolicyFileParameterSet, | ||||||||||
| HelpMessage = "Specifies the password for the certificate and private key file to import.")] | ||||||||||
| [Parameter(Mandatory = false, | ||||||||||
| ParameterSetName = ImportWithPrivateKeyFromStringParameterSet, | ||||||||||
| ParameterSetName = ImportWithPrivateKeyFromStringWithPolicyFileParameterSet, | ||||||||||
| HelpMessage = "Specifies the password for the certificate and private key base64 encoded string to import.")] | ||||||||||
| [Parameter(Mandatory = false, | ||||||||||
| ParameterSetName = ImportWithPrivateKeyFromCollectionWithPolicyFileParameterSet, | ||||||||||
| HelpMessage = "Specifies the password for the certificate collection and private key to import.")] | ||||||||||
|
BethanyZhou marked this conversation as resolved.
Outdated
|
||||||||||
| public SecureString Password { get; set; } | ||||||||||
|
|
||||||||||
| /// <summary> | ||||||||||
| /// File Path | ||||||||||
| /// </summary> | ||||||||||
| [Parameter(Mandatory = false, | ||||||||||
| ParameterSetName = ImportCertificateFromFileWithPolicyFileParameterSet, | ||||||||||
| HelpMessage = "Specifies the path to the file that contains the certificate policy to import to key vault.")] | ||||||||||
|
NoriZC marked this conversation as resolved.
Outdated
|
||||||||||
| [Parameter(Mandatory = false, | ||||||||||
| ParameterSetName = ImportWithPrivateKeyFromStringWithPolicyFileParameterSet, | ||||||||||
| HelpMessage = "Specifies the path to the file that contains the certificate policy to import to key vault.")] | ||||||||||
| [Parameter(Mandatory = false, | ||||||||||
| ParameterSetName = ImportWithPrivateKeyFromCollectionWithPolicyFileParameterSet, | ||||||||||
| HelpMessage = "Specifies the path to the file that contains the certificate policy to import to key vault.")] | ||||||||||
| public string PolicyPath { get; set; } | ||||||||||
|
BethanyZhou marked this conversation as resolved.
|
||||||||||
|
|
||||||||||
| /// <summary> | ||||||||||
| /// File Path | ||||||||||
| /// </summary> | ||||||||||
| [Parameter(Mandatory = false, | ||||||||||
| ParameterSetName = ImportCertificateFromFileWithPolicyParameterSet, | ||||||||||
| HelpMessage = "Specifies the certificate policy to import to key vault.")] | ||||||||||
|
BethanyZhou marked this conversation as resolved.
Outdated
|
||||||||||
| [Parameter(Mandatory = false, | ||||||||||
| ParameterSetName = ImportWithPrivateKeyFromStringWithPolicyParameterSet, | ||||||||||
| HelpMessage = "Specifies the certificate policy to import to key vault.")] | ||||||||||
| [Parameter(Mandatory = false, | ||||||||||
| ParameterSetName = ImportWithPrivateKeyFromCollectionWithPolicyParameterSet, | ||||||||||
| HelpMessage = "Specifies the certificate policy to import to key vault.")] | ||||||||||
| public PSKeyVaultCertificatePolicy Policy { get; set; } | ||||||||||
|
NoriZC marked this conversation as resolved.
Outdated
|
||||||||||
|
|
||||||||||
| /// <summary> | ||||||||||
| /// Certificate Collection | ||||||||||
| /// </summary> | ||||||||||
| [Parameter(Mandatory = true, | ||||||||||
| Position = 2, | ||||||||||
| ValueFromPipeline = true, | ||||||||||
| ParameterSetName = ImportWithPrivateKeyFromCollectionParameterSet, | ||||||||||
| ParameterSetName = ImportWithPrivateKeyFromCollectionWithPolicyParameterSet, | ||||||||||
| HelpMessage = "Specifies the certificate collection to add to key vault.")] | ||||||||||
| [Parameter(Mandatory = true, | ||||||||||
| Position = 2, | ||||||||||
| ValueFromPipeline = true, | ||||||||||
| ParameterSetName = ImportWithPrivateKeyFromCollectionWithPolicyFileParameterSet, | ||||||||||
| HelpMessage = "Specifies the certificate collection to add to key vault.")] | ||||||||||
| public X509Certificate2Collection CertificateCollection { get; set; } | ||||||||||
|
|
||||||||||
|
|
@@ -131,6 +191,7 @@ public class ImportAzureKeyVaultCertificate : KeyVaultCmdletBase | |||||||||
| protected override void BeginProcessing() | ||||||||||
| { | ||||||||||
| FilePath = this.TryResolvePath(FilePath); | ||||||||||
| PolicyPath = this.TryResolvePath(PolicyPath); | ||||||||||
| base.BeginProcessing(); | ||||||||||
| } | ||||||||||
|
|
||||||||||
|
|
@@ -144,6 +205,13 @@ private void ValidateParameters() | |||||||||
| throw new AzPSArgumentException(string.Format(Resources.FileNotFound, this.FilePath), nameof(FilePath)); | ||||||||||
| } | ||||||||||
| } | ||||||||||
| if (this.IsParameterBound(c => c.PolicyPath)) | ||||||||||
| { | ||||||||||
| if (!File.Exists(PolicyPath)) | ||||||||||
|
Comment on lines
+179
to
+181
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
NIT |
||||||||||
| { | ||||||||||
| throw new AzPSArgumentException(string.Format(Resources.FileNotFound, this.PolicyPath), nameof(PolicyPath)); | ||||||||||
| } | ||||||||||
| } | ||||||||||
| } | ||||||||||
|
|
||||||||||
| public override void ExecuteCmdlet() | ||||||||||
|
|
@@ -153,16 +221,27 @@ public override void ExecuteCmdlet() | |||||||||
| ValidateParameters(); | ||||||||||
|
BethanyZhou marked this conversation as resolved.
|
||||||||||
|
|
||||||||||
| PSKeyVaultCertificate certBundle = null; | ||||||||||
| PSKeyVaultCertificatePolicy policy = null; | ||||||||||
| if (!string.IsNullOrEmpty(PolicyPath)) | ||||||||||
|
BethanyZhou marked this conversation as resolved.
Outdated
|
||||||||||
| { | ||||||||||
| policy = PSKeyVaultCertificatePolicy.FromJsonFile(PolicyPath); | ||||||||||
|
BethanyZhou marked this conversation as resolved.
Outdated
|
||||||||||
| } | ||||||||||
| else if ( Policy != null) | ||||||||||
| { | ||||||||||
| policy = Policy; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| switch (ParameterSetName) | ||||||||||
| { | ||||||||||
| case ImportCertificateFromFileParameterSet: | ||||||||||
| case ImportCertificateFromFileWithPolicyParameterSet: | ||||||||||
| case ImportCertificateFromFileWithPolicyFileParameterSet: | ||||||||||
|
|
||||||||||
| // Pem file can't be handled by X509Certificate2Collection in dotnet standard | ||||||||||
| // Just read it as raw data and pass it to service side | ||||||||||
| if (IsPemFile(FilePath)) | ||||||||||
| { | ||||||||||
| byte[] pemBytes = File.ReadAllBytes(FilePath); | ||||||||||
| certBundle = this.Track2DataClient.ImportCertificate(VaultName, Name, pemBytes, Password, Tag?.ConvertToDictionary(), Constants.PemContentType); | ||||||||||
| certBundle = this.Track2DataClient.ImportCertificate(VaultName, Name, pemBytes, Password, Tag?.ConvertToDictionary(), Constants.PemContentType, certPolicy: policy); | ||||||||||
| } | ||||||||||
| else | ||||||||||
| { | ||||||||||
|
|
@@ -179,8 +258,9 @@ public override void ExecuteCmdlet() | |||||||||
|
|
||||||||||
| if (doImport) | ||||||||||
| { | ||||||||||
|
|
||||||||||
| byte[] base64Bytes = userProvidedCertColl.Export(X509ContentType.Pfx, Password?.ConvertToString()); | ||||||||||
| certBundle = this.Track2DataClient.ImportCertificate(VaultName, Name, base64Bytes, Password, Tag?.ConvertToDictionary()); | ||||||||||
| certBundle = this.Track2DataClient.ImportCertificate(VaultName, Name, base64Bytes, Password, Tag?.ConvertToDictionary(), certPolicy:policy); | ||||||||||
| } | ||||||||||
| else | ||||||||||
| { | ||||||||||
|
|
@@ -193,13 +273,15 @@ public override void ExecuteCmdlet() | |||||||||
| } | ||||||||||
| break; | ||||||||||
|
|
||||||||||
| case ImportWithPrivateKeyFromCollectionParameterSet: | ||||||||||
| certBundle = this.DataServiceClient.ImportCertificate(VaultName, Name, CertificateCollection, Tag?.ConvertToDictionary()); | ||||||||||
| case ImportWithPrivateKeyFromCollectionWithPolicyParameterSet: | ||||||||||
| case ImportWithPrivateKeyFromCollectionWithPolicyFileParameterSet: | ||||||||||
| certBundle = this.Track2DataClient.ImportCertificate(VaultName, Name, CertificateCollection, Password, Tag?.ConvertToDictionary(), certPolicy: policy); | ||||||||||
|
BethanyZhou marked this conversation as resolved.
Outdated
|
||||||||||
|
|
||||||||||
| break; | ||||||||||
|
|
||||||||||
| case ImportWithPrivateKeyFromStringParameterSet: | ||||||||||
| certBundle = this.Track2DataClient.ImportCertificate(VaultName, Name, CertificateString, Password, Tag?.ConvertToDictionary(), ContentType); | ||||||||||
| case ImportWithPrivateKeyFromStringWithPolicyParameterSet: | ||||||||||
| case ImportWithPrivateKeyFromStringWithPolicyFileParameterSet: | ||||||||||
| certBundle = this.Track2DataClient.ImportCertificate(VaultName, Name, CertificateString, Password, Tag?.ConvertToDictionary(), ContentType, certPolicy: policy); | ||||||||||
|
|
||||||||||
| break; | ||||||||||
| } | ||||||||||
|
|
||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.