-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 an audit event for creating provisioning tokens #28769
Conversation
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.
Looks good, though
We should remove the old one after notifying the users and some grace period (I'll file a separate issue for this.)
We basically never want to remove audit events, because they can still exist in customers' audit logs, and we want to be able to interpret them even if we no longer emit them.
Note to self: looks like I forgot about the other place that emits audit events ( |
Probably comes from the |
That's a valid point; how about filing an issue to no longer emit them, even if we leave the code that is interpreting these? |
Nope, I confirmed: both of these go through the non-deprecated flow. |
I would just stop emitting them now. If this work closes one old issue that we haven't found the time to get to but opens another, we're back to hoping that some day we will be able to get back to this. In fact, the best approach is probably:
|
Also: * Add some missing tests. * Add error logging in emitTokenEvent(). * Fix lint errors.
@strideynet Ping, as you requested :) |
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.
Looks like this is nearly there, just had a few thoughts come to mind.
I'm not sure about this, is it not unnecessarily complex to emit two audit events for the same action? What if we just remove the emission of the legacy event here, call it a breaking api change and ship it with the next major release, and not worry about any backports? |
That's a fine option too. The only thing I'd like to avoid is having a patch release that suddenly stops emitting an event that the previous version did emit. |
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.
Are there any docs that should be changed to reflect this new event?
Good call, there is a reference page; although it's explicitly said it's not exhaustive, I'll add the |
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.
Just a few minor changes - this looks great now.
This reverts commit e1b8d2e.
Now that's embarassing. Looks like my "non-brittle" strategy was actually hiding a bug in my code, the Jurassic Park way. After moving the event emitting code to |
@zmb3 @strideynet Unless you protest, I will not to port the change further than v13, since this is when |
This seems acceptable to me :) |
Makes the docs match the code from #28769
Makes the docs match the code from #28769
Makes the docs match the code from #28769
Makes the docs match the code from #28769
This change creates a new event, keeping the old, trusted-cluster-specific one. We should remove the old one after notifying the users and some grace period (I'll file a separate issue for this.)
Related issue: #16359.
Not addressed, will address later: deleting provisioning tokens.