diff --git a/config/sample_xconfwebconfig.conf b/config/sample_xconfwebconfig.conf index 7bac9491..5cc3d9a4 100644 --- a/config/sample_xconfwebconfig.conf +++ b/config/sample_xconfwebconfig.conf @@ -86,6 +86,17 @@ xconfwebconfig { concurrent_queries = 5 connections = 5 local_dc = "" + port = 9042 + + //Config to create database client to AWS Keyspace using IAM temporary credentials + aws_keyspace_enabled = false + role_based_access_enabled = false + aws_region = "" + aws_keyspace_ca_path = "path_to_file/sf-class2-root.crt" + + //If role_based_access_enabled is true, access_key_id and secret_access_key will be fetched using IAM temporary credentials + access_key_id = "" + secret_access_key = "" } misc { diff --git a/db/aws_keyspace.go b/db/aws_keyspace.go new file mode 100644 index 00000000..ce71d972 --- /dev/null +++ b/db/aws_keyspace.go @@ -0,0 +1,127 @@ +package db + +import ( + "fmt" + "os" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sigv4-auth-cassandra-gocql-driver-plugin/sigv4" + "github.com/go-akka/configuration" + "github.com/gocql/gocql" + log "github.com/sirupsen/logrus" +) + +func awsKeyspaceClient(conf *configuration.Config, testOnly bool) (*CassandraClient, error) { + // init + hosts := conf.GetStringList("xconfwebconfig.database.hosts") + cluster := gocql.NewCluster(hosts...) + + cluster.Consistency = gocql.LocalQuorum + cluster.ProtoVersion = int(conf.GetInt32("xconfwebconfig.database.protocolversion", ProtocolVersion)) + cluster.DisableInitialHostLookup = DisableInitialHostLookup + cluster.Timeout = time.Duration(conf.GetInt32("xconfwebconfig.database.timeout_in_sec", 1)) * time.Second + cluster.ConnectTimeout = time.Duration(conf.GetInt32("xconfwebconfig.database.connect_timeout_in_sec", 1)) * time.Second + cluster.NumConns = int(conf.GetInt32("xconfwebconfig.database.connections", DefaultConnections)) + cluster.Port = int(conf.GetInt64("xconfwebconfig.database.port", DefaultPort)) + + cluster.RetryPolicy = &gocql.DowngradingConsistencyRetryPolicy{ + []gocql.Consistency{ + gocql.LocalQuorum, + gocql.LocalOne, + gocql.One, + }, + } + + localDc := conf.GetString("xconfwebconfig.database.local_dc") + if len(localDc) > 0 { + cluster.PoolConfig.HostSelectionPolicy = gocql.DCAwareRoundRobinPolicy(localDc) + } + + awsRegion, err := getAwsRegionForCassandra(conf) + if err != nil { + log.Error(err.Error()) + return nil, err + } + + var auth sigv4.AwsAuthenticator = sigv4.NewAwsAuthenticator() + auth.Region = awsRegion + + isRoleBasedAccessEnabled := conf.GetBoolean("xconfwebconfig.database.role_based_access_enabled") + if isRoleBasedAccessEnabled { + sess, err := session.NewSession(&aws.Config{ + Region: aws.String(awsRegion)}, + ) + if err != nil { + log.Error(err.Error()) + return nil, err + } + + // Set up the callback to refresh credentials + auth.CredentialsCallback = func() (sigv4.SigV4Credentials, error) { + creds, err := sess.Config.Credentials.Get() + if err != nil { + return sigv4.SigV4Credentials{}, err + } + + return sigv4.SigV4Credentials{ + AccessKeyId: creds.AccessKeyID, + SecretAccessKey: creds.SecretAccessKey, + SessionToken: creds.SessionToken, + }, nil + } + } else { + auth.AccessKeyId = conf.GetString("xconfwebconfig.database.access_key_id") + auth.SecretAccessKey = conf.GetString("xconfwebconfig.database.secret_access_key") + } + cluster.Authenticator = auth + + awsKeySpaceCaPath := conf.GetString("xconfwebconfig.database.aws_keyspace_ca_path") + cluster.SslOpts = &gocql.SslOptions{ + CaPath: awsKeySpaceCaPath, + EnableHostVerification: false, + } + + // Use the appropriate keyspace + var deviceKeyspace string + if testOnly { + cluster.Keyspace = conf.GetString("xconfwebconfig.database.test_keyspace", DefaultTestKeyspace) + deviceKeyspace = conf.GetString("webconfig.database.device_test_keyspace", DefaultDeviceTestKeyspace) + } else { + cluster.Keyspace = conf.GetString("xconfwebconfig.database.keyspace", DefaultKeyspace) + deviceKeyspace = conf.GetString("webconfig.database.device_keyspace", DefaultDeviceKeyspace) + } + log.Debug(fmt.Sprintf("Init CassandraClient with keyspace: %v", cluster.Keyspace)) + + session, err := cluster.CreateSession() + if err != nil { + return nil, err + } + + devicePodTableName := conf.GetString("webconfig.database.device_pod_table_name", DefaultDevicePodTableName) + + return &CassandraClient{ + Session: session, + ClusterConfig: cluster, + sleepTime: conf.GetInt32("xconfwebconfig.perftest.sleep_in_msecs", DefaultSleepTimeInMillisecond), + concurrentQueries: make(chan bool, conf.GetInt32("xconfwebconfig.database.concurrent_queries", 500)), + localDc: localDc, + deviceKeyspace: deviceKeyspace, + devicePodTableName: devicePodTableName, + testOnly: testOnly, + }, nil +} + +func getAwsRegionForCassandra(conf *configuration.Config) (string, error) { + awsRegion := conf.GetString("xconfwebconfig.database.aws_region") + if len(awsRegion) == 0 { + awsRegion = os.Getenv("AWS_REGION") + } + + if len(awsRegion) == 0 { + return "", fmt.Errorf("%s", "Aws region is not provided") + } + + return awsRegion, nil +} diff --git a/db/cassandra.go b/db/cassandra.go new file mode 100644 index 00000000..3ff5ea97 --- /dev/null +++ b/db/cassandra.go @@ -0,0 +1,95 @@ +package db + +import ( + "fmt" + "time" + "xconfwebconfig/security" + + "github.com/go-akka/configuration" + "github.com/gocql/gocql" + log "github.com/sirupsen/logrus" +) + +func cassandraClient(conf *configuration.Config, testOnly bool) (*CassandraClient, error) { + // init + hosts := conf.GetStringList("xconfwebconfig.database.hosts") + cluster := gocql.NewCluster(hosts...) + + cluster.Consistency = gocql.LocalQuorum + cluster.ProtoVersion = int(conf.GetInt32("xconfwebconfig.database.protocolversion", ProtocolVersion)) + cluster.DisableInitialHostLookup = DisableInitialHostLookup + cluster.Timeout = time.Duration(conf.GetInt32("xconfwebconfig.database.timeout_in_sec", 1)) * time.Second + cluster.ConnectTimeout = time.Duration(conf.GetInt32("xconfwebconfig.database.connect_timeout_in_sec", 1)) * time.Second + cluster.NumConns = int(conf.GetInt32("xconfwebconfig.database.connections", DefaultConnections)) + + cluster.RetryPolicy = &gocql.DowngradingConsistencyRetryPolicy{ + []gocql.Consistency{ + gocql.LocalQuorum, + gocql.LocalOne, + gocql.One, + }, + } + + localDc := conf.GetString("xconfwebconfig.database.local_dc") + if len(localDc) > 0 { + cluster.PoolConfig.HostSelectionPolicy = gocql.DCAwareRoundRobinPolicy(localDc) + } + + isSslEnabled := conf.GetBoolean("xconfwebconfig.database.is_ssl_enabled") + + var password string + var err error + + encryptedPassword := conf.GetString("xconfwebconfig.database.encrypted_password") + if encryptedPassword != "" { + codec := security.NewAesCodec() + password, err = codec.Decrypt(encryptedPassword) + if err != nil { + log.Error(err.Error()) + return nil, err + } + } else { + password = conf.GetString("xconfwebconfig.database.password") + } + + user := conf.GetString("xconfwebconfig.database.user") + cluster.Authenticator = gocql.PasswordAuthenticator{ + Username: user, + Password: password, + } + + if isSslEnabled { + cluster.SslOpts = &gocql.SslOptions{ + EnableHostVerification: false, + } + } + + // Use the appropriate keyspace + var deviceKeyspace string + if testOnly { + cluster.Keyspace = conf.GetString("xconfwebconfig.database.test_keyspace", DefaultTestKeyspace) + deviceKeyspace = conf.GetString("webconfig.database.device_test_keyspace", DefaultDeviceTestKeyspace) + } else { + cluster.Keyspace = conf.GetString("xconfwebconfig.database.keyspace", DefaultKeyspace) + deviceKeyspace = conf.GetString("webconfig.database.device_keyspace", DefaultDeviceKeyspace) + } + log.Debug(fmt.Sprintf("Init CassandraClient with keyspace: %v", cluster.Keyspace)) + + session, err := cluster.CreateSession() + if err != nil { + return nil, err + } + + devicePodTableName := conf.GetString("webconfig.database.device_pod_table_name", DefaultDevicePodTableName) + + return &CassandraClient{ + Session: session, + ClusterConfig: cluster, + sleepTime: conf.GetInt32("xconfwebconfig.perftest.sleep_in_msecs", DefaultSleepTimeInMillisecond), + concurrentQueries: make(chan bool, conf.GetInt32("xconfwebconfig.database.concurrent_queries", 500)), + localDc: localDc, + deviceKeyspace: deviceKeyspace, + devicePodTableName: devicePodTableName, + testOnly: testOnly, + }, nil +} diff --git a/db/cassandra_client.go b/db/cassandra_client.go index 69670b09..cc2fe752 100644 --- a/db/cassandra_client.go +++ b/db/cassandra_client.go @@ -27,7 +27,6 @@ import ( "github.com/go-akka/configuration" "github.com/gocql/gocql" - "xconfwebconfig/security" "xconfwebconfig/util" log "github.com/sirupsen/logrus" @@ -48,6 +47,7 @@ const ( DefaultColumnValue = "data" NamedListPartColumnValue = "NamedListData_part_" NamedListCountColumnValue = "NamedListData_parts_count" + DefaultPort = 9042 ) type CassandraClient struct { @@ -76,90 +76,12 @@ type PenetrationMetrics struct { } func NewCassandraClient(conf *configuration.Config, testOnly bool) (*CassandraClient, error) { - // init - hosts := conf.GetStringList("xconfwebconfig.database.hosts") - cluster := gocql.NewCluster(hosts...) - - cluster.Consistency = gocql.LocalQuorum - cluster.ProtoVersion = int(conf.GetInt32("xconfwebconfig.database.protocolversion", ProtocolVersion)) - cluster.DisableInitialHostLookup = DisableInitialHostLookup - cluster.Timeout = time.Duration(conf.GetInt32("xconfwebconfig.database.timeout_in_sec", 1)) * time.Second - cluster.ConnectTimeout = time.Duration(conf.GetInt32("xconfwebconfig.database.connect_timeout_in_sec", 1)) * time.Second - cluster.NumConns = int(conf.GetInt32("xconfwebconfig.database.connections", DefaultConnections)) - - cluster.RetryPolicy = &gocql.DowngradingConsistencyRetryPolicy{ - []gocql.Consistency{ - gocql.LocalQuorum, - gocql.LocalOne, - gocql.One, - }, - } - - localDc := conf.GetString("xconfwebconfig.database.local_dc") - if len(localDc) > 0 { - cluster.PoolConfig.HostSelectionPolicy = gocql.DCAwareRoundRobinPolicy(localDc) - } - - user := conf.GetString("xconfwebconfig.database.user") - encryptedPassword := conf.GetString("xconfwebconfig.database.encrypted_password") - isSslEnabled := conf.GetBoolean("xconfwebconfig.database.is_ssl_enabled") - - //build codec - codec := security.NewAesCodec() - - var password string - var err error - - if encryptedPassword != "" { - password, err = codec.Decrypt(encryptedPassword) - if err != nil { - log.Error(err.Error()) - return nil, err - } - } else { - password = conf.GetString("xconfwebconfig.database.password") - } - - cluster.Authenticator = gocql.PasswordAuthenticator{ - Username: user, - Password: password, - } - - if isSslEnabled { - sslOpts := &gocql.SslOptions{ - EnableHostVerification: false, - } - cluster.SslOpts = sslOpts - } - - // Use the appropriate keyspace - var deviceKeyspace string - if testOnly { - cluster.Keyspace = conf.GetString("xconfwebconfig.database.test_keyspace", DefaultTestKeyspace) - deviceKeyspace = conf.GetString("webconfig.database.device_test_keyspace", DefaultDeviceTestKeyspace) + isAwsKeyspaceEnabled := conf.GetBoolean("xconfwebconfig.database.aws_keyspace_enabled") + if isAwsKeyspaceEnabled { + return awsKeyspaceClient(conf, testOnly) } else { - cluster.Keyspace = conf.GetString("xconfwebconfig.database.keyspace", DefaultKeyspace) - deviceKeyspace = conf.GetString("webconfig.database.device_keyspace", DefaultDeviceKeyspace) + return cassandraClient(conf, testOnly) } - log.Debug(fmt.Sprintf("Init CassandraClient with keyspace: %v", cluster.Keyspace)) - - session, err := cluster.CreateSession() - if err != nil { - return nil, err - } - - devicePodTableName := conf.GetString("webconfig.database.device_pod_table_name", DefaultDevicePodTableName) - - return &CassandraClient{ - Session: session, - ClusterConfig: cluster, - sleepTime: conf.GetInt32("xconfwebconfig.perftest.sleep_in_msecs", DefaultSleepTimeInMillisecond), - concurrentQueries: make(chan bool, conf.GetInt32("xconfwebconfig.database.concurrent_queries", 500)), - localDc: localDc, - deviceKeyspace: deviceKeyspace, - devicePodTableName: devicePodTableName, - testOnly: testOnly, - }, nil } // Cassandra Impl of DatabaseClient diff --git a/go.mod b/go.mod index 12b481c5..2bede082 100644 --- a/go.mod +++ b/go.mod @@ -23,12 +23,13 @@ require ( github.com/Comcast/goburrow-cache v1.0.2 github.com/aead/siphash v1.0.1 github.com/agrison/go-commons-lang v0.0.0-20200208220349-58e9fcb95174 + github.com/aws/aws-sdk-go v1.49.12 + github.com/aws/aws-sigv4-auth-cassandra-gocql-driver-plugin v1.1.0 github.com/btcsuite/btcutil v1.0.2 github.com/carlescere/scheduler v0.0.0-20170109141437-ee74d2f83d82 github.com/go-akka/configuration v0.0.0-20200606091224-a002c0330665 github.com/gocql/gocql v0.0.0-20210129204804-4364a4b9cfdd github.com/golang/snappy v0.0.3 - github.com/google/go-cmp v0.5.2 github.com/google/uuid v1.1.1 github.com/gorilla/mux v1.7.0 github.com/mitchellh/copystructure v1.2.0 @@ -36,15 +37,16 @@ require ( github.com/sirupsen/logrus v1.8.1 github.com/xeipuuv/gojsonschema v1.2.0 github.com/zenazn/pkcs7pad v0.0.0-20170308005700-253a5b1f0e03 - golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 - google.golang.org/protobuf v1.23.0 + golang.org/x/crypto v0.14.0 gotest.tools v2.2.0+incompatible ) require ( github.com/beorn7/perks v1.0.0 // indirect github.com/golang/protobuf v1.4.0 // indirect + github.com/google/go-cmp v0.5.2 // indirect github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/kr/pretty v0.2.0 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect @@ -52,11 +54,9 @@ require ( github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 // indirect github.com/prometheus/common v0.4.1 // indirect github.com/prometheus/procfs v0.0.2 // indirect - github.com/stretchr/testify v1.6.1 // indirect - github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect - github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect + golang.org/x/sys v0.13.0 // indirect + google.golang.org/protobuf v1.23.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect ) diff --git a/go.sum b/go.sum index 8056b54d..c705dc1a 100644 --- a/go.sum +++ b/go.sum @@ -6,6 +6,10 @@ github.com/agrison/go-commons-lang v0.0.0-20200208220349-58e9fcb95174 h1:ExNQbrN github.com/agrison/go-commons-lang v0.0.0-20200208220349-58e9fcb95174/go.mod h1:u+Zwm0OKtJAGx+DXcmp2NNwZ0GKtV80ipbF/uhKhQdw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/aws/aws-sdk-go v1.49.12 h1:SbGHDdMjtuTL8zpRXKjvIvQHLt9cCqcxcHoJps23WxI= +github.com/aws/aws-sdk-go v1.49.12/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sigv4-auth-cassandra-gocql-driver-plugin v1.1.0 h1:EJsHUYgFBV7/N1YtL73lsfZODAOU+CnNSZfEAlqqQaA= +github.com/aws/aws-sigv4-auth-cassandra-gocql-driver-plugin v1.1.0/go.mod h1:AxKuXHc0zv2yYaeueUG7R3ONbcnQIuDj0bkdFmPVRzU= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -35,6 +39,7 @@ github.com/go-akka/configuration v0.0.0-20200606091224-a002c0330665/go.mod h1:19 github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gocql/gocql v0.0.0-20200624222514-34081eda590e/go.mod h1:DL0ekTmBSTdlNF25Orwt/JMzqIq3EJ4MVa/J/uK64OY= github.com/gocql/gocql v0.0.0-20210129204804-4364a4b9cfdd h1:j0VZcDIpU6sLBMNFUEvuwP4FdmEXbmaEq6qufApwbbo= github.com/gocql/gocql v0.0.0-20210129204804-4364a4b9cfdd/go.mod h1:DL0ekTmBSTdlNF25Orwt/JMzqIq3EJ4MVa/J/uK64OY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -62,6 +67,10 @@ github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= @@ -113,34 +122,74 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zenazn/pkcs7pad v0.0.0-20170308005700-253a5b1f0e03 h1:m1h+vudopHsI67FPT9MOncyndWhTcdUoBtI1R1uajGY= github.com/zenazn/pkcs7pad v0.0.0-20170308005700-253a5b1f0e03/go.mod h1:8sheVFH84v3PCyFY/O02mIgSQY9I6wMYPWsq7mDnEZY= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -157,13 +206,9 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=