-
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 a new audit event for AWS console request #45715
base: master
Are you sure you want to change the base?
Conversation
f0eefa7
to
72ffc70
Compare
@smallinsky this PR is a follow-up on the discussion on #45202. Let me know what you think about this approach. Thanks! |
if externalID != "" { | ||
sum := sha1.Sum([]byte(externalID)) | ||
e.ExternalIdSha1 = hex.EncodeToString(sum[:]) |
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.
Why externalID needs to be truncated/ converted to sha1 ?
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.
Here is my take. AWS does not treat external ID as a secret but in general, it's only known to the assumer and whoever has permission to the target role. It should not be public knowledge to like an auditor.
For auditing purpose, I mainly want to capture the fact that an external ID is used. I could also use a bool.
What do you think? If security is not a concern, we could record the original string too.
return nil, trace.Wrap(err) | ||
} | ||
|
||
c.emitAudit(ctx, req, nil) |
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.
nit: Emitting audit event GetAWSSigninURL is not totally verbose flow.
Why not put the audit emit audit event from handler
?
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.
The handler does not have all the details like the hashed username, nor it (the handler) should concern a very specific AWS event, IMO.
fixes #45603
changelog: added a new audit event for AWS console request
role_session_name
New audit event (in addition to
app.session.start
):Now it captures the error when AWS console request fails:
Role session name is captured in the event:
Also updated some existing events: