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

authz: Move audit package #6218

Merged
merged 3 commits into from Apr 21, 2023
Merged

authz: Move audit package #6218

merged 3 commits into from Apr 21, 2023

Conversation

gtcooke94
Copy link
Contributor

@gtcooke94 gtcooke94 commented Apr 21, 2023

Make the audit logger interfaces their own package inside of authz. Since the package is named audit, I changed all instance of AuditLogger to just Logger.

This is necessary to avoid a circular dependency. rbac_engine.go needs to import this audit package so it can manage the logger interfaces and call them during the authorization decision. On the master branch, adding an import for the authz package causes the following import cycle error:

package google.golang.org/grpc/internal/xds/rbac
        imports google.golang.org/grpc/authz
        imports google.golang.org/grpc/internal/xds/rbac: import cycle not allowed

While technically a breaking change, this is both experimental and merged a few days ago.

RELEASE NOTES: none

@gtcooke94 gtcooke94 added the Type: Security A bug or other problem affecting security label Apr 21, 2023
@gtcooke94 gtcooke94 changed the title Move audit package authz: Move audit package Apr 21, 2023
Copy link
Contributor

@rockspore rockspore 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 the PR! Again sorry for not having realized this sooner. Somehow I thought only the httpfilter/rbac pkg needs these APIs.

@gtcooke94 gtcooke94 requested a review from dfawley April 21, 2023 14:50
@dfawley dfawley modified the milestones: 1.55 Release, 1.56 Release Apr 21, 2023
@gtcooke94 gtcooke94 merged commit 83c460b into grpc:master Apr 21, 2023
11 checks passed
gtcooke94 added a commit to gtcooke94/grpc-go that referenced this pull request Apr 21, 2023
* Move audit logger to it's own package

* remove audit prefixes since its the package name now

* Add package comment
dfawley pushed a commit that referenced this pull request Apr 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Security A bug or other problem affecting security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants