Skip to content

rbac: add dynamic metadata to network level filter#4910

Merged
mattklein123 merged 7 commits intoenvoyproxy:masterfrom
venilnoronha:rbac-metadata
Nov 7, 2018
Merged

rbac: add dynamic metadata to network level filter#4910
mattklein123 merged 7 commits intoenvoyproxy:masterfrom
venilnoronha:rbac-metadata

Conversation

@venilnoronha
Copy link
Copy Markdown
Member

Description: This PR enhances the network level RBAC filter by adding dynamic metadata to the connection's StreamInfo object.
Risk Level: Low
Testing: Updated tests
Docs Changes: N/A
Release Notes: Added a note about this change

@venilnoronha venilnoronha force-pushed the rbac-metadata branch 3 times, most recently from a48c2e0 to 43d53d9 Compare October 30, 2018 17:50
@yangminzhu
Copy link
Copy Markdown
Contributor

/cc @quanjielin Could you take a look at this? Thanks.

Copy link
Copy Markdown
Contributor

@yangminzhu yangminzhu left a comment

Choose a reason for hiding this comment

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

Thanks for working on this.

@rshriram
Copy link
Copy Markdown
Member

rshriram commented Nov 2, 2018

@yangminzhu and @quanjielin / @rodaine any more comments on this?

This commit enhances the network level RBAC filter by adding dynamic
metadata to the connection's StreamInfo object.

Signed-off-by: Venil Noronha <veniln@vmware.com>
Signed-off-by: Venil Noronha <veniln@vmware.com>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@liminw @quanjielin
Can we merge this with the HTTP filter to use the same set of constants? Instead of two sets of constants representing essentially the same thing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we should make tcp/http aligned, the work could happen in this PR or separated PR.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Unsure if renaming the HTTP metadata fields/values will cause any regression externally.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

From istio side, it's marked as Alpha feature, which is 'No guarantees on backward compatibility'.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Tracked via #4981.

@quanjielin
Copy link
Copy Markdown
Contributor

/lgtm

Signed-off-by: Venil Noronha <veniln@vmware.com>
Signed-off-by: Venil Noronha <veniln@vmware.com>
Signed-off-by: Venil Noronha <veniln@vmware.com>
Signed-off-by: Venil Noronha <veniln@vmware.com>
lizan
lizan previously approved these changes Nov 6, 2018
Copy link
Copy Markdown
Member

@lizan lizan left a comment

Choose a reason for hiding this comment

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

Great, thanks!

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

LGTM, a doc question. Thank you!


class DynamicMetadataKeys {
public:
const std::string ShadowPolicyIdField{"shadow_effective_policyID"};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does this key and the other keys in this file need to be documented somewhere? Is the idea here that this is meant to be sent in logging data? If we have well known metadata keys I think they should be documented somewhere?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It may be useful to document these constants as other filters may be able to augment Envoy's behavior based on these. I think that should be done along with the rename suggested in this comment in another PR.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OK if you plan on doing a follow up, SGTM.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Will do. Let me know if you have suggestions on where to document these.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure, maybe a new section on "well known dynamic metadata" under here: https://www.envoyproxy.io/docs/envoy/latest/configuration/configuration? I would take a look and see what feels right.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Cool, thanks!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Tracked via #4981.

@mattklein123 mattklein123 merged commit ce5621f into envoyproxy:master Nov 7, 2018
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.

6 participants