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 server | MCP server to VCF | |
|---|---|---|
| Question it answers | Who is calling this tool? | With whose permissions is VCF asked? |
| Mechanism | Service account, API key or On-Behalf-Of credentials | VCF credentials in the HTTP headers of the upstream call |
| Supplied by | The assistant, or your MCP gateway | HashiCorp Vault, your secret middleware, or the On-Behalf-Of headers of the incoming request |
| Recorded in the audit log | identity, identityType, onBehalfOf, clientAddress | identity, authSource, upstream.endpoint |
Client authentication
Every server supports all three modes, and you choose which of them to accept with AUTH_MODES.
| Mode | Header | Identity in the audit log | What the assistant can see |
|---|---|---|---|
| Service account | none, or X-MCP-On-Behalf-Of for the end-user identity | The service account, plus the end-user identity when the gateway supplies it | Whatever the role of that one account allows |
| API key | X-MCP-Api-Key | The client the key belongs to | Whatever the VCF account bound to that key allows |
| On-Behalf-Of | the credential headers below | The end user | Whatever 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
| Header | Mode | Required | Description |
|---|---|---|---|
X-MCP-Api-Key | API key | Yes, in this mode | Authenticates the calling client. This isn't a VCF credential |
X-MCP-On-Behalf-Of | Service account | No | End-user identity, recorded in the audit log. It doesn't change permissions |
X-Request-Id | All | No | Correlation identifier. The server generates one when it's absent |
User credentials per server
| Server | Headers |
|---|---|
| VCF Operations, VCF Operations advanced | X-VCF-Ops-Username, X-VCF-Ops-Password, X-VCF-Ops-Auth-Source, or X-VCF-Ops-Api-Key |
| VCF Operations for Logs | X-VCF-Logs-Username, X-VCF-Logs-Password, or X-VCF-Logs-Api-Key |
| vCenter | X-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
| Source | Configuration | What the server holds | Where the credentials rest |
|---|---|---|---|
| HashiCorp Vault | SECRET_SOURCE=vault, VAULT_ADDR, VAULT_ROLE, VAULT_PATH | Nothing. The server authenticates to Vault with its Kubernetes service account and reads the credentials for the request | In your Vault |
| Secret middleware | SECRET_SOURCE=middleware, MIDDLEWARE_URL | Nothing. A middleware service resolves the identity and injects the credential headers into the request | In the store behind your middleware |
| Request headers | SECRET_SOURCE=headers | Nothing. The credentials arrive with the request, from your gateway | Wherever 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:
- 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.
- Client API keys. Add the new key to the secret referenced by
API_KEYS_SECRETwhile 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. - On-Behalf-Of credentials. Nothing to rotate on the server. The credentials live for one request.
- Vault role and token. The server authenticates with its Kubernetes service account, so a rotated Vault token is picked up automatically.
- 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.