Bug 1092213

Summary: AccessAuditContext domainUUID is not set when the domain-uuid header is set
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Brian Stansberry <brian.stansberry>
Component: Domain ManagementAssignee: Brian Stansberry <brian.stansberry>
Status: CLOSED CURRENTRELEASE QA Contact: Ondrej Lukas <olukas>
Severity: unspecified Docs Contact: Nichola Moore <nmoore>
Priority: unspecified    
Version: 6.2.0CC: emuckenh, kkhan, myarboro, smumford, zroubali
Target Milestone: ER4   
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previous releases of JBoss EAP 6 contained a bug wherein `PrepareStepHandler` created a UUID and set "operations-headers" => "domain-uuid" on an operation, but did not then pass that UUID to AccessAuditContext. In a managed domain operation for an operation on the domain controller, this meant the domainUUID field in the audit log record had no value, however the operation field that showed the operation that was invoked includes a domain-uuid operation header. This issue has been resolved in this release of the product.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-28 15:32:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Brian Stansberry 2014-04-29 02:38:54 UTC
Description of problem:

org.jboss.as.domain.controller.operations.coordination.PrepareStepHandler creates a UUID and sets "operations-headers" => "domain-uuid" on the op, but it does not pass the same UUID to AccessAuditContext. The result is the log record has null in the domainUUID field but the operation headers part of the "ops" field shows the uuid. Confusing.

How reproducible:

Always.

Steps to Reproduce:
1. Start a managed domain
2. Turn on management audit logging.
3. Invoke an operation and check the audit log

Actual results:

The domainUUID field in the audit log record has no value but the op field that shows the operation that was invoked includes a domain-uuid operation header.

Expected results:

The domainUUID field in the audit log record has a value but there is no domain-uuid operation header.

Additional info:

Comment 2 Scott Mumford 2014-05-14 02:12:35 UTC
Refactored release note text for this as a Known Issue (ER4 fixes will not be picked up in the 6.3.0 Beta release)

Original note included here for use at 6.3.0 GA:

Cause: 

PrepareStepHandler creates a UUID and sets "operations-headers" => "domain-uuid" on the op, but it does not pass the same UUID to AccessAuditContext.

Consequence: 

In a managed domain operation for an operation on the domain controller, the domainUUID field in the audit log record has no value but the op field that shows the operation that was invoked includes a domain-uuid operation header.

Fix: 

PrepareStepHandler passes the UUID to AccessAuditContext making it available for use in the audit log, while the OperationContextImpl caches a copy of the operation prior to any modifications ensuring that headers added for internal reasons during execution are not recorded in the log.

Result: 

The domainUUID field in the audit log record has a value but there is no domain-uuid operation header.

Comment 3 Zbyněk Roubalík 2014-05-16 09:10:24 UTC
Verified on EAP 6.3.0.ER4