topic hubAL Developmentofficial - Microsoftunreviewed - model text not yet checked

Handling security

Security handling in AL for Business Central: security best practices, permission sets and entitlements, Azure Key Vault for app secrets, Isolated Storage, and the SecretText data type. It answers questions on access control, secrets management, and protecting credentials in extensions.

Path: Development > Programming in the AL language > Handling security · tier official · system development · narrative unreviewed (model text not yet checked)

Overview

This section covers how AL developers secure Business Central apps. It starts with a general guide on security best practices, which describes a layered security model and covers authentication, authorization, auditing, encryption, and secrets management.

The rest of the pages go deeper on two areas. Access control is covered by the permission sets and entitlements subtopic, which explains how to define and compose permission objects. Secrets handling is covered by Azure Key Vault for app secrets, Isolated Storage, and the SecretText data type. These protect values such as credentials in storage, at retrieval, and during debugging.

Start with the security overview for the big picture. Then go to permission sets and entitlements for authorization work, or to Key Vault, Isolated Storage, and SecretText when your extension handles secrets.

Key points

  • The security overview for AL developers covers the security development lifecycle, a layered security model, user session and web service authentication, entitlements, and permission sets.
  • Permission sets and entitlements are defined as AL objects. They can be composed and extended, given object permissions and inherent permissions, exported to XML, and upgraded to AL-based permissions.
  • Permission telemetry can be monitored to troubleshoot access control.
  • Azure Key Vault for app secrets can be set up for both online and on-premises. Secrets are read from AL code, and the setup involves app.json and permissions.
  • Key retrieval from Azure Key Vault can be monitored with telemetry.
  • Isolated Storage keeps keys and values private to an extension. It offers the Set, Get, Contains, Delete, and SetEncrypted methods and uses the DataScope option type.
  • The SecretText data type prevents credentials from being exposed while debugging in AL. It restricts assignments to debuggable types.
  • SecretText works with HttpClient and SecretStrSubstNo, and the Unwrap method and NonDebuggable attribute are part of the topic.

Subtopics

More Learn pages

Videos, posts and code changes

Linked by a Haiku matcher with a grounding quote from the item’s summary (link/topics.ts); machine-generated.

Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.

What Learn documents here 8 of 22 Learn pages

Show 14 more