https://github.com/ovh/okms-sdk-go
The Golang SDK to interact with your OVHcloud KMS services.
https://github.com/ovh/okms-sdk-go
crypto go golang keys kms ovh sdk
Last synced: 3 months ago
JSON representation
The Golang SDK to interact with your OVHcloud KMS services.
- Host: GitHub
- URL: https://github.com/ovh/okms-sdk-go
- Owner: ovh
- License: other
- Created: 2024-09-27T13:38:29.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-04-07T12:02:53.000Z (3 months ago)
- Last Synced: 2025-04-07T12:45:25.013Z (3 months ago)
- Topics: crypto, go, golang, keys, kms, ovh, sdk
- Language: Go
- Homepage: https://help.ovhcloud.com/csm/en-ie-kms-quick-start?id=kb_article_view&sysparm_article=KB0063362
- Size: 162 KB
- Stars: 6
- Watchers: 13
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Authors: AUTHORS
Awesome Lists containing this project
README
# okms-sdk-go
[](https://pkg.go.dev/github.com/ovh/okms-sdk-go) [](https://raw.githubusercontent.com/ovh/okms-sdk-go/master/LICENSE) [](https://github.com/ovh/okms-sdk-go/actions/workflows/test.yaml) [](https://goreportcard.com/report/github.com/ovh/okms-sdk-go)
The Golang SDK to interact with your [OVHcloud KMS](https://help.ovhcloud.com/csm/en-ie-kms-quick-start?id=kb_article_view&sysparm_article=KB0063362) services.
> **NOTE:** THIS PROJECT IS CURRENTLY UNDER DEVELOPMENT AND SUBJECT TO BREAKING CHANGES.
## How to use
Add it to your project by running
```bash
go get github.com/ovh/okms-sdk-go@latest
```Then you can connect to your KMS service
```go
cert, err := tls.LoadX509KeyPair(os.Getenv("KMS_CLIENT_CERT_FILE"), os.Getenv("KMS_CLIENT_KEY_FILE"))
if err != nil {
panic(err)
}
httpClient := http.Client{
Transport: &http.Transport{TLSClientConfig: &tls.Config{
Certificates: []tls.Certificate{cert},
MinVersion: tls.VersionTLS12,
}},
}
kmsClient, err := okms.NewRestAPIClientWithHttp("https://eu-west-rbx.okms.ovh.net", &httpClient)
if err != nil {
panic(err)
}// Then start using the kmsClient
```See [examples](./examples) for more.
If you don't have any KMS service yet, you can follow the [OVHcloud KMS quick start guide](https://help.ovhcloud.com/csm/en-ie-kms-quick-start?id=kb_article_view&sysparm_article=KB0063362).
## Features
Current SDK allows you to manipulate and consume keys through the KMS REST API. Implemented operations are
- Keys and Key Pairs lifecycle:
- Create keys and key pairs
- Import keys and key pairs
- Activate and Deactivate keys and key pairs
- Update keys and key pairs
- Destroy keys and key pairs
- Update keys and key pairs metadata
- List keys and key pairs
- Export key pair's public keys
- Read keys and key pairs metadata
- Symmetric Key operations
- Encrypt / Decrypt data
- Generate data keys
- Decrypt data keys
- Assymetric Key Pair operations
- Sign / Verify data