-
Notifications
You must be signed in to change notification settings - Fork 119
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
Audit Log: Track RBAC changes #1610
Conversation
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details:
|
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.
Upstream backstage is moving towards using their LoggerService
(also refer to the implementation) instead of the winston Logger. The LoggerService
does not contain this log
function so we should be using the info
and error
functions instead to make migration to LoggerService in the future easier.
To get the same behavior as using log
, you'll need to put the non message fields in the metadata argument of the info
or error
function. Otherwise, the object containing your audit log message will be logged as an object in the message field. This would result in [object Object]
being printed if the logger format isn't JSON.
Co-authored-by: Frank Kong <50030060+Zaperex@users.noreply.github.com>
Co-authored-by: Frank Kong <50030060+Zaperex@users.noreply.github.com>
Co-authored-by: Frank Kong <50030060+Zaperex@users.noreply.github.com>
Co-authored-by: Frank Kong <50030060+Zaperex@users.noreply.github.com>
Co-authored-by: Frank Kong <50030060+Zaperex@users.noreply.github.com>
Co-authored-by: Frank Kong <50030060+Zaperex@users.noreply.github.com>
Co-authored-by: Frank Kong <50030060+Zaperex@users.noreply.github.com>
Co-authored-by: Frank Kong <50030060+Zaperex@users.noreply.github.com>
Co-authored-by: Frank Kong <50030060+Zaperex@users.noreply.github.com>
Co-authored-by: Frank Kong <50030060+Zaperex@users.noreply.github.com>
Please retry analysis of this Pull-Request directly on SonarCloud |
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
this.logger.info( | ||
`${this.fmtToPastTime(operation)} '${metadata.roleEntityRef}'` | ||
this.toLogMsgWithRoleInfo(logMsg, metadata) | ||
); |
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.
this.logger.info( | |
`${this.fmtToPastTime(operation)} '${metadata.roleEntityRef}'` | |
this.toLogMsgWithRoleInfo(logMsg, metadata) | |
); | |
this.logger.info( | |
`${this.fmtToPastTime(operation)} '${metadata.roleEntityRef}'`, | |
this.toLogMsgWithRoleInfo(logMsg, metadata) | |
); |
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
close on favour: #1694 |
What does this pull request do
Implement audit logging for RBAC backend
Referenced issue:
https://issues.redhat.com/browse/RHIDP-2004