You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "kfaraz (via GitHub)" <gi...@apache.org> on 2024/01/08 10:45:42 UTC
[PR] Audit changes made to supervisor specs (druid)
kfaraz opened a new pull request, #15636:
URL: https://github.com/apache/druid/pull/15636
### Changes
- Audit create or update of a supervisor spec. The purpose of the audit is just to track which user made change to a supervisor and when.
- The audit entry does not contain the entire spec or even a diff of the changes as this is already captured in the druid_supervisor.
#### Release note
Create or update of a supervisor is now logged (or persisted, if applicable) by the Druid audit system.
<hr>
This PR has:
- [ ] been self-reviewed.
- [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
- [ ] added documentation for new or modified features or behaviors.
- [ ] a release note entry in the PR description.
- [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
- [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
- [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
- [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
- [ ] added integration tests.
- [ ] been tested in a test Druid cluster.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Audit create/update of a supervisor spec (druid)
Posted by "abhishekagarwal87 (via GitHub)" <gi...@apache.org>.
abhishekagarwal87 commented on code in PR #15636:
URL: https://github.com/apache/druid/pull/15636#discussion_r1444497086
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorResource.java:
##########
@@ -143,6 +148,19 @@ public Response specPost(final SupervisorSpec spec, @Context final HttpServletRe
}
manager.createOrUpdateAndStartSupervisor(spec);
+
+ final String auditPayload
Review Comment:
do we log the update timestamp in the audit event that can be used to match the user activity with the entry in the supervisor history?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Audit create/update of a supervisor spec (druid)
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #15636:
URL: https://github.com/apache/druid/pull/15636#discussion_r1444518181
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorResource.java:
##########
@@ -143,6 +148,19 @@ public Response specPost(final SupervisorSpec spec, @Context final HttpServletRe
}
manager.createOrUpdateAndStartSupervisor(spec);
+
+ final String auditPayload
Review Comment:
An audit entry does contain the audit time, but it is currently not being logged. The audit time is persisted though in case of `druid.audit.manager.type=sql` .
The log message is of the format
```
User[%s], identity[%s], IP[%s] performed action of type[%s] on key[%s] with comment[%s], request[%s], payload[%s].
```
The audit time had been left out of the log message on purpose as it is typically the same as the timestamp of the log message itself.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Audit create/update of a supervisor spec (druid)
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #15636:
URL: https://github.com/apache/druid/pull/15636#discussion_r1444518181
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorResource.java:
##########
@@ -143,6 +148,19 @@ public Response specPost(final SupervisorSpec spec, @Context final HttpServletRe
}
manager.createOrUpdateAndStartSupervisor(spec);
+
+ final String auditPayload
Review Comment:
An audit entry does contain the audit time, but it is currently not being logged.
The log message is of the format
```
User[%s], identity[%s], IP[%s] performed action of type[%s] on key[%s] with comment[%s], request[%s], payload[%s].
```
The audit time had been left out of the log message on purpose as it is typically the same as the timestamp of the log message itself.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Audit create/update of a supervisor spec (druid)
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz merged PR #15636:
URL: https://github.com/apache/druid/pull/15636
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org