Skip to content

Commit

Permalink
Remove character check for Azure
Browse files Browse the repository at this point in the history
Signed-off-by: Keegan Witt <keeganwitt@gmail.com>
  • Loading branch information
keeganwitt committed Dec 16, 2023
1 parent 9be5ede commit 45b2cb1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
5 changes: 0 additions & 5 deletions pkg/server/plugin/keymanager/azurekeyvault/azure_key_vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"math/big"
"net/http"
"os"
"regexp"
"strings"
"sync"
"time"
Expand Down Expand Up @@ -699,10 +698,6 @@ func parseAndValidateConfig(c string) (*Config, error) {
}

if config.KeyIdentifierValue != "" {
re := regexp.MustCompile(".*[^A-z0-9/_-].*")
if re.MatchString(config.KeyIdentifierValue) {
return nil, status.Error(codes.InvalidArgument, "Key identifier must contain only alphanumeric characters, forward slashes (/), underscores (_), and dashes (-)")
}
if len(config.KeyIdentifierValue) > 256 {
return nil, status.Error(codes.InvalidArgument, "Key identifier must not be longer than 256 characters")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,6 @@ func TestConfigure(t *testing.T) {
err: "configuration must not contain both 'key_identifier_file' and deprecated 'key_metadata_file'",
code: codes.InvalidArgument,
},
{
name: "key metadata value invalid character",
configureRequest: configureRequestWithVars(KeyIdentifierValue, "@key_identifier_value@", validKeyVaultURI, validTenantID, validSubscriptionID, validAppID, validAppSecret, "false"),
err: "Key identifier must contain only alphanumeric characters, forward slashes (/), underscores (_), and dashes (-)",
code: codes.InvalidArgument,
},
{
name: "key metadata value too long",
configureRequest: configureRequestWithVars(KeyIdentifierValue, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", validKeyVaultURI, validTenantID, validSubscriptionID, validAppID, validAppSecret, "false"),
Expand Down

0 comments on commit 45b2cb1

Please sign in to comment.