-
Notifications
You must be signed in to change notification settings - Fork 22
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 Path field to NetworkService and NetworkServiceEndpoint #147
Conversation
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
b21862e
to
414ee36
Compare
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
ca7706d
to
5ad5b68
Compare
@LionelJouin , @edwarnicke , @fkautz Let's discuss all possible solutions for Path. MotivationWe want to make registry operations safe and use zero trust. SolutionAdd networkservicemesh.Path to registry services. Registry services are https://github.com/networkservicemesh/api/blob/main/pkg/api/registry/registry.proto#L44-L54 NSE/NS entries are https://github.com/networkservicemesh/api/blob/main/pkg/api/registry/registry.proto#L9-L13 and https://github.com/networkservicemesh/api/blob/main/pkg/api/registry/registry.proto#L35-L42 OptionsOption 1: Add Path directly into NSE/NS entriesSo we can just add Path as a field for those structures. Pros:
Cons:
Option 2: Wrap NSE/NS entriesWe also can just wrap NSE/NS entries with new messages: message NetworkServiceRegistration {
NetworkService network_service = 1;
Path path = 2;
}
message NetworkServiceEndpointRegistration {
NetworkServiceEndpoint network_service_endpoint = 1;
Path path = 2;
} Pros:
Cons:
Option 3: Add path to grpc metdatagrpc metadata is just KV map type MD map[string][]string MD is used for tokens and so on. Also, it transfers with TLS if it is enabled (in our case we're using TLS from the Spire) Pros:
Cons:
TODO: Your option |
@edwarnicke , @fkautz , @LionelJouin Any thoughts are super welcome :) |
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
pkg/api/registry/registry.proto
Outdated
uint32 index = 1; | ||
repeated PathSegment path_segments = 2; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have PathSegment and Path when we don't use them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, it's temporary solution. We have next options for this data structure:
- Use just an array of tokens, because in our OPA policies we check only them
- Make a similar data structure and place it in SDK, near chain elements that are related to OPA for Registry
- Leave this data structure in API as is
- Make Path data structure common for NetworkService and Registry and move it to another place in API repo, because path for registry and path for networkservice are the same
What do you think of it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@edwarnicke I think we can go with option 2.
Because then we'll need only to add
repeated string path_ids = 4;
for NetworkServices/NetworkServiceEndpoints in api repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good :)
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looked quickly the previous time.
Now, it's looking good to me.
@glazychev-art , @LionelJouin Could you have a look? 😉
…i@main PR link: networkservicemesh/api#147 Commit: 30ff0ca Author: Nikita Skrynnik Date: 2022-11-23 17:10:08 +0700 Message: - Add Path field to NetworkService and NetworkServiceEndpoint (#147) * add path to NetworkService and NetworkServiceEndpoint Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fixes after rebase Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add new messages with Path field Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add path_ids field to NS and NSE messages Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * remove Path and PathSegment from registry.proto Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…i@main (#1385) PR link: networkservicemesh/api#147 Commit: 30ff0ca Author: Nikita Skrynnik Date: 2022-11-23 17:10:08 +0700 Message: - Add Path field to NetworkService and NetworkServiceEndpoint (#147) * add path to NetworkService and NetworkServiceEndpoint Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fixes after rebase Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add new messages with Path field Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add path_ids field to NS and NSE messages Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * remove Path and PathSegment from registry.proto Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io> Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io> Co-authored-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1385 Commit: 14f2490 Author: Network Service Mesh Bot Date: 2022-11-23 06:16:38 -0600 Message: - Update go.mod and go.sum to latest version from networkservicemesh/api@main (#1385) PR link: networkservicemesh/api#147 Commit: 30ff0ca Author: Nikita Skrynnik Date: 2022-11-23 17:10:08 +0700 Message: - Add Path field to NetworkService and NetworkServiceEndpoint (#147) * add path to NetworkService and NetworkServiceEndpoint Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fixes after rebase Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add new messages with Path field Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add path_ids field to NS and NSE messages Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * remove Path and PathSegment from registry.proto Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io> Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1385 Commit: 14f2490 Author: Network Service Mesh Bot Date: 2022-11-23 06:16:38 -0600 Message: - Update go.mod and go.sum to latest version from networkservicemesh/api@main (#1385) PR link: networkservicemesh/api#147 Commit: 30ff0ca Author: Nikita Skrynnik Date: 2022-11-23 17:10:08 +0700 Message: - Add Path field to NetworkService and NetworkServiceEndpoint (#147) * add path to NetworkService and NetworkServiceEndpoint Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fixes after rebase Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add new messages with Path field Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add path_ids field to NS and NSE messages Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * remove Path and PathSegment from registry.proto Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io> Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1385 Commit: 14f2490 Author: Network Service Mesh Bot Date: 2022-11-23 06:16:38 -0600 Message: - Update go.mod and go.sum to latest version from networkservicemesh/api@main (#1385) PR link: networkservicemesh/api#147 Commit: 30ff0ca Author: Nikita Skrynnik Date: 2022-11-23 17:10:08 +0700 Message: - Add Path field to NetworkService and NetworkServiceEndpoint (#147) * add path to NetworkService and NetworkServiceEndpoint Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fixes after rebase Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add new messages with Path field Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add path_ids field to NS and NSE messages Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * remove Path and PathSegment from registry.proto Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io> Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1385 Commit: 14f2490 Author: Network Service Mesh Bot Date: 2022-11-23 06:16:38 -0600 Message: - Update go.mod and go.sum to latest version from networkservicemesh/api@main (#1385) PR link: networkservicemesh/api#147 Commit: 30ff0ca Author: Nikita Skrynnik Date: 2022-11-23 17:10:08 +0700 Message: - Add Path field to NetworkService and NetworkServiceEndpoint (#147) * add path to NetworkService and NetworkServiceEndpoint Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fixes after rebase Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add new messages with Path field Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add path_ids field to NS and NSE messages Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * remove Path and PathSegment from registry.proto Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io> Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1385 Commit: 14f2490 Author: Network Service Mesh Bot Date: 2022-11-23 06:16:38 -0600 Message: - Update go.mod and go.sum to latest version from networkservicemesh/api@main (#1385) PR link: networkservicemesh/api#147 Commit: 30ff0ca Author: Nikita Skrynnik Date: 2022-11-23 17:10:08 +0700 Message: - Add Path field to NetworkService and NetworkServiceEndpoint (#147) * add path to NetworkService and NetworkServiceEndpoint Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fixes after rebase Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add new messages with Path field Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add path_ids field to NS and NSE messages Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * remove Path and PathSegment from registry.proto Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io> Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1385 Commit: 14f2490 Author: Network Service Mesh Bot Date: 2022-11-23 06:16:38 -0600 Message: - Update go.mod and go.sum to latest version from networkservicemesh/api@main (#1385) PR link: networkservicemesh/api#147 Commit: 30ff0ca Author: Nikita Skrynnik Date: 2022-11-23 17:10:08 +0700 Message: - Add Path field to NetworkService and NetworkServiceEndpoint (#147) * add path to NetworkService and NetworkServiceEndpoint Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fixes after rebase Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add new messages with Path field Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add path_ids field to NS and NSE messages Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * remove Path and PathSegment from registry.proto Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io> Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1385 Commit: 14f2490 Author: Network Service Mesh Bot Date: 2022-11-23 06:16:38 -0600 Message: - Update go.mod and go.sum to latest version from networkservicemesh/api@main (#1385) PR link: networkservicemesh/api#147 Commit: 30ff0ca Author: Nikita Skrynnik Date: 2022-11-23 17:10:08 +0700 Message: - Add Path field to NetworkService and NetworkServiceEndpoint (#147) * add path to NetworkService and NetworkServiceEndpoint Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fixes after rebase Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add new messages with Path field Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add path_ids field to NS and NSE messages Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * remove Path and PathSegment from registry.proto Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io> Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1385 Commit: 14f2490 Author: Network Service Mesh Bot Date: 2022-11-23 06:16:38 -0600 Message: - Update go.mod and go.sum to latest version from networkservicemesh/api@main (#1385) PR link: networkservicemesh/api#147 Commit: 30ff0ca Author: Nikita Skrynnik Date: 2022-11-23 17:10:08 +0700 Message: - Add Path field to NetworkService and NetworkServiceEndpoint (#147) * add path to NetworkService and NetworkServiceEndpoint Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fixes after rebase Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add new messages with Path field Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add path_ids field to NS and NSE messages Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * remove Path and PathSegment from registry.proto Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io> Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1385 Commit: 14f2490 Author: Network Service Mesh Bot Date: 2022-11-23 06:16:38 -0600 Message: - Update go.mod and go.sum to latest version from networkservicemesh/api@main (#1385) PR link: networkservicemesh/api#147 Commit: 30ff0ca Author: Nikita Skrynnik Date: 2022-11-23 17:10:08 +0700 Message: - Add Path field to NetworkService and NetworkServiceEndpoint (#147) * add path to NetworkService and NetworkServiceEndpoint Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fixes after rebase Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add new messages with Path field Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add path_ids field to NS and NSE messages Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * remove Path and PathSegment from registry.proto Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io> Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1385 Commit: 14f2490 Author: Network Service Mesh Bot Date: 2022-11-23 06:16:38 -0600 Message: - Update go.mod and go.sum to latest version from networkservicemesh/api@main (#1385) PR link: networkservicemesh/api#147 Commit: 30ff0ca Author: Nikita Skrynnik Date: 2022-11-23 17:10:08 +0700 Message: - Add Path field to NetworkService and NetworkServiceEndpoint (#147) * add path to NetworkService and NetworkServiceEndpoint Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fixes after rebase Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add new messages with Path field Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add path_ids field to NS and NSE messages Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * remove Path and PathSegment from registry.proto Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io> Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1385 Commit: 14f2490 Author: Network Service Mesh Bot Date: 2022-11-23 06:16:38 -0600 Message: - Update go.mod and go.sum to latest version from networkservicemesh/api@main (#1385) PR link: networkservicemesh/api#147 Commit: 30ff0ca Author: Nikita Skrynnik Date: 2022-11-23 17:10:08 +0700 Message: - Add Path field to NetworkService and NetworkServiceEndpoint (#147) * add path to NetworkService and NetworkServiceEndpoint Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fixes after rebase Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add new messages with Path field Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add path_ids field to NS and NSE messages Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * remove Path and PathSegment from registry.proto Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io> Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1385 Commit: 14f2490 Author: Network Service Mesh Bot Date: 2022-11-23 06:16:38 -0600 Message: - Update go.mod and go.sum to latest version from networkservicemesh/api@main (#1385) PR link: networkservicemesh/api#147 Commit: 30ff0ca Author: Nikita Skrynnik Date: 2022-11-23 17:10:08 +0700 Message: - Add Path field to NetworkService and NetworkServiceEndpoint (#147) * add path to NetworkService and NetworkServiceEndpoint Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fixes after rebase Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add new messages with Path field Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add path_ids field to NS and NSE messages Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * remove Path and PathSegment from registry.proto Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io> Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1385 Commit: 14f2490 Author: Network Service Mesh Bot Date: 2022-11-23 06:16:38 -0600 Message: - Update go.mod and go.sum to latest version from networkservicemesh/api@main (#1385) PR link: networkservicemesh/api#147 Commit: 30ff0ca Author: Nikita Skrynnik Date: 2022-11-23 17:10:08 +0700 Message: - Add Path field to NetworkService and NetworkServiceEndpoint (#147) * add path to NetworkService and NetworkServiceEndpoint Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fixes after rebase Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add new messages with Path field Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add path_ids field to NS and NSE messages Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * remove Path and PathSegment from registry.proto Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io> Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
No description provided.