Skip to content

REST API Token Configuration

Overview

EPMware Agents use REST API tokens for secure authentication with the EPMware application. This token-based approach eliminates the need to store passwords and provides a secure method for agent-to-application communication.

Understanding REST Tokens

What is a REST API Token?

A REST API token is a 36-character alphanumeric string that serves as a unique identifier for authentication. The agent uses this token to:

  • Authenticate with the EPMware application
  • Poll for pending deployment tasks
  • Report deployment status and results
  • Maintain secure communication

Token Format

EPMware tokens follow the UUID format:

2e6d4103-5145-4c30-9837-ac6d14797523

Security Benefits

  • No Password Storage - Tokens eliminate password storage in configuration files
  • Revocable Access - Tokens can be revoked without changing passwords
  • Audit Trail - All token usage is logged for security auditing
  • Limited Scope - Tokens have specific permissions unlike full user credentials

Generating a REST Token

Prerequisites

Before generating a token: - [ ] Have administrator access to EPMware - [ ] Created a dedicated user account for the agent - [ ] Assigned appropriate permissions to the user

Step-by-Step Token Generation

Step 1: Navigate to User Management

  1. Log into the EPMware application
  2. Navigate to AdministrationSecurityUsers

User Management
User Management screen in EPMware

Step 2: Select the Agent User

  1. Locate the user account designated for agent operations
  2. Common naming conventions:
  3. svc_epmware_agent
  4. agent_[servername]
  5. epmware_service

Dedicated Service Account

Always use a dedicated service account for the agent rather than personal user accounts. This ensures continuity and proper audit trails.

Step 3: Generate Token

  1. Right-click on the user record
  2. Select Generate Token from the context menu

Generate Token Menu
Right-click menu showing Generate Token option

Step 4: Copy and Save Token

  1. The token will be displayed in a dialog box
  2. Important: Copy the token immediately - it won't be shown again
  3. Store the token securely

Token Generated
Token generation dialog - copy this token immediately

User Account Setup

Creating an Agent User

If you haven't created a dedicated user for the agent:

  1. Click Add User in the User Management screen
  2. Configure the user with these recommended settings:
Field Recommended Value
Username svc_epmware_agent
Full Name EPMware Agent Service
Email epmware-agent@company.com
User Type Service Account
Password Never Expires ✓ Checked
Account Enabled ✓ Checked

Required Permissions

The agent user needs specific permissions:

Minimum Permissions

  • Application Access - Read access to target applications
  • Deployment Rights - Execute deployment tasks
  • API Access - REST API usage permission
Permission Purpose
Import Metadata Import hierarchies from target applications
Deploy Metadata Deploy approved changes to targets
View Requests Access deployment queue
View Logs Read deployment logs
Execute Scripts Run deployment scripts

Security Class Assignment

Assign the agent user to appropriate security classes:

-- Example security configuration
GRANT epmware_agent_role TO svc_epmware_agent;
GRANT deployment_executor TO svc_epmware_agent;
GRANT api_access TO svc_epmware_agent;

Token Management

Token Storage

Store tokens securely:

Do's

  • ✓ Store in encrypted configuration management systems
  • ✓ Use environment variables for sensitive data
  • ✓ Implement file system permissions
  • ✓ Keep backup in secure password manager

Don'ts

  • ✗ Never commit tokens to version control
  • ✗ Avoid storing in plain text files
  • ✗ Don't share tokens between environments
  • ✗ Never expose tokens in logs or error messages

Token Rotation

Implement regular token rotation for security:

Rotation Schedule

Environment Rotation Frequency
Production Every 90 days
UAT/Test Every 180 days
Development As needed

Rotation Process

  1. Generate New Token
  2. Create new token in EPMware
  3. Note generation timestamp

  4. Update Configuration

    # Update agent.properties
    ew.portal.token=new-token-value-here
    

  5. Restart Agent

  6. Stop the agent service
  7. Update configuration file
  8. Start the agent service

  9. Verify Operation

  10. Check agent logs for successful authentication
  11. Monitor first deployment after rotation

  12. Revoke Old Token

  13. Wait 24 hours to ensure stability
  14. Revoke previous token in EPMware

Token Revocation

To revoke a compromised or expired token:

  1. Navigate to AdministrationSecurityUsers
  2. Right-click on the user
  3. Select Revoke Token
  4. Confirm revocation

Revoke Token
Revoking an existing token

Immediate Effect

Token revocation takes effect immediately. Ensure you have a replacement token ready before revoking the active one.

Using the Token

Configuration File

Add the token to your agent.properties file:

# REST API Token Configuration
ew.portal.token=2e6d4103-5145-4c30-9837-ac6d14797523

Environment Variables

For enhanced security, use environment variables:

# Set environment variable
export EPMWARE_TOKEN=2e6d4103-5145-4c30-9837-ac6d14797523

# Reference in agent.properties
ew.portal.token=${EPMWARE_TOKEN}

Testing Token Authentication

Verify token validity before starting the agent:

# Test authentication
curl -H "Authorization: Bearer YOUR-TOKEN-HERE" \
     https://epmware-server.com/api/v1/auth/verify

# Expected response
{"status": "authenticated", "user": "svc_epmware_agent"}

Troubleshooting Token Issues

Common Problems

Issue Cause Solution
Authentication Failed Invalid or expired token Generate new token
Permission Denied Insufficient user permissions Review user security settings
Token Not Accepted Wrong environment Verify server URL matches token
Intermittent Failures Token rate limited Implement retry logic

Validation Checklist

  • [ ] Token is exactly 36 characters
  • [ ] No extra spaces or characters
  • [ ] Token matches the server environment
  • [ ] User account is active
  • [ ] User has required permissions
  • [ ] Token hasn't been revoked

Debug Authentication

Enable debug logging to troubleshoot:

# Add to agent.properties
agent.log.level=DEBUG
agent.log.auth=true

Check logs for authentication details:

tail -f logs/agent.log | grep AUTH

Security Best Practices

Token Security Guidelines

  1. Principle of Least Privilege
  2. Grant only necessary permissions
  3. Use separate tokens per environment
  4. Implement role-based access control

  5. Token Lifecycle Management

  6. Document token creation/rotation dates
  7. Maintain token inventory
  8. Implement automated rotation reminders

  9. Monitoring and Auditing

  10. Monitor token usage patterns
  11. Alert on authentication failures
  12. Review audit logs regularly

  13. Incident Response

  14. Have revocation procedures ready
  15. Maintain emergency token replacement process
  16. Document security incident procedures

Compliance Considerations

Ensure token management meets compliance requirements:

  • SOX: Implement separation of duties
  • PCI-DSS: Encrypt tokens at rest and in transit
  • GDPR: Include tokens in data protection policies
  • HIPAA: Ensure tokens meet security rule requirements

Multi-Environment Token Management

Environment Separation

Use different tokens for each environment:

# Development
ew.portal.token.dev=dev-token-value

# Test/UAT
ew.portal.token.uat=uat-token-value

# Production
ew.portal.token.prod=prod-token-value

Token Naming Convention

Implement consistent naming: - [environment]-[application]-[purpose]-token - Example: prod-hfm-deploy-token

API Token vs User Credentials

Comparison

Aspect API Token User Credentials
Security Higher (limited scope) Lower (full access)
Management Easier to rotate Requires password changes
Audit Clear service attribution Mixed with user activity
Automation Designed for automation Not recommended
Revocation Instant and specific Affects all user access

Next Steps

After configuring your REST token:

  1. Update Agent Properties with the token
  2. Test the Connection to verify authentication
  3. Configure Service startup settings
  4. Monitor Agent Logs for authentication status