Where Secrets are Defined
Secrets in GitHub can be defined at three different levels:Organizational Secrets
Defined on your GitHub organization and can be shared with repositories in your organization.For the free GitHub plan, organizational secrets can only be shared with public repositories.
- Shared credentials across multiple repositories
- Organization-wide Azure KeyVault access
- Common AppSource delivery credentials
Repository Secrets
Defined on individual repositories. You can define any number of secrets on the repository.If you define a secret at the repository level with the same name as an organizational secret, the repository secret overrides the organizational secret.
- Repository-specific deployment credentials
- Project-specific license files
- Code signing certificates
Environment Secrets
Defined underneath a GitHub environment and only available to workflows during deployment to that environment.For the free GitHub plan, environments (and environment secrets) are only available on public repositories.
- Production deployment credentials
- Environment-specific authentication contexts
- Isolated secrets for different deployment targets
Azure KeyVault Integration
See Azure KeyVault for detailed setup instructions.Important Information About Secrets
Before creating secrets, read these important guidelines to avoid common mistakes:Don’t Have Secrets That Are Not Secret
All secrets exposed to a repository are masked (replaced with***) in workflow logs. However, if you create a secret with a value that’s not actually secret (like “windows”), it can break AL-Go functionality.
Problem example:
Use Compressed JSON
AL-Go uses JSON structures for some secrets (like authentication contexts). When creating JSON structure secrets:
Incorrect (will break):
{ and } as separate secrets, breaking AL-Go.
Only Expose Necessary Secrets
If your GitHub organization has many organizational secrets: Configure secret access in your repository settings under “Actions secrets and variables”.List of Secrets
AL-Go for GitHub uses the following secrets:Azure_Credentials
Connect to Azure resources and KeyVault
AuthContext
Deploy to Business Central environments
AppSourceContext
Deliver apps to Microsoft AppSource
StorageContext
Deliver artifacts to Azure Storage
GitHubPackagesContext
Deliver to GitHub Packages NuGet feed
NuGetContext
Deliver to NuGet feeds
GhTokenWorkflow
Update AL-Go System Files
GitSubmodulesToken
Access private Git submodules
LicenseFileUrl
Use specific license during CI/CD
Secret Naming Convention
Many AL-Go secrets can be customized using settings to specify the secret name:Name of the secret containing the license file URL
Name of the secret containing the GitHub token for workflow modifications
Name of the secret for Admin Center API credentials
Name of the secret containing Application Insights connection string
Name of the secret containing code signing certificate URL
Name of the secret containing code signing certificate password
Name of the secret containing storage account context
Name of the secret containing AppSource delivery context
Environment-Specific Secrets
When deploying to environments, AL-Go looks for environment-specific secrets: Pattern:<EnvironmentName>_AuthContext
Examples:
Production_AuthContext- For Production environmentQA_AuthContext- For QA environmentDevelopment_AuthContext- For Development environment
AuthContext secret.
Creating Secrets in GitHub
Enter Name and Value
- Name: Use the exact name AL-Go expects
- Value: Paste the secret value (compressed JSON if applicable)
Security Best Practices
Use environment secrets for production
Use environment secrets for production
Store production credentials in environment secrets with required reviewers for additional security.
Rotate secrets regularly
Rotate secrets regularly
Regularly update secrets, especially for production environments and long-lived credentials.
Use managed identities when possible
Use managed identities when possible
For Azure resources, prefer managed identities with federated credentials over client secrets.
Limit secret scope
Limit secret scope
Only grant secrets access to repositories that need them.
Use Azure KeyVault for centralized management
Use Azure KeyVault for centralized management
Consider using Azure KeyVault for centralized secret management across multiple repositories.
Monitor secret usage
Monitor secret usage
Review workflow logs to ensure secrets are being used correctly and not exposed.
Testing Secret Configuration
After configuring secrets, test them by:- Running the appropriate workflow (CI/CD, Deploy, etc.)
- Checking workflow logs for authentication success
- Verifying that masked values appear as
***in logs - Confirming operations complete successfully
Next Steps
Explore detailed secret configuration:- GitHub Secrets - Detailed guide for each secret type
- Azure KeyVault - Using Azure KeyVault for secrets
- Basic Repository Settings - Settings for secret names