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

Transfer registry path via gRPC metadata #1366

Merged
merged 55 commits into from
Nov 29, 2022

Conversation

NikitaSkrynnik
Copy link
Contributor

@NikitaSkrynnik NikitaSkrynnik commented Oct 12, 2022

Description

The main idea: We add Path for registry to check it in Registry Authorization chain elements. The logic of path is the same as in networkservice.

Added chain elements:

  1. grpcmetadata - Transfers registry path via gRPC metadata. Contains Path data structure and methods that get and put path to context.
  2. updatepath - Constructs private path during registration of NS or NSE in registry. Uses context methods from grpcmetadata package.
  3. updatetoken - Adds and updates tokens and expiration time for path segments. Also adds tokens to path_ids field in NetworkService and NetworkServiceEndpoint messages.
  4. Authorize client chain elements - chain elements that check registry path using policies on response from registry.

Other changes:

  • Added new policy that checks path_ids of NS and NSE messages.
  • Reworked some registry unit tests that used raw connections to registry. Now they use Registry Client to connect to registry.
  • All chain elements that are necessary for registry path were added to all registry components (nsmgr, proxy-dns, nsmgr-proxy, registry-client, registry-memory)
  • Reworked sandbox test token generation functions. It was necessary for updatetoken chain element.

Issue link

#1367

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
Copy link
Member

@NikitaSkrynnik Could you rebase this one?

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
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.

Please fix the remaining comments and they can be merged.

@glazychev-art Do you have any other comments?

)

type updatePathNSEServer struct {
name string
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
name string

return nil, err
}

name := s.name
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
name := s.name

Copy link
Member

Choose a reason for hiding this comment

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

@NikitaSkrynnik Apply this for other similar places

Comment on lines +49 to +51
if spiffeID, idErr := spire.SpiffeIDFromContext(ctx); idErr == nil {
name = spiffeID.Path()
}
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
if spiffeID, idErr := spire.SpiffeIDFromContext(ctx); idErr == nil {
name = spiffeID.Path()
}
if spiffeID, err := spire.SpiffeIDFromContext(ctx); err == nil {
return err
}

@denis-tingaikin
Copy link
Member

@NikitaSkrynnik Lets merge this and consider the remaining comments in the separate PR.

@denis-tingaikin denis-tingaikin merged commit a64652c into networkservicemesh:main Nov 29, 2022
nsmbot pushed a commit to networkservicemesh/cmd-map-ip-k8s that referenced this pull request Nov 29, 2022
…k@main

PR link: networkservicemesh/sdk#1366

Commit: a64652c
Author: Nikita Skrynnik
Date: 2022-11-29 21:36:13 +1100
Message:
  - Transfer registry path via gRPC metadata (#1366)
* add updatepath chain elements for registry

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

* add nse_test for registry updatepath

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

* add updatepath tests for nse_server

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

* add updatetoken chain element for registry

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

* clone tests for all updatetoken and updatepath chain elements

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

* add updatepath and updatetoken to all registries in sdk

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

* add path_segment and index fields to opa policy input struct

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

* debugging

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

* fix sandbox tests

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

* fix authorize ns_server_test

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

* fix networkservice updatetoken TestChain

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

* add error check in updatepath chain element + fix some linter errors

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

* fix linter issues

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

* add policy for spiffeID check + add test for policy and authorize registry

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

* add policy for spiffeID checking to authorize for registry

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

* fix linter issues

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

* start adding sandbox test for registry authorize

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

* add grpcmetadata chain element and unit test

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

* add map to grpcmetadata + update api refs + fix some errors

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

* change authorize map name

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

* fix opa unit tests + fix authorize unit tests + cleanup

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

* finish all registry updatepath tests

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

* add tests for updatepath server + fix refresh bug

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

* fix some sandbox tests

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

* fix a lot of unit tests

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

* fix some linter issue

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

* fix all linter issues

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

* fix datarace in sandbox tests

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

* fix dns test

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

* add registry authorization client to nsmgr-proxy, proxydns and registry-memory

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

* fix linter

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

* remove degub logs

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>

* fix grpcmetadata unit test

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

* reduce timeout for test

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

* fix linter issues

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

* fix grpcmetadata unit test

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

* fix grpcmetadata tests + fix a bug in updatepath ns_client

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

* cleanup

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

* increase timeout for debug

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

* reduce timeout

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

* add Path data structure for registry

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

* rerun CI

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

* remove replace for api

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

* apply review comments

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

* rerun CI

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

* apply review comments

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

* revert changes in opainput.go

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

* fix linter

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

* go mod tidy

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

* revert changes in nsmgr/server.go

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

* use spiffeid as name for path segments

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

* fix linter issue

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

* Simpilfy Path.Clone method

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-cluster-info-k8s that referenced this pull request Nov 29, 2022
…k@main

PR link: networkservicemesh/sdk#1366

Commit: a64652c
Author: Nikita Skrynnik
Date: 2022-11-29 21:36:13 +1100
Message:
  - Transfer registry path via gRPC metadata (#1366)
* add updatepath chain elements for registry

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

* add nse_test for registry updatepath

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

* add updatepath tests for nse_server

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

* add updatetoken chain element for registry

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

* clone tests for all updatetoken and updatepath chain elements

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

* add updatepath and updatetoken to all registries in sdk

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

* add path_segment and index fields to opa policy input struct

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

* debugging

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

* fix sandbox tests

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

* fix authorize ns_server_test

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

* fix networkservice updatetoken TestChain

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

* add error check in updatepath chain element + fix some linter errors

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

* fix linter issues

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

* add policy for spiffeID check + add test for policy and authorize registry

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

* add policy for spiffeID checking to authorize for registry

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

* fix linter issues

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

* start adding sandbox test for registry authorize

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

* add grpcmetadata chain element and unit test

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

* add map to grpcmetadata + update api refs + fix some errors

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

* change authorize map name

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

* fix opa unit tests + fix authorize unit tests + cleanup

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

* finish all registry updatepath tests

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

* add tests for updatepath server + fix refresh bug

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

* fix some sandbox tests

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

* fix a lot of unit tests

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

* fix some linter issue

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

* fix all linter issues

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

* fix datarace in sandbox tests

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

* fix dns test

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

* add registry authorization client to nsmgr-proxy, proxydns and registry-memory

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

* fix linter

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

* remove degub logs

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>

* fix grpcmetadata unit test

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

* reduce timeout for test

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

* fix linter issues

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

* fix grpcmetadata unit test

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

* fix grpcmetadata tests + fix a bug in updatepath ns_client

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

* cleanup

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

* increase timeout for debug

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

* reduce timeout

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

* add Path data structure for registry

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

* rerun CI

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

* remove replace for api

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

* apply review comments

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

* rerun CI

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

* apply review comments

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

* revert changes in opainput.go

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

* fix linter

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

* go mod tidy

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

* revert changes in nsmgr/server.go

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

* use spiffeid as name for path segments

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

* fix linter issue

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

* Simpilfy Path.Clone method

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-ipam-vl3 that referenced this pull request Nov 29, 2022
…k@main

PR link: networkservicemesh/sdk#1366

Commit: a64652c
Author: Nikita Skrynnik
Date: 2022-11-29 21:36:13 +1100
Message:
  - Transfer registry path via gRPC metadata (#1366)
* add updatepath chain elements for registry

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

* add nse_test for registry updatepath

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

* add updatepath tests for nse_server

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

* add updatetoken chain element for registry

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

* clone tests for all updatetoken and updatepath chain elements

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

* add updatepath and updatetoken to all registries in sdk

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

* add path_segment and index fields to opa policy input struct

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

* debugging

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

* fix sandbox tests

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

* fix authorize ns_server_test

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

* fix networkservice updatetoken TestChain

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

* add error check in updatepath chain element + fix some linter errors

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

* fix linter issues

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

* add policy for spiffeID check + add test for policy and authorize registry

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

* add policy for spiffeID checking to authorize for registry

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

* fix linter issues

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

* start adding sandbox test for registry authorize

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

* add grpcmetadata chain element and unit test

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

* add map to grpcmetadata + update api refs + fix some errors

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

* change authorize map name

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

* fix opa unit tests + fix authorize unit tests + cleanup

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

* finish all registry updatepath tests

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

* add tests for updatepath server + fix refresh bug

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

* fix some sandbox tests

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

* fix a lot of unit tests

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

* fix some linter issue

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

* fix all linter issues

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

* fix datarace in sandbox tests

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

* fix dns test

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

* add registry authorization client to nsmgr-proxy, proxydns and registry-memory

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

* fix linter

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

* remove degub logs

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>

* fix grpcmetadata unit test

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

* reduce timeout for test

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

* fix linter issues

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

* fix grpcmetadata unit test

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

* fix grpcmetadata tests + fix a bug in updatepath ns_client

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

* cleanup

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

* increase timeout for debug

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

* reduce timeout

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

* add Path data structure for registry

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

* rerun CI

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

* remove replace for api

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

* apply review comments

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

* rerun CI

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

* apply review comments

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

* revert changes in opainput.go

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

* fix linter

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

* go mod tidy

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

* revert changes in nsmgr/server.go

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

* use spiffeid as name for path segments

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

* fix linter issue

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

* Simpilfy Path.Clone method

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsmgr that referenced this pull request Nov 29, 2022
…k@main

PR link: networkservicemesh/sdk#1366

Commit: a64652c
Author: Nikita Skrynnik
Date: 2022-11-29 21:36:13 +1100
Message:
  - Transfer registry path via gRPC metadata (#1366)
* add updatepath chain elements for registry

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

* add nse_test for registry updatepath

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

* add updatepath tests for nse_server

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

* add updatetoken chain element for registry

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

* clone tests for all updatetoken and updatepath chain elements

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

* add updatepath and updatetoken to all registries in sdk

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

* add path_segment and index fields to opa policy input struct

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

* debugging

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

* fix sandbox tests

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

* fix authorize ns_server_test

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

* fix networkservice updatetoken TestChain

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

* add error check in updatepath chain element + fix some linter errors

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

* fix linter issues

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

* add policy for spiffeID check + add test for policy and authorize registry

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

* add policy for spiffeID checking to authorize for registry

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

* fix linter issues

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

* start adding sandbox test for registry authorize

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

* add grpcmetadata chain element and unit test

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

* add map to grpcmetadata + update api refs + fix some errors

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

* change authorize map name

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

* fix opa unit tests + fix authorize unit tests + cleanup

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

* finish all registry updatepath tests

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

* add tests for updatepath server + fix refresh bug

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

* fix some sandbox tests

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

* fix a lot of unit tests

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

* fix some linter issue

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

* fix all linter issues

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

* fix datarace in sandbox tests

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

* fix dns test

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

* add registry authorization client to nsmgr-proxy, proxydns and registry-memory

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

* fix linter

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

* remove degub logs

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>

* fix grpcmetadata unit test

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

* reduce timeout for test

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

* fix linter issues

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

* fix grpcmetadata unit test

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

* fix grpcmetadata tests + fix a bug in updatepath ns_client

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

* cleanup

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

* increase timeout for debug

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

* reduce timeout

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

* add Path data structure for registry

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

* rerun CI

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

* remove replace for api

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

* apply review comments

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

* rerun CI

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

* apply review comments

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

* revert changes in opainput.go

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

* fix linter

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

* go mod tidy

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

* revert changes in nsmgr/server.go

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

* use spiffeid as name for path segments

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

* fix linter issue

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

* Simpilfy Path.Clone method

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsc-init that referenced this pull request Nov 29, 2022
…k@main

PR link: networkservicemesh/sdk#1366

Commit: a64652c
Author: Nikita Skrynnik
Date: 2022-11-29 21:36:13 +1100
Message:
  - Transfer registry path via gRPC metadata (#1366)
* add updatepath chain elements for registry

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

* add nse_test for registry updatepath

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

* add updatepath tests for nse_server

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

* add updatetoken chain element for registry

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

* clone tests for all updatetoken and updatepath chain elements

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

* add updatepath and updatetoken to all registries in sdk

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

* add path_segment and index fields to opa policy input struct

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

* debugging

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

* fix sandbox tests

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

* fix authorize ns_server_test

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

* fix networkservice updatetoken TestChain

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

* add error check in updatepath chain element + fix some linter errors

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

* fix linter issues

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

* add policy for spiffeID check + add test for policy and authorize registry

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

* add policy for spiffeID checking to authorize for registry

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

* fix linter issues

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

* start adding sandbox test for registry authorize

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

* add grpcmetadata chain element and unit test

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

* add map to grpcmetadata + update api refs + fix some errors

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

* change authorize map name

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

* fix opa unit tests + fix authorize unit tests + cleanup

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

* finish all registry updatepath tests

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

* add tests for updatepath server + fix refresh bug

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

* fix some sandbox tests

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

* fix a lot of unit tests

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

* fix some linter issue

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

* fix all linter issues

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

* fix datarace in sandbox tests

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

* fix dns test

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

* add registry authorization client to nsmgr-proxy, proxydns and registry-memory

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

* fix linter

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

* remove degub logs

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>

* fix grpcmetadata unit test

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

* reduce timeout for test

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

* fix linter issues

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

* fix grpcmetadata unit test

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

* fix grpcmetadata tests + fix a bug in updatepath ns_client

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

* cleanup

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

* increase timeout for debug

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

* reduce timeout

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

* add Path data structure for registry

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

* rerun CI

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

* remove replace for api

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

* apply review comments

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

* rerun CI

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

* apply review comments

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

* revert changes in opainput.go

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

* fix linter

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

* go mod tidy

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

* revert changes in nsmgr/server.go

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

* use spiffeid as name for path segments

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

* fix linter issue

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

* Simpilfy Path.Clone method

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-admission-webhook-k8s that referenced this pull request Nov 29, 2022
…k@main

PR link: networkservicemesh/sdk#1366

Commit: a64652c
Author: Nikita Skrynnik
Date: 2022-11-29 21:36:13 +1100
Message:
  - Transfer registry path via gRPC metadata (#1366)
* add updatepath chain elements for registry

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

* add nse_test for registry updatepath

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

* add updatepath tests for nse_server

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

* add updatetoken chain element for registry

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

* clone tests for all updatetoken and updatepath chain elements

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

* add updatepath and updatetoken to all registries in sdk

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

* add path_segment and index fields to opa policy input struct

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

* debugging

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

* fix sandbox tests

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

* fix authorize ns_server_test

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

* fix networkservice updatetoken TestChain

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

* add error check in updatepath chain element + fix some linter errors

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

* fix linter issues

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

* add policy for spiffeID check + add test for policy and authorize registry

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

* add policy for spiffeID checking to authorize for registry

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

* fix linter issues

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

* start adding sandbox test for registry authorize

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

* add grpcmetadata chain element and unit test

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

* add map to grpcmetadata + update api refs + fix some errors

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

* change authorize map name

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

* fix opa unit tests + fix authorize unit tests + cleanup

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

* finish all registry updatepath tests

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

* add tests for updatepath server + fix refresh bug

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

* fix some sandbox tests

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

* fix a lot of unit tests

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

* fix some linter issue

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

* fix all linter issues

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

* fix datarace in sandbox tests

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

* fix dns test

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

* add registry authorization client to nsmgr-proxy, proxydns and registry-memory

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

* fix linter

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

* remove degub logs

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>

* fix grpcmetadata unit test

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

* reduce timeout for test

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

* fix linter issues

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

* fix grpcmetadata unit test

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

* fix grpcmetadata tests + fix a bug in updatepath ns_client

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

* cleanup

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

* increase timeout for debug

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

* reduce timeout

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

* add Path data structure for registry

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

* rerun CI

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

* remove replace for api

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

* apply review comments

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

* rerun CI

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

* apply review comments

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

* revert changes in opainput.go

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

* fix linter

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

* go mod tidy

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

* revert changes in nsmgr/server.go

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

* use spiffeid as name for path segments

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

* fix linter issue

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

* Simpilfy Path.Clone method

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nse-vfio that referenced this pull request Nov 29, 2022
…k@main

PR link: networkservicemesh/sdk#1366

Commit: a64652c
Author: Nikita Skrynnik
Date: 2022-11-29 21:36:13 +1100
Message:
  - Transfer registry path via gRPC metadata (#1366)
* add updatepath chain elements for registry

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

* add nse_test for registry updatepath

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

* add updatepath tests for nse_server

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

* add updatetoken chain element for registry

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

* clone tests for all updatetoken and updatepath chain elements

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

* add updatepath and updatetoken to all registries in sdk

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

* add path_segment and index fields to opa policy input struct

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

* debugging

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

* fix sandbox tests

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

* fix authorize ns_server_test

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

* fix networkservice updatetoken TestChain

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

* add error check in updatepath chain element + fix some linter errors

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

* fix linter issues

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

* add policy for spiffeID check + add test for policy and authorize registry

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

* add policy for spiffeID checking to authorize for registry

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

* fix linter issues

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

* start adding sandbox test for registry authorize

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

* add grpcmetadata chain element and unit test

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

* add map to grpcmetadata + update api refs + fix some errors

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

* change authorize map name

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

* fix opa unit tests + fix authorize unit tests + cleanup

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

* finish all registry updatepath tests

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

* add tests for updatepath server + fix refresh bug

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

* fix some sandbox tests

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

* fix a lot of unit tests

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

* fix some linter issue

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

* fix all linter issues

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

* fix datarace in sandbox tests

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

* fix dns test

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

* add registry authorization client to nsmgr-proxy, proxydns and registry-memory

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

* fix linter

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

* remove degub logs

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>

* fix grpcmetadata unit test

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

* reduce timeout for test

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

* fix linter issues

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

* fix grpcmetadata unit test

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

* fix grpcmetadata tests + fix a bug in updatepath ns_client

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

* cleanup

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

* increase timeout for debug

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

* reduce timeout

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

* add Path data structure for registry

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

* rerun CI

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

* remove replace for api

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

* apply review comments

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

* rerun CI

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

* apply review comments

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

* revert changes in opainput.go

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

* fix linter

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

* go mod tidy

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

* revert changes in nsmgr/server.go

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

* use spiffeid as name for path segments

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

* fix linter issue

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

* Simpilfy Path.Clone method

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-registry-proxy-dns that referenced this pull request Nov 29, 2022
…k@main

PR link: networkservicemesh/sdk#1366

Commit: a64652c
Author: Nikita Skrynnik
Date: 2022-11-29 21:36:13 +1100
Message:
  - Transfer registry path via gRPC metadata (#1366)
* add updatepath chain elements for registry

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

* add nse_test for registry updatepath

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

* add updatepath tests for nse_server

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

* add updatetoken chain element for registry

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

* clone tests for all updatetoken and updatepath chain elements

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

* add updatepath and updatetoken to all registries in sdk

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

* add path_segment and index fields to opa policy input struct

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

* debugging

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

* fix sandbox tests

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

* fix authorize ns_server_test

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

* fix networkservice updatetoken TestChain

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

* add error check in updatepath chain element + fix some linter errors

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

* fix linter issues

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

* add policy for spiffeID check + add test for policy and authorize registry

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

* add policy for spiffeID checking to authorize for registry

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

* fix linter issues

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

* start adding sandbox test for registry authorize

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

* add grpcmetadata chain element and unit test

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

* add map to grpcmetadata + update api refs + fix some errors

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

* change authorize map name

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

* fix opa unit tests + fix authorize unit tests + cleanup

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

* finish all registry updatepath tests

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

* add tests for updatepath server + fix refresh bug

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

* fix some sandbox tests

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

* fix a lot of unit tests

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

* fix some linter issue

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

* fix all linter issues

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

* fix datarace in sandbox tests

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

* fix dns test

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

* add registry authorization client to nsmgr-proxy, proxydns and registry-memory

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

* fix linter

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

* remove degub logs

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>

* fix grpcmetadata unit test

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

* reduce timeout for test

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

* fix linter issues

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

* fix grpcmetadata unit test

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

* fix grpcmetadata tests + fix a bug in updatepath ns_client

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

* cleanup

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

* increase timeout for debug

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

* reduce timeout

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

* add Path data structure for registry

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

* rerun CI

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

* remove replace for api

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

* apply review comments

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

* rerun CI

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

* apply review comments

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

* revert changes in opainput.go

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

* fix linter

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

* go mod tidy

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

* revert changes in nsmgr/server.go

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

* use spiffeid as name for path segments

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

* fix linter issue

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

* Simpilfy Path.Clone method

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-registry-memory that referenced this pull request Nov 29, 2022
…k@main

PR link: networkservicemesh/sdk#1366

Commit: a64652c
Author: Nikita Skrynnik
Date: 2022-11-29 21:36:13 +1100
Message:
  - Transfer registry path via gRPC metadata (#1366)
* add updatepath chain elements for registry

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

* add nse_test for registry updatepath

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

* add updatepath tests for nse_server

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

* add updatetoken chain element for registry

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

* clone tests for all updatetoken and updatepath chain elements

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

* add updatepath and updatetoken to all registries in sdk

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

* add path_segment and index fields to opa policy input struct

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

* debugging

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

* fix sandbox tests

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

* fix authorize ns_server_test

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

* fix networkservice updatetoken TestChain

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

* add error check in updatepath chain element + fix some linter errors

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

* fix linter issues

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

* add policy for spiffeID check + add test for policy and authorize registry

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

* add policy for spiffeID checking to authorize for registry

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

* fix linter issues

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

* start adding sandbox test for registry authorize

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

* add grpcmetadata chain element and unit test

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

* add map to grpcmetadata + update api refs + fix some errors

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

* change authorize map name

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

* fix opa unit tests + fix authorize unit tests + cleanup

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

* finish all registry updatepath tests

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

* add tests for updatepath server + fix refresh bug

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

* fix some sandbox tests

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

* fix a lot of unit tests

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

* fix some linter issue

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

* fix all linter issues

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

* fix datarace in sandbox tests

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

* fix dns test

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

* add registry authorization client to nsmgr-proxy, proxydns and registry-memory

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

* fix linter

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

* remove degub logs

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>

* fix grpcmetadata unit test

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

* reduce timeout for test

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

* fix linter issues

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

* fix grpcmetadata unit test

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

* fix grpcmetadata tests + fix a bug in updatepath ns_client

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

* cleanup

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

* increase timeout for debug

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

* reduce timeout

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

* add Path data structure for registry

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

* rerun CI

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

* remove replace for api

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

* apply review comments

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

* rerun CI

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

* apply review comments

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

* revert changes in opainput.go

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

* fix linter

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

* go mod tidy

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

* revert changes in nsmgr/server.go

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

* use spiffeid as name for path segments

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

* fix linter issue

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

* Simpilfy Path.Clone method

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsmgr-proxy that referenced this pull request Nov 29, 2022
…k@main

PR link: networkservicemesh/sdk#1366

Commit: a64652c
Author: Nikita Skrynnik
Date: 2022-11-29 21:36:13 +1100
Message:
  - Transfer registry path via gRPC metadata (#1366)
* add updatepath chain elements for registry

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

* add nse_test for registry updatepath

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

* add updatepath tests for nse_server

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

* add updatetoken chain element for registry

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

* clone tests for all updatetoken and updatepath chain elements

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

* add updatepath and updatetoken to all registries in sdk

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

* add path_segment and index fields to opa policy input struct

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

* debugging

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

* fix sandbox tests

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

* fix authorize ns_server_test

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

* fix networkservice updatetoken TestChain

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

* add error check in updatepath chain element + fix some linter errors

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

* fix linter issues

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

* add policy for spiffeID check + add test for policy and authorize registry

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

* add policy for spiffeID checking to authorize for registry

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

* fix linter issues

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

* start adding sandbox test for registry authorize

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

* add grpcmetadata chain element and unit test

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

* add map to grpcmetadata + update api refs + fix some errors

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

* change authorize map name

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

* fix opa unit tests + fix authorize unit tests + cleanup

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

* finish all registry updatepath tests

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

* add tests for updatepath server + fix refresh bug

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

* fix some sandbox tests

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

* fix a lot of unit tests

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

* fix some linter issue

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

* fix all linter issues

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

* fix datarace in sandbox tests

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

* fix dns test

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

* add registry authorization client to nsmgr-proxy, proxydns and registry-memory

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

* fix linter

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

* remove degub logs

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>

* fix grpcmetadata unit test

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

* reduce timeout for test

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

* fix linter issues

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

* fix grpcmetadata unit test

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

* fix grpcmetadata tests + fix a bug in updatepath ns_client

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

* cleanup

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

* increase timeout for debug

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

* reduce timeout

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

* add Path data structure for registry

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

* rerun CI

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

* remove replace for api

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

* apply review comments

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

* rerun CI

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

* apply review comments

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

* revert changes in opainput.go

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

* fix linter

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

* go mod tidy

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

* revert changes in nsmgr/server.go

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

* use spiffeid as name for path segments

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

* fix linter issue

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

* Simpilfy Path.Clone method

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/sdk-kernel that referenced this pull request Nov 29, 2022
…k@main

PR link: networkservicemesh/sdk#1366

Commit: a64652c
Author: Nikita Skrynnik
Date: 2022-11-29 21:36:13 +1100
Message:
  - Transfer registry path via gRPC metadata (#1366)
* add updatepath chain elements for registry

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

* add nse_test for registry updatepath

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

* add updatepath tests for nse_server

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

* add updatetoken chain element for registry

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

* clone tests for all updatetoken and updatepath chain elements

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

* add updatepath and updatetoken to all registries in sdk

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

* add path_segment and index fields to opa policy input struct

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

* debugging

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

* fix sandbox tests

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

* fix authorize ns_server_test

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

* fix networkservice updatetoken TestChain

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

* add error check in updatepath chain element + fix some linter errors

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

* fix linter issues

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

* add policy for spiffeID check + add test for policy and authorize registry

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

* add policy for spiffeID checking to authorize for registry

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

* fix linter issues

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

* start adding sandbox test for registry authorize

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

* add grpcmetadata chain element and unit test

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

* add map to grpcmetadata + update api refs + fix some errors

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

* change authorize map name

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

* fix opa unit tests + fix authorize unit tests + cleanup

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

* finish all registry updatepath tests

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

* add tests for updatepath server + fix refresh bug

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

* fix some sandbox tests

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

* fix a lot of unit tests

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

* fix some linter issue

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

* fix all linter issues

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

* fix datarace in sandbox tests

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

* fix dns test

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

* add registry authorization client to nsmgr-proxy, proxydns and registry-memory

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

* fix linter

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

* remove degub logs

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>

* fix grpcmetadata unit test

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

* reduce timeout for test

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

* fix linter issues

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

* fix grpcmetadata unit test

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

* fix grpcmetadata tests + fix a bug in updatepath ns_client

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

* cleanup

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

* increase timeout for debug

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

* reduce timeout

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

* add Path data structure for registry

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

* rerun CI

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

* remove replace for api

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

* apply review comments

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

* rerun CI

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

* apply review comments

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

* revert changes in opainput.go

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

* fix linter

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

* go mod tidy

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

* revert changes in nsmgr/server.go

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

* use spiffeid as name for path segments

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

* fix linter issue

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

* Simpilfy Path.Clone method

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nse-remote-vlan that referenced this pull request Nov 29, 2022
…k@main

PR link: networkservicemesh/sdk#1366

Commit: a64652c
Author: Nikita Skrynnik
Date: 2022-11-29 21:36:13 +1100
Message:
  - Transfer registry path via gRPC metadata (#1366)
* add updatepath chain elements for registry

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

* add nse_test for registry updatepath

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

* add updatepath tests for nse_server

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

* add updatetoken chain element for registry

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

* clone tests for all updatetoken and updatepath chain elements

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

* add updatepath and updatetoken to all registries in sdk

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

* add path_segment and index fields to opa policy input struct

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

* debugging

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

* fix sandbox tests

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

* fix authorize ns_server_test

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

* fix networkservice updatetoken TestChain

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

* add error check in updatepath chain element + fix some linter errors

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

* fix linter issues

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

* add policy for spiffeID check + add test for policy and authorize registry

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

* add policy for spiffeID checking to authorize for registry

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

* fix linter issues

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

* start adding sandbox test for registry authorize

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

* add grpcmetadata chain element and unit test

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

* add map to grpcmetadata + update api refs + fix some errors

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

* change authorize map name

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

* fix opa unit tests + fix authorize unit tests + cleanup

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

* finish all registry updatepath tests

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

* add tests for updatepath server + fix refresh bug

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

* fix some sandbox tests

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

* fix a lot of unit tests

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

* fix some linter issue

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

* fix all linter issues

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

* fix datarace in sandbox tests

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

* fix dns test

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

* add registry authorization client to nsmgr-proxy, proxydns and registry-memory

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

* fix linter

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

* remove degub logs

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>

* fix grpcmetadata unit test

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

* reduce timeout for test

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

* fix linter issues

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

* fix grpcmetadata unit test

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

* fix grpcmetadata tests + fix a bug in updatepath ns_client

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

* cleanup

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

* increase timeout for debug

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

* reduce timeout

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

* add Path data structure for registry

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

* rerun CI

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

* remove replace for api

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

* apply review comments

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

* rerun CI

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

* apply review comments

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

* revert changes in opainput.go

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

* fix linter

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

* go mod tidy

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

* revert changes in nsmgr/server.go

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

* use spiffeid as name for path segments

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

* fix linter issue

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

* Simpilfy Path.Clone method

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/sdk-k8s that referenced this pull request Nov 29, 2022
…k@main

PR link: networkservicemesh/sdk#1366

Commit: a64652c
Author: Nikita Skrynnik
Date: 2022-11-29 21:36:13 +1100
Message:
  - Transfer registry path via gRPC metadata (#1366)
* add updatepath chain elements for registry

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

* add nse_test for registry updatepath

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

* add updatepath tests for nse_server

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

* add updatetoken chain element for registry

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

* clone tests for all updatetoken and updatepath chain elements

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

* add updatepath and updatetoken to all registries in sdk

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

* add path_segment and index fields to opa policy input struct

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

* debugging

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

* fix sandbox tests

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

* fix authorize ns_server_test

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

* fix networkservice updatetoken TestChain

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

* add error check in updatepath chain element + fix some linter errors

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

* fix linter issues

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

* add policy for spiffeID check + add test for policy and authorize registry

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

* add policy for spiffeID checking to authorize for registry

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

* fix linter issues

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

* start adding sandbox test for registry authorize

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

* add grpcmetadata chain element and unit test

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

* add map to grpcmetadata + update api refs + fix some errors

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

* change authorize map name

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

* fix opa unit tests + fix authorize unit tests + cleanup

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

* finish all registry updatepath tests

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

* add tests for updatepath server + fix refresh bug

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

* fix some sandbox tests

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

* fix a lot of unit tests

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

* fix some linter issue

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

* fix all linter issues

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

* fix datarace in sandbox tests

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

* fix dns test

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

* add registry authorization client to nsmgr-proxy, proxydns and registry-memory

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

* fix linter

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

* remove degub logs

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>

* fix grpcmetadata unit test

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

* reduce timeout for test

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

* fix linter issues

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

* fix grpcmetadata unit test

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

* fix grpcmetadata tests + fix a bug in updatepath ns_client

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

* cleanup

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

* increase timeout for debug

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

* reduce timeout

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

* add Path data structure for registry

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

* rerun CI

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

* remove replace for api

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

* apply review comments

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

* rerun CI

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

* apply review comments

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

* revert changes in opainput.go

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

* fix linter

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

* go mod tidy

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

* revert changes in nsmgr/server.go

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

* use spiffeid as name for path segments

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

* fix linter issue

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

* Simpilfy Path.Clone method

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
@NikitaSkrynnik NikitaSkrynnik deleted the grpc-metadata branch July 13, 2023 09:19
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.

3 participants