Comprehensive guide to View's encryption key management system, including secure key generation, storage, and cryptographic operations for data protection.
Overview
The View Encryption Keys management system provides comprehensive cryptographic key management for secure data protection. Encryption keys contain the essential cryptographic material including encryption keys, initialization vectors (IVs), and salt values used for encrypting and decrypting sensitive data within the View platform.
Key Features
- Secure Key Storage: Store encryption keys with Base64 and hexadecimal encoding formats
- Cryptographic Components: Complete key material including keys, IVs, and salt values
- Multi-Format Support: Keys available in both Base64 and hexadecimal formats for flexibility
- Tenant Isolation: Encryption keys are isolated per tenant for enhanced security
- Owner Management: Associate encryption keys with specific users for access control
- Metadata Support: Comprehensive naming and description capabilities for key organization
- Audit Trail: Creation timestamps for compliance and tracking purposes
- Secure Operations: Full lifecycle management with secure creation, retrieval, and deletion
Supported Operations
- Create: Generate new encryption keys with complete cryptographic material
- Read: Retrieve encryption key configurations and metadata
- Enumerate: List all encryption keys with pagination support
- Update: Modify encryption key properties and metadata
- Delete: Securely remove encryption keys from the system
- Existence Check: Verify encryption key presence without retrieving details
API Endpoints
Encryption keys are managed via the Configuration server API at [http|https]://[hostname]:[port]/v1.0/tenants/[tenant-guid]/encryptionkeys
Supported HTTP Methods: GET
, HEAD
, PUT
, DELETE
Encryption Key Object Structure
Encryption key objects contain comprehensive cryptographic material for secure data operations. Here's the complete structure:
{
"GUID": "c3c8b73d-859b-48a2-bfaf-511e83423585",
"TenantGUID": "00000000-0000-0000-0000-000000000000",
"OwnerGUID": "00000000-0000-0000-0000-000000000000",
"KeyBase64": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"KeyHex": "0000000000000000000000000000000000000000000000000000000000000000",
"IvBase64": "AAAAAAAAAAAAAAAAAAAAAA==",
"IvHex": "00000000000000000000000000000000",
"SaltBase64": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"SaltHex": "0000000000000000000000000000000000000000000000000000000000000000",
"Name": "Another default key",
"Description": "Another default key",
"CreatedUtc": "2025-03-29T08:38:38.457116Z"
}
Field Descriptions
- GUID (GUID): Globally unique identifier for the encryption key object
- TenantGUID (GUID): Globally unique identifier for the tenant
- OwnerGUID (GUID): Globally unique identifier for the key owner
- Name (string): Display name for the encryption key
- Description (string): Human-readable description of the encryption key
- CreatedUtc (datetime): UTC timestamp when the key was created
- KeyBase64 (string): Encryption key encoded in Base64 format
- IvBase64 (string): Initialization Vector (IV) encoded in Base64 format
- SaltBase64 (string): Salt value encoded in Base64 format
- KeyHex (string): Encryption key encoded in hexadecimal format
- IvHex (string): Initialization Vector (IV) encoded in hexadecimal format
- SaltHex (string): Salt value encoded in hexadecimal format
Security Notes
- Key Material: All cryptographic components (key, IV, salt) are provided in both Base64 and hexadecimal formats for maximum compatibility
- Tenant Isolation: Encryption keys are strictly isolated per tenant for enhanced security
- Owner Association: Keys are associated with specific users for access control and audit purposes
- Secure Storage: All key material is stored securely within the View platform
- Format Flexibility: Use either Base64 or hexadecimal format based on your application requirements
Create Encryption Key
Creates a new encryption key with comprehensive cryptographic material using PUT /v1.0/tenants/[tenant-guid]/encryptionkeys
. This endpoint allows you to generate and store encryption keys with complete cryptographic components including keys, initialization vectors, and salt values.
Request Parameters
Required Parameters
- KeyBase64 (string, Body, Required): Encryption key encoded in Base64 format
- KeyHex (string, Body, Required): Encryption key encoded in hexadecimal format
- IvBase64 (string, Body, Required): Initialization Vector (IV) encoded in Base64 format
- IvHex (string, Body, Required): Initialization Vector (IV) encoded in hexadecimal format
- SaltBase64 (string, Body, Required): Salt value encoded in Base64 format
- SaltHex (string, Body, Required): Salt value encoded in hexadecimal format
Optional Parameters
- Name (string, Body, Optional): Display name for the encryption key
- Description (string, Body, Optional): Human-readable description of the encryption key
Important Security Notice
CRITICAL: Encryption keys contain sensitive cryptographic material. Ensure proper security measures are in place when handling and storing these keys. All key material is provided in both Base64 and hexadecimal formats for maximum compatibility with different cryptographic libraries and applications.
curl --location --request PUT 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/encryptionkeys' \
--header 'content-type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"KeyBase64": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"KeyHex": "0000000000000000000000000000000000000000000000000000000000000000",
"IvBase64": "AAAAAAAAAAAAAAAAAAAAAA==",
"IvHex": "00000000000000000000000000000000",
"SaltBase64": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"SaltHex": "0000000000000000000000000000000000000000000000000000000000000000",
"Name": "Another default key",
"Description": "Another default key"
}'
import { ViewConfigurationSdk } from "view-sdk";
const api = new ViewConfigurationSdk(
"http://localhost:8000/", //endpoint
"default", //tenant Id
"default" //access key
);
const createEncryptionKeys = async () => {
try {
const response = await api.EncryptionKey.create({
KeyBase64: "*********************************AA=",
KeyHex:
"************************************************000",
IvBase64: "**********************A==",
IvHex: "***************************000",
SaltBase64: "***************************************AA=",
SaltHex:
"********************************************************000",
Name: "Another default key ash test",
Description: "Another default key",
});
console.log(response, "Encryption keys created successfully");
} catch (err) {
console.log("Error creating Encryption keys:", err);
}
};
createEncryptionKeys();
import view_sdk
from view_sdk import configuration
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def createEncryptionKey():
encryptionKey = configuration.EncryptionKey.create(
KeyBase64="*********************************AA=",
KeyHex="************************************************000",
IvBase64="**********************A==",
IvHex="***************************000",
SaltBase64="***************************************AA=",
SaltHex="********************************************************000",
Name="Another default key",
Description="Another default key"
)
print(encryptionKey)
createEncryptionKey()
using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
EncryptionKey request = new EncryptionKey
{
KeyBase64 = "*********************************AA=",
KeyHex = "************************************************000",
IvBase64 = "**********************A==",
IvHex = "***************************000",
SaltBase64 = "***************************************AA=",
SaltHex = "********************************************************000",
Name = "Another default key test",
Description = "Another default key",
};
EncryptionKey response = await sdk.EncryptionKey.Create(request);
Response
Returns the created encryption key object with all cryptographic material:
{
"GUID": "c3c8b73d-859b-48a2-bfaf-511e83423585",
"TenantGUID": "00000000-0000-0000-0000-000000000000",
"OwnerGUID": "00000000-0000-0000-0000-000000000000",
"KeyBase64": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"KeyHex": "0000000000000000000000000000000000000000000000000000000000000000",
"IvBase64": "AAAAAAAAAAAAAAAAAAAAAA==",
"IvHex": "00000000000000000000000000000000",
"SaltBase64": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"SaltHex": "0000000000000000000000000000000000000000000000000000000000000000",
"Name": "Another default key",
"Description": "Another default key",
"CreatedUtc": "2025-03-29T08:38:38.457116Z"
}
Enumerate Encryption Keys
Retrieves a paginated list of all encryption key objects in the tenant using GET /v2.0/tenants/[tenant-guid]/encryptionkeys
. This endpoint provides comprehensive enumeration with pagination support for managing multiple encryption keys.
Request Parameters
No additional parameters required beyond authentication.
curl --location 'http://view.homedns.org:8000/v2.0/tenants/00000000-0000-0000-0000-000000000000/encryptionkeys/' \
--header 'Authorization: ••••••'
import { ViewConfigurationSdk } from "view-sdk";
const api = new ViewConfigurationSdk(
"http://localhost:8000/", //endpoint
"default", //tenant Id
"default" //access key
);
const enumerateEncryptionKeys = async () => {
try {
const response = await api.EncryptionKey.enumerate();
console.log(response, "Encryption keys fetched successfully");
} catch (err) {
console.log("Error fetching Encryption keys:", err);
}
};
enumerateEncryptionKeys();
import view_sdk
from view_sdk import configuration
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def enumerateEncryptionKeys():
encryptionKeys = configuration.EncryptionKey.enumerate()
print(encryptionKeys)
enumerateEncryptionKeys()
using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
EnumerationResult<EncryptionKey> response = await sdk.EncryptionKey.Enumerate();
Response
Returns a paginated list of encryption key objects:
{
"Success": true,
"Timestamp": {
"Start": "2024-10-21T02:36:37.677751Z",
"TotalMs": 23.58,
"Messages": {}
},
"MaxResults": 10,
"IterationsRequired": 1,
"EndOfResults": true,
"RecordsRemaining": 0,
"Objects": [
{
"GUID": "c3c8b73d-859b-48a2-bfaf-511e83423585",
"TenantGUID": "00000000-0000-0000-0000-000000000000",
"OwnerGUID": "00000000-0000-0000-0000-000000000000",
"KeyBase64": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"KeyHex": "0000000000000000000000000000000000000000000000000000000000000000",
"IvBase64": "AAAAAAAAAAAAAAAAAAAAAA==",
"IvHex": "00000000000000000000000000000000",
"SaltBase64": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"SaltHex": "0000000000000000000000000000000000000000000000000000000000000000",
"Name": "Another default key",
"Description": "Another default key",
"CreatedUtc": "2025-03-29T08:38:38.457116Z"
}
],
"ContinuationToken": null
}
Read Encryption Key
Retrieves encryption key configuration by GUID using GET /v1.0/tenants/[tenant-guid]/encryptionkeys/[encryptionkey-guid]
. Returns the complete encryption key configuration including all cryptographic material. If the key doesn't exist, a 404 error is returned.
Request Parameters
- encryptionkey-guid (string, Path, Required): GUID of the encryption key object to retrieve
curl --location 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/encryptionkeys/00000000-0000-0000-0000-000000000000' \
--header 'Authorization: ••••••'
import { ViewConfigurationSdk } from "view-sdk";
const api = new ViewConfigurationSdk(
"http://localhost:8000/", //endpoint
"default", //tenant Id
"default" //access key
);
const readEncryptionKey = async () => {
try {
const response = await api.EncryptionKey.read(
"<encryptionkey-guid>"
);
console.log(response, "Encryption key fetched successfully");
} catch (err) {
console.log("Error fetching Encryption key:", err);
}
};
readEncryptionKey();
import view_sdk
from view_sdk import configuration
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def readEncryptionKey():
encryptionKey = configuration.EncryptionKey.retrieve("<encryptionkey-guid>")
print(encryptionKey)
readEncryptionKey()
using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
EncryptionKey response = await sdk.EncryptionKey.Retrieve(Guid.Parse("<encryptionkey-guid>"));
Response
Returns the complete encryption key configuration with all cryptographic material:
{
"GUID": "c3c8b73d-859b-48a2-bfaf-511e83423585",
"TenantGUID": "00000000-0000-0000-0000-000000000000",
"OwnerGUID": "00000000-0000-0000-0000-000000000000",
"KeyBase64": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"KeyHex": "0000000000000000000000000000000000000000000000000000000000000000",
"IvBase64": "AAAAAAAAAAAAAAAAAAAAAA==",
"IvHex": "00000000000000000000000000000000",
"SaltBase64": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"SaltHex": "0000000000000000000000000000000000000000000000000000000000000000",
"Name": "Another default key",
"Description": "Another default key",
"CreatedUtc": "2025-03-29T08:38:38.457116Z"
}
Read All Encryption Keys
Retrieves all encryption key objects in the tenant using GET /v1.0/tenants/[tenant-guid]/encryptionkeys/
. Returns an array of encryption key objects with complete configuration details for all keys in the tenant.
Request Parameters
No additional parameters required beyond authentication.
curl --location 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/encryptionkeys/' \
--header 'Authorization: ••••••'
import { ViewConfigurationSdk } from "view-sdk";
const api = new ViewConfigurationSdk(
"http://localhost:8000/", //endpoint
"default", //tenant Id
"default" //access key
);
const readAllEncryptionKeys = async () => {
try {
const response = await api.EncryptionKey.readAll();
console.log(response, "All encryption keys fetched successfully");
} catch (err) {
console.log("Error fetching All encryption keys:", err);
}
};
readAllEncryptionKeys();
import view_sdk
from view_sdk import configuration
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def readAllEncryptionKeys():
encryptionKeys = configuration.EncryptionKey.retrieve_all()
print(encryptionKeys)
readAllEncryptionKeys()
using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
List<EncryptionKey> response = await sdk.EncryptionKey.RetrieveMany();
Response
Returns an array of all encryption key objects:
[
{
"GUID": "c3c8b73d-859b-48a2-bfaf-511e83423585",
"TenantGUID": "00000000-0000-0000-0000-000000000000",
"OwnerGUID": "00000000-0000-0000-0000-000000000000",
"KeyBase64": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"KeyHex": "0000000000000000000000000000000000000000000000000000000000000000",
"IvBase64": "AAAAAAAAAAAAAAAAAAAAAA==",
"IvHex": "00000000000000000000000000000000",
"SaltBase64": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"SaltHex": "0000000000000000000000000000000000000000000000000000000000000000",
"Name": "Another default key",
"Description": "Another default key",
"CreatedUtc": "2025-03-29T08:38:38.457116Z"
},
{
"GUID": "another-encryption-key-guid",
"TenantGUID": "00000000-0000-0000-0000-000000000000",
"OwnerGUID": "00000000-0000-0000-0000-000000000000",
"KeyBase64": "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB=",
"KeyHex": "1111111111111111111111111111111111111111111111111111111111111111",
"IvBase64": "BBBBBBBBBBBBBBBBBBBBBBBB==",
"IvHex": "11111111111111111111111111111111",
"SaltBase64": "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB=",
"SaltHex": "1111111111111111111111111111111111111111111111111111111111111111",
"Name": "Another encryption key",
"Description": "Another encryption key",
"CreatedUtc": "2025-03-29T09:15:22.123456Z"
}
]
Update Encryption Key
Updates an existing encryption key configuration using PUT /v1.0/tenants/[tenant-guid]/encryptionkeys/{encryptionkey-guid}
. This endpoint allows you to modify encryption key properties and metadata while preserving certain immutable fields.
Request Parameters
- encryptionkey-guid (string, Path, Required): GUID of the encryption key object to update
Updateable Fields
All configuration parameters can be updated except for:
- GUID: Immutable identifier
- TenantGUID: Immutable tenant association
- CreatedUtc: Immutable creation timestamp
Important Notes
- Field Preservation: Certain fields cannot be modified and will be preserved across updates
- Complete Object: Provide a fully populated object in the request body
- Validation: All updated parameters will be validated before applying changes
- Security: Ensure proper handling of sensitive cryptographic material during updates
curl --location --request PUT 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/encryptionkeys/00000000-0000-0000-0000-000000000000' \
--header 'content-type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"KeyBase64": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"KeyHex": "0000000000000000000000000000000000000000000000000000000000000000",
"IvBase64": "AAAAAAAAAAAAAAAAAAAAAA==",
"IvHex": "00000000000000000000000000000000",
"SaltBase64": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"SaltHex": "0000000000000000000000000000000000000000000000000000000000000000",
"Name": "Default key, updated",
"Description": "Default key"
}'
import { ViewConfigurationSdk } from "view-sdk";
const api = new ViewConfigurationSdk(
"http://localhost:8000/", //endpoint
"default", //tenant Id
"default" //access key
);
const updateEncryptionKey = async () => {
try {
const response = await api.EncryptionKey.update({
GUID: "<encryptionkey-guid>",
TenantGUID: "<tenant-guid>",
OwnerGUID: "<owner-guid>",
KeyBase64: "*********************************AA=",
KeyHex:
"************************************************000",
IvBase64: "**********************A==",
IvHex: "***************************000",
SaltBase64: "***************************************AA=",
SaltHex:
"********************************************************000",
Name: "Another default key ash test [UPDATED]",
Description: "Another default key",
CreatedUtc: "2025-03-29T08:44:07.522780Z",
});
console.log(response, "Encryption key updated successfully");
} catch (err) {
console.log("Error updating Encryption key:", err);
}
};
updateEncryptionKey();
import view_sdk
from view_sdk import configuration
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def updateEncryptionKey():
encryptionKey = configuration.EncryptionKey.update("<encryptionkey-guid>",
KeyBase64="*********************************AA=",
KeyHex="************************************************000",
IvBase64="**********************A==",
IvHex="***************************000",
SaltBase64="***************************************AA=",
SaltHex="********************************************************000",
Name="Another default key",
Description="Another default key [updated]"
)
print(encryptionKey)
updateEncryptionKey()
using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
var request = new EncryptionKey
{
GUID = Guid.Parse("<encryptionkey-guid>"),
TenantGUID = Guid.Parse("<tenant-guid>"),
OwnerGUID = Guid.Parse("<owner-guid>"),
KeyBase64 = "*********************************AA=",
KeyHex = "************************************************000",
IvBase64 = "**********************A==",
IvHex = "***************************000",
SaltBase64 = "***************************************AA=",
SaltHex = "********************************************************000",
Name = "Another default key test [UPDATED]",
Description = "Another default key",
};
EncryptionKey response = await sdk.EncryptionKey.Update(request);
Response
Returns the updated encryption key object with all cryptographic material:
{
"GUID": "c3c8b73d-859b-48a2-bfaf-511e83423585",
"TenantGUID": "00000000-0000-0000-0000-000000000000",
"OwnerGUID": "00000000-0000-0000-0000-000000000000",
"KeyBase64": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"KeyHex": "0000000000000000000000000000000000000000000000000000000000000000",
"IvBase64": "AAAAAAAAAAAAAAAAAAAAAA==",
"IvHex": "00000000000000000000000000000000",
"SaltBase64": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"SaltHex": "0000000000000000000000000000000000000000000000000000000000000000",
"Name": "Default key, updated",
"Description": "Default key",
"CreatedUtc": "2025-03-29T08:38:38.457116Z"
}
Delete Encryption Key
Deletes an encryption key object by GUID using DELETE /v1.0/tenants/[tenant-guid]/encryptionkeys/[encryptionkey-guid]
. This operation permanently removes the encryption key and all associated cryptographic material. Use with extreme caution as this action cannot be undone and may affect encrypted data.
Request Parameters
- encryptionkey-guid (string, Path, Required): GUID of the encryption key object to delete
Important Security Warning
CRITICAL: Deleting an encryption key will permanently remove all cryptographic material. Ensure that no data is encrypted with this key before deletion, as encrypted data may become unrecoverable.
curl --location --request DELETE 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/encryptionkeys/00000000-0000-0000-0000-000000000000' \
--header 'Authorization: ••••••' \
import { ViewConfigurationSdk } from "view-sdk";
const api = new ViewConfigurationSdk(
"http://localhost:8000/", //endpoint
"default", //tenant Id
"default" //access key
);
const deleteEncryptionKey = async () => {
try {
const response = await api.EncryptionKey.delete(
"<encryptionkey-guid>"
);
console.log(response, "Encryption key deleted successfully");
} catch (err) {
console.log("Error deleting Encryption key:", err);
}
};
deleteEncryptionKey();
import view_sdk
from view_sdk import configuration
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def deleteEncryptionKey():
encryptionKey = configuration.EncryptionKey.delete("<encryptionkey-guid>")
print(encryptionKey)
deleteEncryptionKey()
using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
bool deleted = await sdk.EncryptionKey.Delete(Guid.Parse("<encryptionkey-guid>"));
Response
Returns 200 No Content on successful deletion. No response body is returned.
Check Encryption Key Existence
Verifies if an encryption key object exists without retrieving its configuration using HEAD /v1.0/tenants/[tenant-guid]/encryptionkey/[encryptionkey-guid]
. This is an efficient way to check encryption key presence before performing operations.
Request Parameters
- encryptionkey-guid (string, Path, Required): GUID of the encryption key object to check
curl --location --head 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/encryptionkey/00000000-0000-0000-0000-000000000000' \
--header 'Authorization: ••••••'
import { ViewConfigurationSdk } from "view-sdk";
const api = new ViewConfigurationSdk(
"http://localhost:8000/", //endpoint
"default", //tenant Id
"default" //access key
);
const encryptionKeyExists = async () => {
try {
const response = await api.EncryptionKey.exists(
"<encryptionkey-guid>"
);
console.log(response, "Encryption key exists");
} catch (err) {
console.log("Error checking Encryption key:", err);
}
};
encryptionKeyExists();
import view_sdk
from view_sdk import configuration
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def existsEncryptionKey():
encryptionKey = configuration.EncryptionKey.exists("<encryptionkey-guid>")
print(encryptionKey)
existsEncryptionKey()
using System.Text.Json;
using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://view.homedns.org:8000/");
bool exists = await sdk.EncryptionKey.Exists(Guid.Parse("<encryptionkey-guid>"));
Response
- 200 No Content: Encryption key exists
- 404 Not Found: Encryption key does not exist
- No response body: Only HTTP status code is returned
Note: HEAD requests do not return a response body, only the HTTP status code indicating whether the encryption key exists.
Best Practices
When managing encryption keys in the View platform, consider the following recommendations for optimal security and performance:
- Key Generation: Use cryptographically secure random number generators for creating encryption keys, IVs, and salt values
- Secure Storage: Store encryption keys securely and never log or expose key material in plain text
- Key Rotation: Implement regular key rotation policies to maintain security over time
- Access Control: Use proper authentication and authorization when accessing encryption key APIs
- Backup Strategy: Implement secure backup procedures for encryption keys to prevent data loss
Next Steps
After successfully configuring encryption keys, you can:
- Data Encryption: Implement encryption and decryption operations using the configured keys
- Secure Storage: Encrypt sensitive data before storing it in the View platform
- Key Management: Set up automated key rotation and lifecycle management processes
- Integration: Integrate encryption keys with other View platform services and APIs
- Compliance: Ensure encryption practices meet regulatory and compliance requirements