Chapter 4. Configure authentication for Distributed Inference with llm-d by using Red Hat Connectivity Link
Red Hat Connectivity Link provides Kubernetes-native authentication and authorization capabilities for Distributed Inference with llm-d inference endpoints when platform authentication is enabled on an LLMInferenceService. Red Hat Connectivity Link works with the gateway to intercept incoming traffic before it reaches the vLLM inference service, validating the requests based on authentication tokens and authorization policies. For more information about Red Hat Connectivity Link concepts and capabilities, see Introduction to Red Hat Connectivity Link.
This procedure applies when you enable platform authentication on LLMInferenceService resources. Red Hat Connectivity Link is not required for every Distributed Inference with llm-d deployment. To deploy without platform authentication, set security.opendatahub.io/enable-auth: "false" on the LLMInferenceService as described in Enabling authentication and authorization for an LLM inference service.
Prerequisites
- You have installed Red Hat Connectivity Link version 1.1.1 or later. For more information, see Installing Connectivity Link on OpenShift.
-
You have access to the OpenShift CLI (
oc). -
The ServiceAccount has permission to get the corresponding
LLMInferenceServiceand you have generated a JSON web token (JWT).
Procedure
Create the Kuadrant custom resource (CR) to set up required objects:
oc apply -f - <<EOF apiVersion: kuadrant.io/v1beta1 kind: Kuadrant metadata: name: kuadrant namespace: kuadrant-system EOFWait for Kuadrant to become ready:
oc wait Kuadrant -n kuadrant-system kuadrant --for=condition=Ready --timeout=10mAdd the
ServingCertannotation to the Authorino Service:oc annotate svc/authorino-authorino-authorization service.beta.openshift.io/serving-cert-secret-name=authorino-server-cert -n kuadrant-systemWait for the secret to be created:
sleep 2Update Authorino to enable SSL:
oc apply -f - <<EOF apiVersion: operator.authorino.kuadrant.io/v1beta1 kind: Authorino metadata: name: authorino namespace: kuadrant-system spec: replicas: 1 clusterWide: true listener: tls: enabled: true certSecretRef: name: authorino-server-cert oidcServer: tls: enabled: false EOFVerify that the Authorino pods are ready:
oc wait --for=condition=ready pod -l authorino-resource=authorino -n kuadrant-system --timeout 150sIf OpenShift AI was installed before installing Connectivity Link and Kuadrant, restart the controllers:
oc delete pod -n redhat-ods-applications -l app=odh-model-controller oc delete pod -n redhat-ods-applications -l control-plane=kserve-controller-manager