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

[advanced audit]invalid audit saved for meta.k8s.io/v1.DeleteOptions #57829

Closed
CaoShuFeng opened this issue Jan 4, 2018 · 7 comments
Closed
Labels
area/audit kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth.

Comments

@CaoShuFeng
Copy link
Contributor

Run this command:

curl -k -v -XDELETE  -H "Accept: application/json" -H "Content-Type: application/json" -H "User-Agent: kubectl/v1.10.0 (linux/amd64) kubernetes/d7e5bd1" http://172.16.29.130:8080/apis/extensions/v1beta1/namespaces/default/deployments/nginx --data '{"propagationPolicy":"Foreground","apiVersion":"meta.k8s.io/v1","kind":"DeleteOptions"}'

In this command we have such request body:

'{"propagationPolicy":"Foreground","apiVersion":"meta.k8s.io/v1","kind":"DeleteOptions"}'

But in the saved audit events, we have:

"requestObject":{"kind":"DeleteOptions","apiVersion":"extensions/v1beta1","propagationPolicy":"Foreground"}

/cc @sttts

@k8s-ci-robot k8s-ci-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Jan 4, 2018
@CaoShuFeng
Copy link
Contributor Author

It has something to do with this:

// For backwards compatibility, we need to allow existing clients to submit per group DeleteOptions

@soltysh soltysh added area/audit sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. labels Jan 4, 2018
@k8s-ci-robot k8s-ci-robot removed the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Jan 4, 2018
@soltysh
Copy link
Contributor

soltysh commented Jan 4, 2018

Hmm... I'm not sure we can do anything with it for now, until the DeletionOptions are handled properly. In my scale of seriousness this falls in the the category of not that much. We do record 90% of relevant information, the only wrong information is the api groups which is sort of ok, imho. At least for now.

@liggitt liggitt added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Jan 6, 2018
@caesarxuchao
Copy link
Member

cc @tallclair

@lavalamp
Copy link
Member

lavalamp commented Jan 8, 2018

I don't think this is an API machinery thing, @tallclair is there a better SIG?

@tallclair tallclair added the sig/auth Categorizes an issue or PR as relevant to SIG Auth. label Jan 8, 2018
@tallclair
Copy link
Member

cc @crassirostris

Audit logging is sort of a collaboration of sig-apimachinery & sig-auth

@liggitt liggitt added the kind/bug Categorizes issue or PR as related to a bug. label Feb 10, 2018
@liggitt
Copy link
Member

liggitt commented Apr 17, 2018

I don't think this is really worth fixing, as it is specific to the meta options structs

@CaoShuFeng
Copy link
Contributor Author

I don't think this is really worth fixing, as it is specific to the meta options structs

/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/audit kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth.
Projects
None yet
Development

No branches or pull requests

7 participants