Skip to main content

OVH Provider

OVH .NET 10.0

Overview​

The OVH provider integrates with OVH Keys Management Service (OKMS), a secure secret storage solution hosted in OVH's European data centers. It communicates via OVH's REST API using HttpClient -- no SDK dependency required.

Key Benefits:

  • GDPR-compliant European data residency
  • Secure OAuth-based authentication
  • Fully managed encryption
  • Integration with OVH's cloud infrastructure

Installation​

Terminal
dotnet add package SecretsManager
dotnet add package SecretsManager.OVH

Configuration​

Options Reference​

OptionTypeRequiredDefaultDescription
EndpointstringYes""OVH endpoint region: ovh-eu, ovh-us or ovh-ca
ApplicationKeystringYes""OVH application key
ApplicationSecretstringYes""OVH application secret
ConsumerKeystringYes""OVH consumer key
OkmsIdstringNo""OVH OKMS ID

OVHOptions.Validate() requires Endpoint, ApplicationKey, ApplicationSecret and ConsumerKey.

Fluent API​

Program.cs
var provider = new SecretProviderBuilder()
.WithOVH(options =>
{
options.Endpoint = "ovh-eu";
options.ApplicationKey = "your-application-key";
options.ApplicationSecret = "your-application-secret";
options.ConsumerKey = "your-consumer-key";
options.OkmsId = "your-okms-id";
})
.Build();

Environment Variables​

Terminal
export SECRETS_PROVIDER=ovh
export SECRETS_OVH_ENDPOINT=ovh-eu
export SECRETS_OVH_APPLICATIONKEY=your-application-key
export SECRETS_OVH_APPLICATIONSECRET=your-application-secret
export SECRETS_OVH_CONSUMERKEY=your-consumer-key
export SECRETS_OVH_OKMSID=your-okms-id

YAML Configuration​

secretstore.yaml
provider:
ovh:
endpoint: ovh-eu
application:
key: your-application-key
application:
secret: your-application-secret
consumer:
key: your-consumer-key
okms:
id: your-okms-id

Dependency Injection (IOptions<T>)​

Bind the same settings from appsettings.json through the DI container:

var provider = new SecretProviderBuilder()
.ConfigureOVH(configuration)
.Build();
{
"SecretsManager": {
"OVH": {
"Endpoint": "ovh-eu",
"ApplicationKey": "your-application-key",
"ApplicationSecret": "your-application-secret",
"ConsumerKey": "your-consumer-key"
}
}
}

This reads from the SecretsManager:OVH section and validates all options.

Authentication​

OVH uses OAuth-based authentication. You'll need:

  1. An Application Key (UUID format)
  2. An Application Secret (UUID format)
  3. A Consumer Key (UUID format)
  4. An OKMS ID (UUID format)

Generate these from the OVH Console under Keys Management Service.

tip

Store your OVH credentials in environment variables rather than hardcoding them. Use a different API key per environment for better access control.

Usage​

// Standard ISecretProvider operations work identically
var secret = await provider.GetSecretAsync("my-secret");
await provider.PutSecretAsync("new-secret", "secret-value");
var versions = await provider.GetSecretVersionsAsync("my-secret");
await provider.DeleteSecretAsync("old-secret");