Citadel Access Contracts - Quick Reference Guide
Overview
This quick reference guide provides a consistent and secure approach to managing Citadel Access Contracts for onboarding AI use cases to your APIM-based AI Gateway. It summarizes the key concepts, folder conventions, and deployment commands so you can onboard a new use case in minutes.
For the full walkthrough, parameter reference, and architecture, see the Access Contract Guide.
๐งฉ Mixed asset types: a contract can grant LLM + Tools (MCP) + Agents (A2A) in one product. Set the service
codetoTOOL/AGENTfor a single published type, orMULTIwhen mixing types (e.g.MULTI-HR-ChatAgent-DEV), and list every granted API underapiNameMapping[code].TOOL/AGENT/MULTIproducts get the asset-type-aware policy automatically. See Access contracts policy snippets.๐ One shared key, one endpoint per asset: a multi-asset contract shares a single
apiKeySecretNameacross all assets. Publish an endpoint secret per asset withassetEndpoints: [{ apiName, endpointSecretName? }](empty name auto-generates<code>-<bu>-<useCase>-<env>-<apiName>-endpoint) orpublishAllAssetEndpoints: true. SetfoundryApiNameto the LLM API so the Foundry connection targets the LLM endpoint. Pure-LLM contracts with justendpointSecretName+apiKeySecretNameare unchanged. See the service schema.
Folder Structure
Organize your access contracts by business unit, use case, and environment for clean source control and predictable deployments:
citadel-access-contracts/
โโโ main.bicep # Main orchestration template
โโโ base-contracts/
โ โโโ common/ # Base default contract (Governance Hub coordinates)
โ โโโ ai-product-policy.xml
โ โโโ main.bicepparam
โโโ contracts/ # Use-case contracts for source control
โโโ business-unit-1/
โ โโโ use-case-1/
โ โ โโโ dev/
โ โ โ โโโ ai-product-policy.xml
โ โ โ โโโ main.bicepparam
โ โ โโโ prod/
โ โ โโโ ai-product-policy.xml
โ โ โโโ main.bicepparam
โ โโโ use-case-2/
โ โโโ dev/
โ โโโ prod/
โโโ business-unit-2/
โโโ use-case-A/
โโโ ...
- ๐งฑ
base-contracts/common: Holds the base default access contract with shared Governance Hub coordinates (subscription, APIM name, and resource group of the Governance Hub deployment). Thecitadel-access-contractsfolder ships samplebase-contracts/commonfiles you can customize. - ๐ฆ
contracts/<business-unit>/<use-case>/<env>: One folder per environment, each containing amain.bicepparamand an optionalai-product-policy.xml.
Onboarding Steps
- Create the use-case contract folder: Under
contracts/, follow the<business-unit>/<use-case>pattern (e.g.,sales/assistant,hr/chat-agent). - Add an environment subfolder: Create a subfolder per environment (e.g.,
dev,test,prod). - Prepare the parameter file: Copy
main.bicepparamas a base and customize it for your use case. - Create/customize the APIM policy: Use the default policy or author a custom
ai-product-policy.xmlplaced alongside the parameter file. - Deploy using the command below.
Deployment Command
Ensure your terminal's active folder is the citadel-access-contracts folder, then deploy:
# This can be executed in CLI or through a DevOps pipeline
az deployment sub create \
--name <ACCESS-CONTRACT-NAME> \
--location <location> \
--template-file main.bicep \
--parameters contracts/<business-unit>/<use-case>/<env>/main.bicepparam
NOTE: Replace the
<...>placeholders with your specific access contract name, location, and the path to the parameters file for the desired business unit, use case, and environment.
Additional Resources
Check out the following resources for more information on access contracts and best practices: