Overview
The Resource Optimizer requires a dedicated service account with sufficient privileges to call the Compute API for live migration. Hardening this account — and restricting who can approve and execute action plans — prevents unauthorized workload movement and ensures a complete audit trail for all optimization activity.Prerequisites
- Administrator privileges on both the Resource Optimizer and Xloud Identity
- Xloud Compute deployed and operational
- Resource Optimizer services running (API, Decision Engine, Applier)
Service Account Hardening
The Applier uses a dedicated service account to authenticate against the Compute API. This account must have sufficient permissions to perform live migrations but should be scoped to the minimum necessary privileges.Create a Dedicated Service Account
- Dashboard
- CLI
Create the user
Navigate to Admin → Identity → Users and click Create User.
Set a strong password and save it to your secrets manager.
| Field | Value |
|---|---|
| Username | watcher-service |
watcher@internal.xloud.tech | |
| Project | service |
| Role | admin (required for live migration) |
Protect watcher.conf Credentials
Thewatcher.conf file contains the Applier’s service account credentials. Restrict
access to this file on controller nodes and verify the authentication configuration.
- XDeploy
- CLI
Automatic Credential Management
Service account credentials and authentication settings are automatically managed
by XDeploy during deployment. XDeploy generates the
[keystone_authtoken] section
with the correct service account, endpoint URLs, and permissions.No manual configuration is required for standard deployments.Custom Authentication Settings (Optional)
For advanced troubleshooting or custom authentication configuration, navigate to
Advanced Configuration. In the Service Tree (left panel), select watcher.
Click New File or select an existing
watcher.conf from the File Browser
(right panel).Modify the [keystone_authtoken] section in the Code Editor (center panel):/etc/xavs/config/watcher/watcher.conf
RBAC Execution Policies
The Resource Optimizer enforces role-based access control on all API operations. The default policy grants:| Operation | Required Role |
|---|---|
| Create audit | admin |
| View audit results | member, reader |
| Approve action plan | admin |
| Execute action plan | admin |
| Cancel action plan | admin |
| View action plans | member, reader |
Verify Default Policies
List active RBAC policies
Restrict Execution to Named Administrators
To restrict action plan execution to a dedicated ops team without granting fulladmin,
create a custom project-scoped role and override the policy:
Create an optimizer-operator role
/etc/xavs/watcher/policy.yaml — execution override
Restart API after policy change
API Audit Logging
Enable verbose API request logging to record who approved and executed each action plan:/etc/xavs/watcher/watcher.conf — audit logging
Follow real-time API logs
Search for execution events
TLS for API Communications
The Resource Optimizer API should be served behind the HAProxy endpoint which handles TLS termination. Verify that all client traffic reaches the API via HTTPS:Verify API endpoint (should be HTTPS in production)
[oslo_messaging_rabbit] configuration.
Rotation: Service Account Password
When rotating the Applier service account password:Update watcher.conf
Edit
/etc/xavs/watcher/watcher.conf and update the password field under
[keystone_authtoken].Validation
- Dashboard
- CLI
Navigate to Admin → Resource Optimizer → Audits. Attempt to create an audit
as a non-admin user — the action should be blocked with an authorization error.
Non-admin users cannot create audits or execute action plans.
Next Steps
Action Policies
Configure manual approval vs automatic execution policies for action plans.
Compute Integration
Verify the service account has compute permissions for live migration.
Architecture
Review which containers use the service account credentials.
Troubleshooting
Diagnose authentication failures and permission errors.