Protect your deployment briefs, credentials, and user data with comprehensive security practices.
DeployBrief implements multiple layers of security to protect your data, credentials, and infrastructure. This guide covers essential security practices for authentication, authorization, data protection, and monitoring.
Build: Read - Read build/release dataCode: Read - Access repository information (if needed)Full Access or Agent Pools: Read & manageDeployBrief encrypts PATs at rest using:
Never commit PATs to source control. Use User Secrets for local development, environment variables or Azure Key Vault for production.
If a PAT is exposed:
Always use the principle of least privilege when creating API keys:
// Good: Scoped for specific operations
{
"name": "CI/CD Pipeline Key",
"scopes": ["briefs:write"],
"expiresInDays": 90
}
// Bad: Excessive permissions
{
"name": "CI/CD Pipeline Key",
"scopes": ["briefs:read", "briefs:write", "briefs:delete",
"connections:read", "presets:read"],
"expiresInDays": 365
}briefs:read - Read briefs onlybriefs:write - Create and update briefsbriefs:delete - Delete briefs (use sparingly)connections:read - List Azure DevOps connectionspresets:read - List pipeline presetsStore API keys securely in CI/CD systems:
GitHub Actions
# Settings → Secrets and variables → Actions
DEPLOYBRIEF_API_KEY: your-api-key-hereAzure Pipelines
# Pipelines → Library → Variable Groups
DEPLOYBRIEF_API_KEY: your-api-key-here (set as secret)Rotate API keys every 90 days or when:
Rotation process:
DeployBrief uses Microsoft Entra ID (Azure AD) for user authentication:
DeployBrief implements workspace-level RBAC:
Owner
Admin
Member
Store sensitive configuration in Azure Key Vault:
// appsettings.json
{
"AzureKeyVault": {
"VaultUri": "https://deploybrief-kv.vault.azure.net/"
}
}
// Access in code
var dbConnectionString = configuration["ConnectionStrings:DeployBrief"];
// Retrieved securely from Key Vaultsk-***xyzDeployBrief logs all security-relevant events to the audit_log table:
CREATE TABLE audit_log (
id SERIAL PRIMARY KEY,
timestamp TIMESTAMPTZ DEFAULT NOW(),
user_id INTEGER REFERENCES users(id),
workspace_id INTEGER REFERENCES workspaces(id),
action VARCHAR(100) NOT NULL,
resource_type VARCHAR(50),
resource_id INTEGER,
details JSONB,
ip_address VARCHAR(45),
user_agent VARCHAR(500)
);-- Recent API key creations
SELECT * FROM audit_log
WHERE action = 'api_key.created'
ORDER BY timestamp DESC LIMIT 10;
-- Connection activity for a user
SELECT * FROM audit_log
WHERE user_id = 123 AND resource_type = 'ado_connection'
ORDER BY timestamp DESC;Protect against abuse with rate limits:
// Program.cs
builder.Services.AddCors(options => {
options.AddPolicy("AllowUI", policy => {
policy.WithOrigins("https://deploybrief.com")
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials();
});
}});If a security incident occurs: