Authentication and identity

The servers always act with a VCF account, and can never show or change more than that account is allowed to. This page describes how a request is authenticated, where the credentials come from and how they're rotated.

Two credential planes

Two different things are authenticated for every tool call, and it's worth keeping them apart:

Client to MCP serverMCP server to VCF
Question it answersWho is calling this tool?With whose permissions is VCF asked?
MechanismService account, API key or On-Behalf-Of credentialsVCF credentials in the HTTP headers of the upstream call
Supplied byThe assistant, or your MCP gatewayHashiCorp Vault, your secret middleware, or the On-Behalf-Of headers of the incoming request
Recorded in the audit logidentity, identityType, onBehalfOf, clientAddressidentity, authSource, upstream.endpoint

Client authentication

Every server supports all three modes, and you choose which of them to accept with AUTH_MODES.

ModeHeaderIdentity in the audit logWhat the assistant can see
Service accountnone, or X-MCP-On-Behalf-Of for the end-user identityThe service account, plus the end-user identity when the gateway supplies itWhatever the role of that one account allows
API keyX-MCP-Api-KeyThe client the key belongs toWhatever the VCF account bound to that key allows
On-Behalf-Ofthe credential headers belowThe end userWhatever that user is allowed to see in VCF

The modes combine. A common arrangement is an API key that authenticates the gateway to the server, plus On-Behalf-Of headers that say which user the request is for.

On-Behalf-Of

In On-Behalf-Of mode the end user's VCF credentials are passed per request, in HTTP headers. The server doesn't store them, doesn't cache them and doesn't write them to any log, so a changed password or a revoked account takes effect on the next request without reinstalling or restarting anything. Two users asking the same question may receive different answers, because each request is executed with that user's own permissions.

The header names follow the pattern X-<Product>-<Field>:

Client to server

HeaderModeRequiredDescription
X-MCP-Api-KeyAPI keyYes, in this modeAuthenticates the calling client. This isn't a VCF credential
X-MCP-On-Behalf-OfService accountNoEnd-user identity, recorded in the audit log. It doesn't change permissions
X-Request-IdAllNoCorrelation identifier. The server generates one when it's absent

User credentials per server

ServerHeaders
VCF Operations, VCF Operations advancedX-VCF-Ops-Username, X-VCF-Ops-Password, X-VCF-Ops-Auth-Source, or X-VCF-Ops-Api-Key
VCF Operations for LogsX-VCF-Logs-Username, X-VCF-Logs-Password, or X-VCF-Logs-Api-Key
vCenterX-VCenter-Username, X-VCenter-Password, or X-VCenter-Api-Key

X-VCF-Ops-Auth-Source selects the VCF authentication source, for example your identity provider or the local source.

A call with On-Behalf-Of headers, as your gateway would make it:

curl --request POST https://vcf-ops-mcp.example.internal/mcp \
  --header 'Content-Type: application/json' \
  --header 'X-MCP-Api-Key: <gateway key>' \
  --header 'X-VCF-Ops-Username: [email protected]' \
  --header 'X-VCF-Ops-Password: <user password>' \
  --header 'X-VCF-Ops-Auth-Source: corporate-idp' \
  --header 'X-Request-Id: 7f3a9c12' \
  --data '{"jsonrpc":"2.0","id":1,"method":"tools/call",
           "params":{"name":"vcfops_getAlerts","arguments":{"resourceId":"a1b2"}}}'

Credentials are accepted only over TLS. They never appear in the diagnostic logs, in the metrics or in the audit log. The audit log records the identity, not the credential. In normal use the headers are set by your MCP gateway or by the secret middleware, not by the user of the assistant.

Credential sources

SourceConfigurationWhat the server holdsWhere the credentials rest
HashiCorp VaultSECRET_SOURCE=vault, VAULT_ADDR, VAULT_ROLE, VAULT_PATHNothing. The server authenticates to Vault with its Kubernetes service account and reads the credentials for the requestIn your Vault
Secret middlewareSECRET_SOURCE=middleware, MIDDLEWARE_URLNothing. A middleware service resolves the identity and injects the credential headers into the requestIn the store behind your middleware
Request headersSECRET_SOURCE=headersNothing. The credentials arrive with the request, from your gatewayWherever your gateway takes them from

In all three cases the servers keep no passwords in their configuration, in their container images or on disk, and the store holding them stays under your control. A credential is read for a request and discarded when the request ends.

Credential rotation

Rotation is yours to perform and needs no cooperation from us:

  1. VCF service account or user password. Change it in VCF and update the value in your secret store. The next request reads the new value; running servers aren't restarted and no cache has to be cleared.
  2. Client API keys. Add the new key to the secret referenced by API_KEYS_SECRET while the old one is still present, move your clients over, then remove the old key. Both keys are valid during the overlap, so no assistant loses access mid-rotation.
  3. On-Behalf-Of credentials. Nothing to rotate on the server. The credentials live for one request.
  4. Vault role and token. The server authenticates with its Kubernetes service account, so a rotated Vault token is picked up automatically.
  5. Server certificates. Replace the TLS secret and restart the pods, or let your certificate manager do it. Clients reconnect on the next call.

Permission model

The scope of data available through a server follows the access control model of the platform:

  • In service-account mode, the scope is the role of that account.
  • In On-Behalf-Of mode, the scope is the permissions of the user the request is executed for.

A server adds nothing to those permissions: it can't read or change anything the identity used for the request isn't allowed to read or change, and it never elevates a request to a more privileged account.

Read-only by permissions

What the servers can change depends entirely on the permissions of the VMware account they use: the service account, or the user's own account in On-Behalf-Of mode. If the account has a read-only role in VCF Operations, VCF Operations for Logs and vCenter, the servers can only read data: every attempt to change something is rejected by the VMware platform itself, whatever the assistant asks for.

End-user identity in service-account mode

In service-account mode the server sees one application account, which is enough for permissions but not enough for an audit trail: it doesn't say who asked. Your gateway therefore passes the end-user identity in X-MCP-On-Behalf-Of (the header name is configurable with OBO_IDENTITY_HEADER).

That identity doesn't change what the request may do, because permissions still come from the service account, but it's recorded in the audit log as onBehalfOf, so every call can be traced back to a person. Set auth.oboRequired to reject requests that arrive without it.