Skip to content
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

Add Auth MonitorConnections chain elements #1317

Conversation

anastasia-malysheva
Copy link
Contributor

@anastasia-malysheva anastasia-malysheva commented Jul 5, 2022

Description

Add Authorization Chain element for MonitorConnection {Client/Server}.

  • Add next MonitorConnections elements
  • Add auth MonitorConnections elements
  • Add usage of new MonitorConnections elements to the existing ones
  • Add Policies for authorizations

Issue link

#46

How Has This Been Tested?

  • Added unit testing to cover
  • Tested manually
  • Tested by integration testing
  • Have not tested

Types of changes

  • Bug fix
  • New functionallity
  • Documentation
  • Refactoring
  • CI

@denis-tingaikin denis-tingaikin marked this pull request as draft July 6, 2022 09:31
@anastasia-malysheva anastasia-malysheva marked this pull request as ready for review July 15, 2022 09:13
@anastasia-malysheva anastasia-malysheva changed the title Draft: Add Auth MonitorConnections chain elements Add Auth MonitorConnections chain elements Jul 15, 2022
Copy link
Member

@denis-tingaikin denis-tingaikin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Started looking into this PR. Added a few comments, I'll look deeper a bit later.

@@ -1,4 +1,4 @@
// Copyright (c) 2020 Cisco and/or its affiliates.
// Copyright (c) 2020-2022 Cisco and/or its affiliates.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Comment on lines 67 to 68
mClient := next.NewMonitorConnectionClient(networkservice.NewMonitorConnectionClient(cc))
client, err := mClient.MonitorConnections(eventLoopCtx, selector)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need these changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@@ -51,7 +53,8 @@ func newEventLoop(ctx context.Context, ec EventConsumer, cc grpc.ClientConnInter
},
}

client, err := networkservice.NewMonitorConnectionClient(cc).MonitorConnections(eventLoopCtx, selector)
client, err := next.NewMonitorConnectionClient(
networkservice.NewMonitorConnectionClient(cc)).MonitorConnections(eventLoopCtx, selector)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need these changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@@ -41,6 +41,7 @@ import (
"github.com/networkservicemesh/sdk/pkg/networkservice/common/updatetoken"
"github.com/networkservicemesh/sdk/pkg/networkservice/core/chain"
"github.com/networkservicemesh/sdk/pkg/tools/grpcutils"
authMonitor "github.com/networkservicemesh/sdk/pkg/tools/monitor/authorize"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use lowercase package naming to follow effective go conventions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -58,6 +58,7 @@ import (
registryadapter "github.com/networkservicemesh/sdk/pkg/registry/core/adapters"
"github.com/networkservicemesh/sdk/pkg/registry/core/chain"
"github.com/networkservicemesh/sdk/pkg/tools/grpcutils"
authMonitor "github.com/networkservicemesh/sdk/pkg/tools/monitor/authorize"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use lowercase package naming to follow effective go conventions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -75,6 +76,7 @@ type nsmgrServer struct {

type serverOptions struct {
authorizeServer networkservice.NetworkServiceServer
authMonitorOptions []authMonitor.Option
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do the same as we do for auth networkservice.NetworkServiceServer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

}
if _, ok := peer.FromContext(ctx); ok {
if err := a.policies.check(ctx, leftSide); err != nil {
return nil, err
}
}
if spiffeID, err := getSpiffeID(ctx); err == nil {
ids, _ := a.spiffeIDConnectionMap.Load(spiffeID)
a.spiffeIDConnectionMap.LoadOrStore(spiffeID, append(ids, conn.GetId()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have refreshes. For each refresh, the same connection ID ​​will be added to this list.
We need to either check this list or use an internal map (instead of list).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added nested map. Please take a look.

for i := range suits {
s := suits[i]
t.Run(s.name, func(t *testing.T) {
srv := authorize.NewServer(authorize.WithPolicies(s.policy))
srv := authorize.NewServer(authorize.WithSpiffeIDConnectionMap(&spiffeIDConnectionMap), authorize.WithPolicies(s.policy))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

func TestMonitorServer(t *testing.T) {
t.Cleanup(func() { goleak.VerifyNone(t) })

ctx, cancel := context.WithTimeout(context.Background(), time.Second)
// Put peer Certificate to context
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need these changes? We don't use authorize monitor here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@@ -0,0 +1,92 @@
// Copyright (c) 2022 Doc.ai and/or its affiliates.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Cisco for new added files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Member

@denis-tingaikin denis-tingaikin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conceptually looks correct

chainCtx context.Context
chainCtx context.Context
filters map[string]*monitorFilter
executor *serialize.Executor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
executor *serialize.Executor
executor serialize.Executor

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

executor := serialize.Executor{}
connections := make(map[string]*networkservice.Connection)

*monitorServerPtr = newMonitorConnectionServer(chainCtx, &executor, filters, connections)
return &monitorServer{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return &monitorServer{
var rv = &monitorServer{

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment on lines 57 to 61
filters := make(map[string]*monitorFilter)
executor := serialize.Executor{}
connections := make(map[string]*networkservice.Connection)

*monitorServerPtr = newMonitorConnectionServer(chainCtx, &executor, filters, connections)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
filters := make(map[string]*monitorFilter)
executor := serialize.Executor{}
connections := make(map[string]*networkservice.Connection)
*monitorServerPtr = newMonitorConnectionServer(chainCtx, &executor, filters, connections)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

executor := serialize.Executor{}
connections := make(map[string]*networkservice.Connection)

*monitorServerPtr = newMonitorConnectionServer(chainCtx, &executor, filters, connections)
return &monitorServer{
chainCtx: chainCtx,
MonitorConnectionServer: *monitorServerPtr,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
MonitorConnectionServer: *monitorServerPtr,
rv.MonitorConnectionServer = newMonitorConnectionServer(rv.chainCtx, &rv.executor, rv.filters, rv.connections),

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

ids.Delete(connID)
}
}
a.spiffeIDConnectionMap.Store(spiffeID, ids)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we clear this map?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -0,0 +1,106 @@
// Copyright (c) 2022 Cisco and/or its affiliates.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a next client for this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, we don't need it. I removed all the changes regarding next monitorConnectionClient

@@ -55,7 +54,8 @@ func pemEncodingX509Cert(cert *x509.Certificate) string {
return string(certpem)
}

func parseX509Cert(authInfo credentials.AuthInfo) *x509.Certificate {
// ParseX509Cert - parse authinfo to get peer sertificate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// ParseX509Cert - parse authinfo to get peer sertificate
// ParseX509Cert parses x509 certificate from the passed credentials.AuthInfo

Comment on lines 84 to 90
func WithServiceOwnConnectionPolicy() *AuthorizationPolicy {
return &AuthorizationPolicy{
policySource: tokensServiceConnectionPolicySource,
query: "service_connection",
checker: True("service_connection"),
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need consider a better name to clarify a fact that the policy should be used only and only with monitors.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@denis-tingaikin How about WithMonitorServerOwnConnectionPolicy ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WithMonitorConnectionServerPolicy

"github.com/networkservicemesh/sdk/pkg/tools/opa"
)

func TestWithServiceConnectionPolicy(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we please add a test for a negatvie scenario?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

//go:generate go-syncmap -output connection_map.gen.go -type ConnectionMap<string,bool>

// ConnectionMap - sync.Map with key == string and value == bool
type ConnectionMap sync.Map
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not looking as a connection map/

I think it is a simple string set.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed

@@ -22,24 +22,31 @@ import (
"github.com/edwarnicke/serialize"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In current solution we actually dont need changes in network service/monitor pkg. Please revert pkg/networkservice/monitor changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -23,6 +23,7 @@ package monitor
import (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In current solution we actually dont need changes in network service/monitor pkg. Please revert pkg/networkservice/monitor changes.

@@ -0,0 +1,44 @@
// Copyright (c) 2022 Cisco and/or its affiliates.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we rename pkg tools/monitor into tools/monitorconnection?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I think this name is better, renamed

Comment on lines 118 to 133
func getSpiffeID(ctx context.Context) (string, error) {
p, ok := peer.FromContext(ctx)
var cert *x509.Certificate
if !ok {
return "", errors.New("fail to get peer from context")
}
cert = opa.ParseX509Cert(p.AuthInfo)
if cert != nil {
spiffeID, err := x509svid.IDFromCert(cert)
if err == nil {
return spiffeID.String(), nil
}
return "", errors.New("fail to get Spiffe ID from certificate")
}
return "", errors.New("fail to get certificate from peer")
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should move this into tools/spire

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

if _, ok := peer.FromContext(ctx); ok {
if err := a.policies.check(ctx, leftSide); err != nil {
return nil, err
}
}
return next.Server(ctx).Close(ctx, conn)
}

func getSpiffeID(ctx context.Context) (string, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func getSpiffeID(ctx context.Context) (string, error) {
func SpiffeIDFromContext(ctx context.Context) (string, error) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -55,7 +54,8 @@ func pemEncodingX509Cert(cert *x509.Certificate) string {
return string(certpem)
}

func parseX509Cert(authInfo credentials.AuthInfo) *x509.Certificate {
// ParseX509Cert - parses x509 certificate from the passed credentials.AuthInfo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// ParseX509Cert - parses x509 certificate from the passed credentials.AuthInfo
// ParseX509Cert - parses x509 certificate from the passed credentials.AuthInfo

//go:generate go-syncmap -output connection_id_set.gen.go -type ConnectionIDSet<string,bool>

// ConnectionIDSet - sync.Map with key == string and value == bool
type ConnectionIDSet sync.Map
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to store this in tools/spire?

Can we move this into tools/stringset?

Also please use zero value type struct{}.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

anastasia-malysheva and others added 11 commits July 27, 2022 18:26
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
…hain element to Monitor element.

Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
…orize elements

Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
…auth and next monitor chain elements, fix policy. Add unit tests for new servers.

Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
 

Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
 

Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
…orkservicemesh#1315)

* apply vl3dns fixes

Signed-off-by: Denis Tingaikin <denis.tingajkin@xored.com>

* fix linter issues

Signed-off-by: denis-tingaikin <denis.tingajkin@xored.com>

* handle corner cases

Signed-off-by: Denis Tingaikin <denis.tingajkin@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
…nt (networkservicemesh#1318)

* remove duplicate dns configs in response

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* delete metadata + add removeDuplicates before request

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* check intersections + add removeDuplicates test

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add dns configs check on dnsContextServer

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix ci

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix Test_DNSContextClient_Usecases

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* rework dns configs check in dnsContextServer

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix Test_DNSUsecase

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
* set os.ModePerm for unix sockets

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix TestListenAndServe_NotExistsFolder

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* apply review comments

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
glazychev-art and others added 26 commits July 27, 2022 18:27
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: Denis Tingaikin <denis.tingajkin@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
…to AuthorizeServer

Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
* add logs

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* rework fanout + cleanup

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add resolvconf chain element

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix sync.Map

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* search chain element implemented (probably

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* update dnsContextClient

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add cache chain element + rework dnsconfigs chain element

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* delete dnscontext

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add cache chain element

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix dnsconfigs and fanout chain elements

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix resolvconf chain elements

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* finish search chain element

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* minor fixes

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix cache unit test

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* rework wrappers

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* delete dnscontext folder

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* rework search chain element

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add test for resolvconf

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* minor fixes

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* run go mod tidy

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix tests

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* delete Test_DNSUsecase

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* rework unit tests

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* use dns memory chain element for unit tests

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix Test_vl3NSE_ConnectsTo_vl3NSE

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add sandbox test for dns server

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix dns server test

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* restore resolv_conf_tests

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add port check

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* run all tests

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* debug dns sandbox test

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix dns sandbox test

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* minor fixes

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* move dns sandbox test to separate file

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* rework resolvconf chain element

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* restore question section in response

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix search domains fix

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* minor refactoring in search chain element

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* delete logging

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* resolve comments

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix ci

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* minor refactoring

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* minor fixes after rebase

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* delete resolvconfDNSHandler

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix Test_DNSContextClient_Usecases

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* merge all search domains only on the first dns request

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* move resolvconf parser to dnsContextClient and make it private

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add checkmsg chain element

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* move dnsconfigs.Map to a separate folder

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* minor fixes after rebase

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix Test_vl3NSE_ConnectsTo_vl3NSE

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add logs to Test_vl3NSE_ConnectsTo_vl3NSE

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* minor fixes after rebase (again)

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix Test_DNSContextClient_Usecases

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* debug Test_vl3NSE_ConnectsTo_vl3NSE

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add option with dns port for fanout + delete defaultTimeout

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* make dns cache map private

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* rename clienturlctx context functions

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add initialization of lastTTLUpdate variable in cache chain element

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* return single value slice in ClientURLs func if we have signle clientURL in context

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* restore DNSConfigs Decoder

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* delete sync.Once from dnsconfigs handler

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* change name and description of the WithDNSPort option

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* delete debug logging

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
* Add replaceNSEName chain element

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>

* Create passthrough chain element

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
…1329)

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
…date tests"

This reverts commit 011714f.

Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
* dns: use upd instead of tcp

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>

* Add tcp

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>

* Fix cache chain element

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
@anastasia-malysheva anastasia-malysheva force-pushed the add-auth-monitor-element branch from 49fc676 to 8bf6e12 Compare July 27, 2022 11:37
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
@denis-tingaikin
Copy link
Member

This is a bit reworked and merged in #1333

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants