audit: fill in sub-resource
This commit is contained in:
		@@ -94,10 +94,11 @@ func NewEventFromRequest(req *http.Request, level auditinternal.Level, attribs a
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	if attribs.IsResourceRequest() {
 | 
						if attribs.IsResourceRequest() {
 | 
				
			||||||
		ev.ObjectRef = &auditinternal.ObjectReference{
 | 
							ev.ObjectRef = &auditinternal.ObjectReference{
 | 
				
			||||||
			Namespace:  attribs.GetNamespace(),
 | 
								Namespace:   attribs.GetNamespace(),
 | 
				
			||||||
			Name:       attribs.GetName(),
 | 
								Name:        attribs.GetName(),
 | 
				
			||||||
			Resource:   attribs.GetResource(),
 | 
								Resource:    attribs.GetResource(),
 | 
				
			||||||
			APIVersion: attribs.GetAPIGroup() + "/" + attribs.GetAPIVersion(),
 | 
								Subresource: attribs.GetSubresource(),
 | 
				
			||||||
 | 
								APIVersion:  attribs.GetAPIGroup() + "/" + attribs.GetAPIVersion(),
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user