This plugin integrates Akeyless Secrets Management Platform with JetBrains TeamCity, allowing you to securely retrieve secrets from Akeyless during builds without storing sensitive data in TeamCity.
- Secure Secret Management: Retrieve secrets from Akeyless during builds
- Multiple Authentication Methods: Access Key, Kubernetes, AWS IAM, Azure AD, GCP, and Certificate authentication
- Remote Parameters: Use the "Remote" parameter type to query Akeyless secrets directly
- Automatic Token Management: Tokens are managed automatically per build
- All Secret Types: Works with static secrets, dynamic secrets, and rotated secrets
- Go to Administration > Plugins
- Click Browse plugins repository
- Search for "Akeyless Secrets Management"
- Install and restart TeamCity server
-
Clone this repository:
git clone https://github.com/akeyless/teamcity-akeyless-plugin.git cd teamcity-akeyless-plugin -
Build the plugin:
./gradlew build
-
The plugin ZIP file will be created at
build/distributions/akeyless-teamcity-plugin-<version>.zip -
Install the plugin in TeamCity:
- Go to Administration > Plugins
- Click Upload plugin zip
- Select the plugin ZIP file
- Restart TeamCity server
- Go to your project settings
- Navigate to Connections
- Click Add Connection
- Select Akeyless Secrets Management
- Configure the connection:
- Display Name: A name for this connection
- API URL: Your Akeyless API URL (default:
https://api.akeyless.io) - Access ID: Your Akeyless Access ID
- Authentication Method: Choose your authentication method
- Credentials: Enter the required credentials based on your authentication method
- Access ID: Your Akeyless Access ID
- Access Key: Your Akeyless Access Key
- Access ID: Your Akeyless Access ID
- K8s Auth Config Name: Kubernetes authentication config name in Akeyless
- Access ID: Your Akeyless Access ID
- Cloud identity is generated automatically from the AWS environment
- Access ID: Your Akeyless Access ID
- Cloud identity is generated automatically from the Azure environment
- Access ID: Your Akeyless Access ID
- Cloud identity is generated automatically from the GCP environment
- Access ID: Your Akeyless Access ID
- Certificate Data: Certificate in PEM format, or
- Certificate File Path: Path to certificate file on the server
Reference Akeyless secrets in your build parameters using the akeyless: prefix:
- Go to your build configuration
- Navigate to Parameters
- Click Add new parameter
- Set the parameter value to
akeyless:/path/to/secret - The secret value will be retrieved from Akeyless when the build runs
// Kotlin DSL example
params {
param("env.DATABASE_PASSWORD", "akeyless:/production/database-password")
param("env.API_KEY", "akeyless:/production/api-key")
}- When a build starts, TeamCity server authenticates with Akeyless using the configured connection credentials
- The server retrieves the requested secrets from Akeyless
- Secrets are passed to the build agent as build parameters
- Build scripts can access these secrets as environment variables or parameters
- Tokens are obtained per-build and not cached
- Credentials Storage: Authentication credentials are stored securely in TeamCity's encrypted connection storage
- Token Management: Authentication tokens are obtained per-build and not persisted
- No Secret Storage: Secrets are never stored in TeamCity; they are retrieved on-demand
- Network Security: All communication with Akeyless API uses HTTPS
- Input Validation: API URLs and secret paths are validated to prevent SSRF and path traversal
- Secret Masking: Retrieved secrets are marked as sensitive and masked in build logs
- Verify your Access ID and credentials are correct
- Check that your Akeyless authentication method has the necessary permissions
- Ensure the API URL is correct and accessible from your TeamCity server
- Verify the secret path is correct (use the full path, e.g.,
/folder/secret-name) - Check that your Akeyless credentials have permission to read the secret
- Review TeamCity server logs for detailed error messages
- Verify network connectivity between TeamCity server and Akeyless API
- Check firewall rules if applicable
- Ensure the API URL uses HTTPS
- JDK 17 or higher
- Gradle 8.0 or higher
- TeamCity 2024.12 or higher (for testing)
./gradlew buildThis plugin uses the Akeyless Java SDK. For more information, see:
Contributions are welcome! Please feel free to submit a Pull Request.
This plugin is licensed under the Apache License 2.0.
For issues and questions:
- GitHub Issues: https://github.com/akeyless/teamcity-akeyless-plugin/issues
- Akeyless Support: https://www.akeyless.io/submit-a-ticket/