Managing API Keys
with Secret Server
This interactive training guide walks you through using Delinea Secret Server to securely store, create, and manage API keys using the Secrets Template framework. Complete all modules to earn your certification.
Template Creation
Build a reusable Secrets Template tailored for API key metadata and rotation.
Key Management
Create, view, rotate, and revoke API key secrets following security policies.
Access Control
Configure permissions, approvals, and audit trails for API key access.
- Explain what Secret Server Secrets Templates are and why they are used
- Create a custom Secrets Template for API key storage
- Add, view, and rotate API key secrets within Secret Server
- Configure folder permissions and approval workflows
- Apply security best practices for API key lifecycle management
Secret Server Basics
Before creating templates and secrets, it is essential to understand how Secret Server structures its data and why API keys need special handling.
What is Secret Server?
Enterprise Privileged Access Management platform
Delinea Secret Server is a Privileged Access Management (PAM) solution that provides a centralized, secure vault for managing sensitive credentials โ including passwords, certificates, SSH keys, and API tokens.
Core concepts you need to know:
- Secrets โ Individual credential records (e.g., a specific API key)
- Secret Templates โ Blueprints that define the fields a Secret contains
- Folders โ Organizational containers with inherited permissions
- Policies โ Rules controlling access, checkout, and expiration
Why Store API Keys in Secret Server?
The risks of unmanaged API credentials
Secret Server provides these protections for API keys:
- Encrypted at rest (AES-256) and in transit (TLS)
- Full audit trail of every access and modification
- Role-based access control โ only authorized users can view keys
- Automated rotation and expiration enforcement
- Secret checkout with optional approval workflows
How Secrets Templates Work
Field definitions and data types
A Secret Template defines the schema of a secret โ what fields it contains, their data types, and which fields are treated as passwords (masked and encrypted separately).
For API keys, you will create a template that captures: the key name, the secret key value, the associated service/environment, expiration date, and other metadata relevant to your organization.
Creating a Secrets Template
A Secrets Template is the foundation for every API key you store. This module walks through building a purpose-built template for API key management.
Navigate to Template Management
Locate the Secret Templates settings panel
To access the Secret Templates manager, follow this navigation path:
Admin (โ๏ธ top right) โ Secret Templates โ + Create New
Configure Template Fields
Define the fields your API key template will contain
Give the template a clear name such as API Key - Generic or API Key - [Service Name]. Then add the following recommended fields:
Set Template Expiration & Heartbeat
Configure automated expiration and health checking
On the Security tab of your template settings, configure these options:
Require Check-Out: Yes
Check-Out Interval: 30 minutes
Heartbeat Enabled: Yes # only if API supports validation
Click Save to finalize your template. It will now be available when creating new secrets.
Creating an API Key Secret
With your template defined, you are ready to create actual API Key secrets. This module covers the complete creation workflow.
Navigate to the Target Folder
Organize secrets in the correct folder before creation
Secrets should always be created inside the appropriate organizational folder, not at the root level. Navigate to:
๐ IT Security
๐ API Keys
๐ Production
๐ Development
๐ Third-Party Services
If the folder does not exist, create it and set appropriate permissions before adding secrets to it.
Create a New Secret
Fill in the template fields with your API key data
Click the + Create Secret button and select your API Key - Generic template. Fill in all fields:
API Key: โขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโข # paste actual key, will be masked
Service: Stripe
Environment: Production
API Base URL:https://api.stripe.com
Expiration: 2025-12-31
Owner: jane.doe@company.com
Notes: Used by payment-service microservice
Save and Verify
Confirm the secret was created correctly
After clicking Save, verify the secret was created correctly by checking:
- Secret appears in the correct folder with proper name
- API Key field shows as masked (โขโขโขโขโขโขโขโข) in the view
- All template fields are populated with correct data
- Expiration date is set and visible in the secret header
- Audit log shows the creation event under Secret Audit tab
Managing API Keys
Effective API key management goes beyond creation. This module covers viewing, editing, rotating, and revoking API keys across their full lifecycle.
Viewing & Checking Out a Secret
Accessing a key with proper checkout controls
If checkout is required on the secret's folder or policy, you must check it out before viewing the API key value:
1. Open the Secret โ Click Check Out
2. Optionally enter a reason (required if configured)
3. Click the ๐ eye icon next to the API Key field
4. Use the key value for your task
5. Click Check In when done
Rotating an API Key
Updating the key value when a new key is issued
API key rotation should occur on a schedule or whenever a key is suspected of being compromised. To rotate a key:
1. Generate a new API key from the third-party service
2. Open the Secret in Secret Server
3. Click Edit โ update the API Key password field
4. Update Expiration Date to reflect new key lifetime
5. Add a rotation note in the Notes field
6. Click Save
7. Revoke/delete the old key from the third-party service
Deactivating or Deleting a Secret
Retiring keys that are no longer needed
When an API key is no longer needed or has been revoked at the source:
- Deactivate โ Hides the secret from active views but retains it for audit purposes. Preferred for compliance.
- Delete โ Permanently removes the secret. Only use if retention policies allow it.
Open Secret โ Edit โ Scroll to bottom โ Toggle Active to OFF โ Save
Access & Permissions
Controlling who can see and use API keys is just as important as storing them securely. This module covers folder permissions, approval workflows, and audit access.
- View โ Can see the secret exists, but cannot view field values
- Edit โ Can modify metadata and non-password fields
- Owner โ Full control: edit, delete, share, and view all fields
- List โ Can see the folder/secret in navigation only
- Inherit โ Permissions cascade from parent folder (recommended)
Setting Folder Permissions
Grant access at the folder level for inherited control
Right-click Folder โ Edit Folder โ Folder Permissions tab
# Add a group
+ Add Group/User โ Search for group โ Select permission level
# Example setup
DevOps-Team: View # can read keys
SecOps-Admins: Owner # can manage all secrets
Auditors: List # can see structure only
Configuring Approval Workflows
Require manager sign-off before access is granted
For high-sensitivity API keys (production credentials, financial APIs), enable approval workflows on the secret or folder policy:
Admin โ Secret Policies โ Edit Policy
โ Requires Approval for Access: Enabled
โ Approvers: [Security Team group]
โ Approve for: 1 hour
Users who need access will submit an access request. Designated approvers receive an email notification and can approve or deny in the web UI.
Reading the Audit Trail
Monitor who accessed your API keys and when
Every secret has its own audit log. To view it:
The audit log captures: views, edits, failed access attempts, checkout events, and approval requests โ with user, timestamp, and IP address for each event.
Best Practices for API Key Security
Following these guidelines ensures your team maintains a strong security posture around API key management throughout the credential lifecycle.
- One key per purpose โ Never reuse a single API key across multiple applications or environments
- Minimum required scopes โ Configure API keys with only the permissions the application actually needs
- Rotate on a schedule โ Rotate production API keys at least every 90 days, or per your key provider's recommendation
- Rotate immediately on compromise โ If a key is ever exposed (code repo, log file, email), rotate it immediately and audit access
- Never log key values โ Ensure applications and log aggregators do not record API key values in plain text
- Use Secret Server SDK/API โ Applications should retrieve keys programmatically from Secret Server instead of using static config files
- Review access quarterly โ Audit folder permissions and remove access for users who no longer need it
- Document every key โ All template fields should be fully populated, especially service, environment, owner, and notes
Knowledge Check
Answer these questions to demonstrate your understanding of API key management with Secret Server. Click an option to submit your answer.