Managing Admission and Exit for AI Services in the Public Sector
This article explains how public-sector organizations can govern generative AI services across their full lifecycle, from admission and daily operation to retirement. It covers the main supply chain risks, a reference architecture that routes model calls through a unified gateway, a six-step implementation process, a Python example of an admission check, and common mistakes to avoid.
1. Background: New Risks When AI Services Enter an Organization
Generative AI services are gradually entering government, research, critical infrastructure, and defense-related business scenarios. They can improve efficiency in document processing, code assistance, and information retrieval. However, they also bring the compliance status of model providers, data flows, service availability, and security policies into the organization’s risk scope.
An upstream service may be restricted because of policy changes, compliance reviews, or contract changes. If a business system that depends on the service has no alternative path designed in advance, it can be interrupted within a short time. For this reason, organizations should treat AI services as supply chain assets that require long-term governance, not as general-purpose software bought once.
Supply chain risks usually fall into three categories:
- Availability risk: the service is restricted, degraded, or discontinued.
- Compliance risk: data cross-border transfer, retention periods, or usage scope do not meet regulatory requirements.
- Cascading risk: a problem in one service affects other systems through interfaces, plugins, or data pipelines.
2. Balancing Ethics and Security
AI ethics and national security do not have to be a choice between two options. At the technical level, both rest on the same foundations: traceability, explainability, and controllability.
In practice, organizations typically focus on the following areas:
- Data sovereignty: define which data may be sent to external models and which data must stay local or in a controlled environment.
- Traceable outputs: record model version, call time, caller, and input and output summaries to support audits after the fact.
- Bias and safety evaluation: before admitting a service, assess output quality and the ability to block harmful content using the organization’s own test sets.
- Human review: in high-risk scenarios such as legal, medical, personnel, and security decisions, treat model output as assistance only, and have a person confirm the final conclusion.
Ethical standards provide the criteria for judgment, and security engineering turns those criteria into enforceable rules. Without both, a governance framework is unlikely to work in practice.
3. Reference Architecture: Bringing Model Calls Under Unified Governance
We recommend placing a unified gateway layer between business systems and model services. The gateway handles the following responsibilities:
- Service registry: records each model service’s identifier, deployment region, risk level, approval status, and the highest data classification it may process.
- Policy engine: decides whether to allow or reject a request based on the request’s data classification, the caller’s identity, and the service status.
- Usage and quota control: limits the number of calls per unit of time and the input length per call to prevent bulk data leakage.
- Audit logging: writes call results to a logging service and connects them to monitoring and alerting, so abnormal call patterns receive a timely response.
- Fallback and switching: when a service is deactivated, the gateway can automatically route traffic to an approved alternative service.
With this structure, business code depends only on the gateway interface, not on any specific service. When a service needs to be replaced, changes are concentrated in the registry and policy configuration, which greatly reduces the cost of modifying business-side systems.
4. Implementation Steps
4.1 Asset Inventory
Start by listing all systems in the organization that use AI capabilities. This includes explicit calls, such as dedicated question-answering applications, and implicit calls, such as plugins in office software or features embedded in third-party platforms. For each item, record the owner, data types, call frequency, and alternative options. The inventory is the foundation for all later decisions. Systems that are missed often cause the first problems when services are switched.
4.2 Risk Classification
Classify services according to data classification and business impact. For example, a service that only processes public materials can be classified as low risk. A service that handles internal sensitive information is medium risk. A service that involves personal privacy or key business decisions is high risk. The classification determines how strict the admission approval must be and which data ranges the service may access.
4.3 Admission Approval
The admission process should include four stages: security assessment, compliance review, confirmation of the data processing agreement, and pilot validation. After approval, the service information is written to the registry with a validity period. When the validity period expires, the service must be reassessed so that approval conclusions do not remain in effect indefinitely.
4.4 Runtime Control
Runtime control depends on gateway policies. Typical rules include:
- reject call requests to services that have not been approved;
- reject requests whose data classification is higher than the service’s permitted maximum;
- set call quotas for individual users or applications;
- mask or block sensitive fields in the input.
4.5 Deactivation and Migration
Service deactivation should not depend on notifying each affected team by hand. The correct approach is to change the service status to “deactivated” in the registry. The gateway then rejects new requests and triggers the migration process. The migration process includes the following steps:
- Identify all systems that depend on the service.
- Confirm that the alternative service has passed admission approval.
- Complete regression validation in a test environment.
- Switch traffic in batches and monitor the metrics.
- Archive historical logs, and delete or retain related data according to the retention policy.
During migration, the output quality of the alternative service may differ from the original. For critical business processes, we recommend a period of parallel operation to compare the output differences between the two services before deciding on a full switch.
4.6 Emergency Response Plan
An emergency response plan should define three things: who has the authority to issue a deactivation order, which team is responsible for switching services after deactivation, and how the business will keep running without AI assistance. For high-risk scenarios, prepare manual processing procedures in advance so that business continuity does not depend on a single service.
5. Policy Code Example
The following illustrative code shows the basic admission logic in the gateway. A real system should integrate with the organization’s identity authentication, approval workflow, and configuration center.
from dataclasses import dataclassfrom enum import Enumclass DataLevel(Enum):PUBLIC = 1INTERNAL = 2CONFIDENTIAL = 3@dataclassclass ModelService:service_id: strapproved: boolmax_data_level: DataLeveldef can_invoke(service: ModelService, request_level: DataLevel) -> bool:"""The service must be in the approved state, and the request's data level must not exceed the service's maximum allowed level."""if not service.approved:return Falsereturn request_level.value <= service.max_data_level.valuedef deactivate(service: ModelService) -> None:"""After deactivation, all subsequent requests are rejected by can_invoke."""service.approved = Falseif __name__ == "__main__":svc = ModelService("model-a", approved=True, max_data_level=DataLevel.INTERNAL)print(can_invoke(svc, DataLevel.INTERNAL)) # Trueprint(can_invoke(svc, DataLevel.CONFIDENTIAL)) # Falsedeactivate(svc)print(can_invoke(svc, DataLevel.PUBLIC)) # False
The main point of this code is that the decision about whether a call is allowed is concentrated in one function. The approval status and the maximum data level are set through configuration, so the code itself does not hard-code information about any specific service.
6. Common Mistakes
Mistake 1: Treating AI services as ordinary SaaS purchases. AI service output is uncertain, and call content may include sensitive data. For this reason, AI services require more detailed auditing and classification than ordinary software.
Mistake 2: Only building on/off switches inside business systems. If each business system decides on its own whether to make a call, a deactivation order must be implemented separately in each system, and some systems are easily missed. A unified gateway concentrates the control point.
Mistake 3: Assuming a backup option makes the system foolproof. Alternative services also need admission approval and validation. A switch that has not been tested may expose interface differences or output quality problems at a critical moment.
Mistake 4: Ignoring logging compliance requirements. Audit logs serve traceability, and they must also comply with data protection and retention rules. Logs should not store complete sensitive inputs. Storing only summaries and hash values is sufficient.
7. Implementation Recommendations
Organizations can proceed in the following order: complete the asset inventory and risk classification first, then build the unified gateway and service registry, then define the admission and deactivation processes, and finally test the emergency response plan through drills. Each stage should have a clear owner and acceptance metrics, such as the interception success rate for blocked calls, the time required to switch services, and the completeness of audit logs.
Governance of AI services is not a one-time project. It requires continuous adjustment as regulatory requirements, service forms, and business needs change. Including admission, operation, and exit in the organization’s technical systems keeps business stable when services change.
