Allowing a programmer to have a sandbox environment and develop AL extensions for Microsoft Dynamics 365 Business Central is standard practice and generally safe, provided proper governance and access controls are in place.
Without guardrails, however, the primary risks fall into four categories:
1. Data Exposure & Privacy Leaks
- Production Data Copies: Sandboxes are most useful when copied from production. If a developer has full access to a production copy, they can view sensitive company data (payroll, customer lists, financial records, vendor pricing).
- External API Calls: An AL extension can make outbound HTTP requests (
HttpClient). A malicious or careless developer could write code that sends sandbox data to an external server, or accidentally trigger live webhooks/integrations (e.g., sending test emails to real customers or charging test credit cards if sandbox integrations aren't disconnected).
2. Business Logic & Financial Integrity Risks (When Deployed)
- Bypassing Posting Routines: In AL, developers can directly modify protected tables (like General Ledger Entries or Item Ledger Entries) using permissions (
Permissions = TableData ... = rimd). Poorly written code can corrupt financial balances or break audit trails. - Flawed Customizations: Logic errors in custom pricing, tax calculations, or inventory postings can go unnoticed during basic testing and cause financial discrepancies once moved to production.
3. Performance & Stability Degradation
- Inefficient Queries: Writing unoptimized loops, missing
SetLoadFields, or locking critical tables (LockTable) in an extension can cause severe database locks and slow down Business Central for all users when deployed. - Upgrade Conflicts: If a developer modifies standard processes heavily instead of using clean event subscribers, future Microsoft Business Central major updates may fail or break the extension.
4. Intellectual Property & Environment Management
- Source Code Loss: If the developer writes code directly against the sandbox without pushing it to a company-owned source control repository (like GitHub or Azure DevOps), you risk losing the source code if the developer leaves or the sandbox is deleted.
- Environment Sprawl & Storage: Creating multiple sandboxes copied from production consumes your tenant's database storage capacity, which can trigger overage fees or block new environment creation.
How to Mitigate These Risks
- Restrict Production Access: Give the developer full
SUPERrights in the sandbox, but restrict them to read-only or no access in the Production environment. Require a separate administrator or an automated CI/CD pipeline to deploy the.appfile to production. - Sanitize Sandbox Data: If compliance (like GDPR or SOC2) is a concern, mask sensitive data after copying production to a sandbox, or have them develop in a clean CRONUS demo sandbox.
- Disable Outbound Integrations: Immediately disable job queues, email settings, and third-party API keys (payment gateways, shipping carriers, EDI) whenever a sandbox is created from production.
- Enforce Code Reviews & Source Control: Require all AL code to be stored in a company-owned Git repository and reviewed (using AppSourceCop/CodeCop analyzers) before moving to production.
Are you setting this up for an internal developer or an external contractor, and do they need real production data to test their extensions? I can give you specific permission sets and environment configurations for your exact setup.
No comments:
Post a Comment