- Platform Release 6.5
- Privacera Platform Release 6.5
- Enhancements and updates in Privacera Access Management 6.5 release
- Enhancements and updates in Privacera Discovery 6.5 release
- Enhancements and updates in Privacera Encryption 6.5 release
- Deprecation of older version of PolicySync
- Upgrade Prerequisites
- Supported versions of third-party systems
- Documentation changelog
- Known Issues 6.5
- Platform - Supported Versions of Third-Party Systems
- Platform Support Policy and End-of-Support Dates
- Privacera Platform Release 6.5
- Privacera Platform Installation
- About Privacera Manager (PM)
- Install overview
- Prerequisites
- Installation
- Default services configuration
- Component services configurations
- Access Management
- Data Server
- UserSync
- Privacera Plugin
- Databricks
- Spark standalone
- Spark on EKS
- Portal SSO with PingFederate
- Trino Open Source
- Dremio
- AWS EMR
- AWS EMR with Native Apache Ranger
- GCP Dataproc
- Starburst Enterprise
- Privacera services (Data Assets)
- Audit Fluentd
- Grafana
- Ranger Tagsync
- Discovery
- Encryption & Masking
- Privacera Encryption Gateway (PEG) and Cryptography with Ranger KMS
- AWS S3 bucket encryption
- Ranger KMS
- AuthZ / AuthN
- Security
- Access Management
- Reference - Custom Properties
- Validation
- Additional Privacera Manager configurations
- Upgrade Privacera Manager
- Troubleshooting
- How to validate installation
- Possible Errors and Solutions in Privacera Manager
- Unable to Connect to Docker
- Terminate Installation
- 6.5 Platform Installation fails with invalid apiVersion
- Ansible Kubernetes Module does not load
- Unable to connect to Kubernetes Cluster
- Common Errors/Warnings in YAML Config Files
- Delete old unused Privacera Docker images
- Unable to debug error for an Ansible task
- Unable to upgrade from 4.x to 5.x or 6.x due to Zookeeper snapshot issue
- Storage issue in Privacera UserSync & PolicySync
- Permission Denied Errors in PM Docker Installation
- Unable to initialize the Discovery Kubernetes pod
- Portal service
- Grafana service
- Audit server
- Audit Fluentd
- Privacera Plugin
- How-to
- Appendix
- AWS topics
- AWS CLI
- AWS IAM
- Configure S3 for real-time scanning
- Install Docker and Docker compose (AWS-Linux-RHEL)
- AWS S3 MinIO quick setup
- Cross account IAM role for Databricks
- Integrate Privacera services in separate VPC
- Securely access S3 buckets ssing IAM roles
- Multiple AWS account support in Dataserver using Databricks
- Multiple AWS S3 IAM role support in Dataserver
- Azure topics
- GCP topics
- Kubernetes
- Microsoft SQL topics
- Snowflake configuration for PolicySync
- Create Azure resources
- Databricks
- Spark Plug-in
- Azure key vault
- Add custom properties
- Migrate Ranger KMS master key
- IAM policy for AWS controller
- Customize topic and table names
- Configure SSL for Privacera
- Configure Real-time scan across projects in GCP
- Upload custom SSL certificates
- Deployment size
- Service-level system properties
- PrestoSQL standalone installation
- AWS topics
- Privacera Platform User Guide
- Introduction to Privacera Platform
- Settings
- Data inventory
- Token generator
- System configuration
- Diagnostics
- Notifications
- How-to
- Privacera Discovery User Guide
- What is Discovery?
- Discovery Dashboard
- Scan Techniques
- Processing order of scan techniques
- Add and scan resources in a data source
- Start or cancel a scan
- Tags
- Dictionaries
- Patterns
- Scan status
- Data zone movement
- Models
- Disallowed Tags policy
- Rules
- Types of rules
- Example rules and classifications
- Create a structured rule
- Create an unstructured rule
- Create a rule mapping
- Export rules and mappings
- Import rules and mappings
- Post-processing in real-time and offline scans
- Enable post-processing
- Example of post-processing rules on tags
- List of structured rules
- Supported scan file formats
- Data Source Scanning
- Data Inventory
- TagSync using Apache Ranger
- Compliance Workflow
- Data zones and workflow policies
- Workflow Policies
- Alerts Dashboard
- Data Zone Dashboard
- Data zone movement
- Workflow policy use case example
- Discovery Health Check
- Reports
- How-to
- Privacera Encryption Guide
- Overview of Privacera Encryption
- Install Privacera Encryption
- Encryption Key Management
- Schemes
- Encryption with PEG REST API
- Privacera Encryption REST API
- PEG API endpoint
- PEG REST API encryption endpoints
- PEG REST API authentication methods on Privacera Platform
- Common PEG REST API fields
- Construct the datalist for the /protect endpoint
- Deconstruct the response from the /unprotect endpoint
- Example data transformation with the /unprotect endpoint and presentation scheme
- Example PEG API endpoints
- /authenticate
- /protect with encryption scheme
- /protect with masking scheme
- /protect with both encryption and masking schemes
- /unprotect without presentation scheme
- /unprotect with presentation scheme
- /unprotect with masking scheme
- REST API response partial success on bulk operations
- Audit details for PEG REST API accesses
- Make encryption API calls on behalf of another user
- Troubleshoot REST API Issues on Privacera Platform
- Privacera Encryption REST API
- Encryption with Databricks, Hive, Streamsets, Trino
- Databricks UDFs for encryption and masking on PrivaceraPlatform
- Hive UDFs for encryption on Privacera Platform
- StreamSets Data Collector (SDC) and Privacera Encryption on Privacera Platform
- Trino UDFs for encryption and masking on Privacera Platform
- Privacera Access Management User Guide
- Privacera Access Management
- How Polices are evaluated
- Resource policies
- Policies overview
- Creating Resource Based Policies
- Configure Policy with Attribute-Based Access Control
- Configuring Policy with Conditional Masking
- Tag Policies
- Entitlement
- Service Explorer
- Users, groups, and roles
- Permissions
- Reports
- Audit
- Security Zone
- Access Control using APIs
- AWS User Guide
- Overview of Privacera on AWS
- Configure policies for AWS services
- Using Athena with data access server
- Using DynamoDB with data access server
- Databricks access manager policy
- Accessing Kinesis with data access server
- Accessing Firehose with Data Access Server
- EMR user guide
- AWS S3 bucket encryption
- Getting started with Minio
- Plugins
- How to Get Support
- Coordinated Vulnerability Disclosure (CVD) Program of Privacera
- Shared Security Model
- Privacera Platform documentation changelog
Privacera Encryption REST API
PEG API endpoint
For Privacera Platform, by default, the PEG API endpoint is:
https://<privacera_hostname>:6869/api/peg/public
Check with your installation team for the value of <privacera_hostname>
and if they have changed this default port.
PEG REST API encryption endpoints
The PEG REST API consists of the following endpoints:
/authenticate
- Generates a token to be used with subsequent/protect
and/unprotect
endpoints./getSchemes
- Returns the names of Privacera-supplied and user-defined encryption schemes./protect
- Encrypts the data./unprotect
- Decrypts the data.
PEG REST API authentication methods on Privacera Platform
There are two ways to authenticate the PEG REST API:
Basic authentication with username and password.
An authentication token.
Basic PEG REST API authentication
A Portal user needs to have the ROLE_ENCRYPTION_ALL
or ROLE_ENCRYPTION_READ
role to authenticate to the PEG REST API via basic authentication.
For basic authentication, you pass your username and password credentials in the <username>:<password>
argument directly on the /protect
or /unprotect
endpoint. For an example of this argument, see Common PEG REST API fields.
If you are a privileged user, you can also make calls on another user's behalf.
For details on assigning roles, see User Management.
PEG REST API authentication token
The PEG REST API authentication token can be created in two ways:
In the Privacera Portal.
With the
/authenticate
REST API endpoint.
The token must be included in the HTTP header of subsequent endpoints.
The token has a configurable validity period. See Add Keytab Expiry Date.
Generate PEG REST API authentication token in Privacera Portal
You can generate the PEG REST API authentication token in Privacera Portal.
The token is a combination of an <AccessKey
and a SecretKey>
delimited by a colon (:): <AccessKey
:SecretKey>
. The authentication token is required in the header of the /protect
or /unprotect
endpoints in the following form:
X-API-KEY:<AccessKey>:<SecretKey>
To generate the token, do the following:
Log in to the Privacera Portal.
From the navigation menu, select Launch Pad > Privacera Token.
Click Generate Token and generate a new token after you enter the expiration details, etc.
An Access Key and a Secret Key are generated.
Store the Access Key and Secret Key credentials safely.
Get PEG REST API authentication token using the /authenticate endpoint
The PEG REST API authentication token is generated using the /authenticate
endpoint.
To generate the token, use the /authenticate
endpoint with basic authentication user credentials to authenticate the end-user. PEG is integrated with the Privacera Portal. For definitions of <service_user>
and <application_user>
, see Common PEG REST API fields.
curl -u <service_user>:<password> \ --header "Accept: application/json" \ --header "Content-Type: application/json" \ --data-raw '"user":"<application_user>"' \ https://<privacera_hostname>:6869/api/peg/public/authenticate
If the authentication is successful, PEG returns the colon-delimited token <AccessKey>:<SecretKey>
.
Subsequent calls to /protect
and /unprotect
endpoints must include the X-API-KEY
header with the token.
X-API-KEY:<token_from_authenticate>;
Note
If you are testing with a self-signed certificate, to bypass the certificate validation check, add the curl -k
option.
Common PEG REST API fields
This example of the /protect
endpoint illustrates some common fields of the PEG REST API on the Privacera Platform.
Instead of basic authentication, this example uses token authentication with an X-API-KEY:<token_from_authenticate>
. If you want basic authentication, remove the token line in this example and replace it with -u <service_user>:<password>
.
curl \ --request 'POST https://<privacera_hostname>:6869/api/peg/public/protect' --header "X-API-KEY:<token_from_authenticate>" \ --header "Accept: application/json" \ --header 'Content-Type: application/json' \ --data-raw '{"schemelist":["<encryption_scheme>,..."], \ "datalist":[["<data_to_encrypt>",...]], \ "maskSchemelist": ["<masking_scheme>",...], \ "maskDatalist": [[data_to_mask,...], \ "user":"<application_user>"}'
The following table displays common PEG REST API fields with descriptions of each:
Line | Description |
---|---|
| The If this anatomy showed basic authentication, it would use the
|
| List of <encryption_schemes>. |
| One or more <encryption_schemes> to encrypt or decrypt data in |
| List of data elements, one for each scheme in the |
| A data element to be encrypted with |
| List of |
| One or more <masking_schemes> to mask the data in |
| List of data elements for masking, with at least one for each masking scheme in |
| The PEG API endpoint and default port for Privacera Platform. |
| The application user or end-user that connects to a service, such as Snowflake, UDF, or ODBC application. |
| Not shown here, the
|
Construct the datalist for the /protect endpoint
Suppose you want to encrypt two database fields tagged with Privacera metadata PERSON_NAME
and EMAIL
. The value of your API datalist
to encrypt can be constructed by doing the following:
Extract from the database the unencrypted values of the tagged fields.
Format a JSON array of those values.
Make an API
/protect
request to encrypt the values in that array.Reformat the returned JSON array of the encrypted values to update the fields in your database.
Deconstruct the response from the /unprotect endpoint
Suppose you want to decrypt two database fields tagged with Privacera metadata PERSON_NAME
and EMAIL
. The value of your API datalist
to decrypt can be constructed by doing the following:
Extract from the database the encrypted values of the tagged fields.
Format a JSON array of those values.
Make an API
/unprotect
request to decrypt the values in that array.Reformat the returned JSON array of the decrypted values to update the fields in your database.
Example data transformation with the /unprotect endpoint and presentation scheme
This example shows some original input data, its representation when encrypted, and its obfuscated result after decryption with /unprotect
and an optional presentation scheme.
Original value:
sally@gmail.com
Encrypted value:
xy12zb@1mno2.rtz
Value after decryption and presentation scheme. The domain portion has been obfuscated:
sally@ymxof.1dg
Example PEG API endpoints
Most of the examples do not show the full curl
command and the required authentication. They show only the JSON bodies of the requests and responses. For authentication options, see ??? or the example of ???.
/authenticate
As required for /authenticate
, this example uses basic authentication to retrieve a token that is used in the other examples.
curl \ -u <service_user>:<password> \ --header "Accept: application/json" \ --header "Content-Type: application/json" \ --data-raw '"user":"<application_user>"' \ https://privacera.com:6869/api/peg/public/authenticate
Response
{"token":"bWtpc2VyOjE6MTYxNzIyMTk4Njg2Mjo4NjM5OTEzOA==:U3AcayrrQW3eecXjocH8ArJNqDr1GmJAM92Fa/f8T/YxJitKuCqw/CIB7Lm9Szqk", "tokenid":1, "tokenExpiry":"2021-04-01T12:19:30Z", "tokenName":"service_user", tokenStatus":"ENABLED", userName":"application_user"}
/protect with encryption scheme
The two elements in the input datalist
array are encrypted with the encryption schemes PERSON_NAME
and EMAIL
.
--data-raw '{"schemelist":["PERSON_NAME", "EMAIL"], "datalist": [["Mark", "Jonathan","Christopher"], ["mark@example.com", "jonathan@test.com", "christopher@google.com"]], "user":"jimmybob@BigCo.com"}'
Response
"datalist":[["WjM5", "5vpJF9zT", "1EbplEYVBjy"], ["i0bD@WKbMYpr.CvE", "?9aqS8zV@YUym.hkd", "d501shhJEO&@YpvfOc.VYH"]], "data":"", "responseStatus:"SUCCESS"}
/protect with masking scheme
The element in the input maskDataList
array is masked by the masking scheme MASKING_SCHEME
.
--data-raw '{ "maskSchemelist": [ "MASKING_SCHEME" ], "maskDatalist": [ [ "",null,"12-12-2012","12/12/2025T09:01:02" ] "user":"<application_user>"}'
Response
{ "datalist":[], "data":"", "maskDatalist": [ ["**-**-****","**/**/*******:**:**"], ["*****@*****.***","",null] ],"responseStatus":"SUCCESS" } ]
/protect with both encryption and masking schemes
The element in the input datalist
array is encrypted with the encryption scheme SYSTEM_EMAIL
and at the same time the data in the input maskDataList
is masked with the masking scheme MASKING_SCHEME
.
--data-raw '{"schemelist":["SYSTEM_EMAIL"], \ "datalist":[ ["sally@gmail.com"] ], \ "maskSchemelist":["DATE_MASKING_SCHEME"], \ "maskDatalist":[ ["",null,"12-12-2012","12/12/2025T09:01:02"] ], \ "user":"padmin" }'
Response
{ "datalist": [ [ "mNM-^@RUWqb.qRK" ] ], "data": "", "maskDatalist": [ [ "", null, "**-**-****", "**/**/*******:**:**" ] ], "responseStatus": "SUCCESS" }
/unprotect without presentation scheme
The two elements in the input datalist
array are decrypted with the encryption schemes PERSON_NAME
and EMAIL
.
--data-raw '{"schemelist":["PERSON_NAME", "EMAIL"], "datalist": [["WjM5","5vpJF9zT", "1EbplEYVBjy"], ["i0bD@WKbMYpr.CvE", "?9aqS8zV@YUym.hkd", "d501shhJEO&@YpvfOc.VYH"]], "user":"<application_user>"}'
Response
{"datalist": [["Mark", "Jonathan","Christopher"], ["mark@example.com", "jonathan@test.com", "christopher@google.com"]], "data":"", "responseStatus":"SUCCESS"}
/unprotect with presentation scheme
The input in the datalist
array is decrypted with the encryption scheme EMAIL2
and then obfuscated with the presentation scheme EMAIL2_P
.
--data-raw '{"datalist":[["8283a@QhbpH.yOs","5fGP@RyZBO.UZE"]], "schemelist":["EMAIL2"], "presentationSchemelist":["EMAIL2_P"] "user":"jimmybob@BigCo.com"}'
/unprotect with masking scheme
Masking schemes must not be used with /unprotect
, which returns an error because the masked data cannot be unmasked.
REST API response partial success on bulk operations
For bulk operations, in which multiple data elements are included in the datalist
JSON array of the /protect
or /unprotect
request, if an error is encountered in processing one of those elements, the endpoint returns the response as "Partial Success" but does not fail the entire batch.
Audit details for PEG REST API accesses
Privacera records access to the PEG REST API encryption keys and schemes. For details, see Audit.