Bug 672705

Summary: need to make sure all calls to getAgentClient uses overlord
Product: [Other] RHQ Project Reporter: John Mazzitelli <mazz>
Component: Core ServerAssignee: Simeon Pinder <spinder>
Status: CLOSED CURRENTRELEASE QA Contact: Corey Welton <cwelton>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.0.0.B02CC: mfoley
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description John Mazzitelli 2011-01-25 22:54:19 UTC
Recent changes to agent manager require user auth to get an agent client.

Need to go through all references/callers to agentManagerBean.getAgentClient(Subject, ...) so they pass overlord in. Otherwise, the call will erroneously fail unless you are rhqadmin, some other admin user or you have SETTINGS global perm, which is not the intent.

Comment 1 John Mazzitelli 2011-01-25 22:59:09 UTC
I fixed BundleManagerBean, but there are others that need to change -eclipse shows me these (see calls to getAgentClient in these methods):

org.rhq.enterprise.server.operation.OperationManagerBean.cancelResourceOperation(Subject, ResourceOperationHistory, boolean)

org.rhq.enterprise.server.support.SupportManagerBean.getSnapshotReportStream(Subject, int, String, String)

org.rhq.enterprise.server.operation.ResourceOperationJob.invokeOperationOnResource(ResourceOperationSchedule, ResourceOperationHistory, OperationManagerLocal)

org.rhq.enterprise.server.resource.ResourceManagerBean.uninventoryResource(Subject, int)

Comment 2 Simeon Pinder 2011-01-25 23:55:16 UTC
Fixed in master:
Commit hash: 20771d02832

Comment 3 Mike Foley 2011-05-04 14:36:47 UTC
verified RHQ 4.0 community release as follows:  created a role with MANAGE_INVENTORY permissions.  created a new user 'joe' with the aforementioned role.  tested uninventory of resources, and creating/triggering operations.  reviewed logs for any silent errors.  looks good.

Comment 4 Corey Welton 2011-05-24 01:13:18 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 5 Corey Welton 2011-05-24 01:13:19 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 6 Corey Welton 2011-05-24 01:13:20 UTC
Bookkeeping - closing bug - fixed in recent release.