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

Authentication audit logging - denote the authentication mechanism used. #82295

Open
raesene opened this issue Sep 3, 2019 · 22 comments
Open
Assignees
Labels
area/audit help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. sig/auth Categorizes an issue or PR as relevant to SIG Auth.

Comments

@raesene
Copy link

raesene commented Sep 3, 2019

What would you like to be added:

Logging for the authentication mechanism used by a user for requests to the API server.

Why is this needed:

At the moment Kubernetes does not put the mechanism used to authenticate a user into it's audit logs. As Kubernetes supports multiple authentication mechanisms, this could lead to a circumstance where an identical username is defined under different authentication schemes and it would be impossible to identify which had been used for a given request.

This is particularly serious in the case of client certificate authentication. As all that is required for the creation of client certificate credentials is access to the ca.key file for the cluster and credentials can be created using openssl commands, there may be no audit trail of users created with this mechanism.

An attacker who gained read-only access to that file would be able to create new credentials with the same usernames as users authenticated via other mechanisms, removing the ability of cluster operators to accurately audit user actions.

@raesene raesene added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 3, 2019
@k8s-ci-robot k8s-ci-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Sep 3, 2019
@raesene
Copy link
Author

raesene commented Sep 3, 2019

/sig auth

@k8s-ci-robot k8s-ci-robot added sig/auth Categorizes an issue or PR as relevant to SIG Auth. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 3, 2019
@danielqsj
Copy link
Contributor

/cc

@mayakacz
Copy link

mayakacz commented Sep 7, 2019

cc: @mikedanese

@tallclair
Copy link
Member

related: #82379

@tallclair tallclair added area/audit priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Oct 30, 2019
@tallclair
Copy link
Member

From sig-auth discussion 10/30: Consider adding an audit annotation.

@tedyu
Copy link
Contributor

tedyu commented Oct 30, 2019

How about adding audit annotation key:

	annotationKey = "audit.k8s.io/auth-mechanism"

@tallclair
Copy link
Member

Maybe authentication.k8s.io/plugin-name? Or might we want to subdivide different plugins?
(more consistent with the authorization annotaitons: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver/pkg/endpoints/filters/authorization.go#L35)

As an asside, we should probably centralize the well-known audit annotations. Or should we consider promoting them to fields?

@tedyu
Copy link
Contributor

tedyu commented Oct 30, 2019

'authentication.k8s.io/auth-mechanism' seems to be a bit more general compared to 'authentication.k8s.io/plugin-name'.

For this issue, probably introducing one audit annotation key suffices.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 28, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 27, 2020
@tallclair
Copy link
Member

/remove-lifecycle rotten
/assign @immutableT

Alex, would you be interested in tackling this as part of adding monitoring for the authentication method?

xref: #85113

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Feb 29, 2020
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 29, 2020
@tallclair
Copy link
Member

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 13, 2020
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 11, 2020
@tallclair
Copy link
Member

/remove-lifecycle stale

@immutableT - Are you still owning this? I'd like to get it in v1.20.

/milestone v1.20

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 17, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Sep 17, 2020
@sayanchowdhury
Copy link
Member

👋🏽 Hey @tallclair @immutableT ! I'm from the Bug Triage team. This issue has not been updated for a while, so I'd like to check on the status. The code freeze is starting November 12th (about 3 weeks from now) and while there is still plenty of time, we want to ensure that each PR has a chance to be merged on time.

As the issue is tagged for 1.20, is it still planned for this release?

@tallclair
Copy link
Member

Unfortunately I think @immutableT is no longer working on Kubernetes, and I won't be able to get to this.

@mikedanese would anyone from your team be able to pick this up? Or maybe @micahhausler (I can't remember why this was assigned to you)?

/unassign @immutableT

@sayanchowdhury
Copy link
Member

Hi @tallclair Since we have crossed the code freeze for 1.20, and there are not many updates in the issues I'm dropping the milestone. Please add the 1.21 milestone if you think the issue will be addressed in the next milestone.
/milestone clear

@k8s-ci-robot k8s-ci-robot removed this from the v1.20 milestone Nov 18, 2020
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 16, 2021
@tallclair
Copy link
Member

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 17, 2021
@tallclair
Copy link
Member

/help

@k8s-ci-robot
Copy link
Contributor

@tallclair:
This request has been marked as needing help from a contributor.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/help

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.

@k8s-ci-robot k8s-ci-robot added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Feb 17, 2021
@mikedanese mikedanese added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Feb 17, 2021
@enj enj added this to Backlog in SIG Auth Old Apr 9, 2021
@enj enj moved this from Needs Triage Issues to Backlog in SIG Auth Old May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/audit help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. sig/auth Categorizes an issue or PR as relevant to SIG Auth.
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.