MD.ai

Model Security

How MD.ai isolates model code from your data and the network

Models run code you or others upload, so MD.ai runs them in isolation.

Build. Your package contains only your code, weights and the .mdai interface files. MD.ai builds them into a container image, adding the model server that receives inputs and returns outputs. Label mappings are configured in MD.ai and passed to the model at run time.

Network isolation. Model containers run in their own Kubernetes namespace, mdai-models. Their default network policy:

  • accepts inbound requests only from MD.ai's own services, which send the inputs for inference;
  • blocks all outbound connections, so model code can't send data to the internet or reach other services.

The one exception is language models from the Model Registry, which can reach specific internet services through controlled proxies. Models you upload never can.

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: models-network-policy-default
  namespace: mdai-models
spec:
  podSelector:
    matchLabels:
      app: model
  policyTypes:
    - Ingress
    - Egress
  ingress:
    - from:
        - namespaceSelector:
            matchLabels:
              kubernetes.io/metadata.name: mdai-apps
          podSelector:
            matchLabels:
              app: dicom-worker
        - namespaceSelector:
            matchLabels:
              kubernetes.io/metadata.name: mdai-apps
          podSelector:
            matchLabels:
              app: api
  egress: []

Access. Who can see, run, export and clone a model is controlled by its settings and users' project roles.