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

Add real username/id of user who performed the action instead of host UUID to teleport audit logs #6333

Closed
deusxanima opened this issue Apr 6, 2021 · 6 comments
Assignees
Labels
audit-log Issues related to Teleports Audit Log backport-required c-ib Internal Customer Reference feature-request Used for new features in Teleport, improvements to current should be #enhancements
Milestone

Comments

@deusxanima
Copy link
Contributor

What

What would you like Teleport to do differently?

Customer would like to be able to parse session commands from audit log by user (teleport username). Some events, such as session.start contain a "user" field with this information. Others, like user.create, user.delete, reset_password_token.create...etc. pass the host UUID in place of the actual user's info in the "user" field.

How

How would you implement this?

Pass the teleport username to command logging like we do with session.start events.

Why

Why do you need this?

If a customer has multiple admins logged in, they currently see that the sessions have started with each admin's username, however, the payload of the command executed doesn't contain their username/userid, thus making it hard to impossible to properly correlate the events with an individual user.

@deusxanima deusxanima added feature-request Used for new features in Teleport, improvements to current should be #enhancements audit-log Issues related to Teleports Audit Log c-ib Internal Customer Reference labels Apr 6, 2021
@robertogiordani
Copy link

When will be included in the new 4.4.x version?

@russjones russjones added this to the 6.2 "Buffalo" milestone Apr 15, 2021
@russjones russjones assigned tcsc and unassigned tcsc Apr 15, 2021
@russjones
Copy link
Contributor

russjones commented Apr 16, 2021

@Joerger When you implement this, can you investigate the difficulty in backporting to Teleport 4.4?

@Joerger
Copy link
Contributor

Joerger commented Apr 27, 2021

Hi @robertogiordani, I think I have a solution for this issue. I reproduced the issue by starting a session on a node that is local to the auth server. When I then run tctl add user, the audit log has user:[server-uuid].

When you connect to auth directly like this, it uses the built in admin/system identity rather than the user's identity. In fact, the user's identity is not even discoverable when you connect to auth this way.

However, it is possible to connect to auth remotely with tctl --identity. When you connect to auth this way, the auditlog.user field is the teleport user. Fortunately this is now available in 4.4 as well. Does this fit your use case?

Note that in 4.4, some tctl methods may not be available through an identity file, and connecting remotely seems to be possible but a bit buggy. Your best bet would be to upgrade to 6.0+ if you can. In 6.1 you'd also gain access to impersonation which may aid with your use case.

@robertogiordani
Copy link

robertogiordani commented Apr 28, 2021 via email

@robertogiordani
Copy link

@Joerger could you show me some example? The documentation is not clear for me and I've found this issue #1033
In that case how can we force the identify file creation and usage? We have to be sure that the operator doesn't forget to use the flag during the admin operations.
Thanks

@russjones
Copy link
Contributor

@robertogiordani Please see #6771 where @Joerger has provided some examples of how to use tctl with an identity file.

If you are still running into issues, please feel free to re-open this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit-log Issues related to Teleports Audit Log backport-required c-ib Internal Customer Reference feature-request Used for new features in Teleport, improvements to current should be #enhancements
Projects
None yet
Development

No branches or pull requests

5 participants