Deploying metadata (Salesforce- Compliance accelerator)
Let us now deploy the masking metadata content from the resource folder into a Continuous Compliance engine.
To run the deploy operation, you must first initialize and configure dxac. f you have not done so already, please refer to Getting Started.
Supported Objects
dxac supports the creation of the following global and non-global objects on a Continuous Compliance engine during the deploy process.
Global Objects
-
Algorithms
-
Domains
-
Profiler Expressions
-
JDBC Drivers
-
Driver Support Plugins
Non-Global Objects
-
Application
-
Environment
-
Connector
-
Ruleset
-
Inventory
To start the compliance accelerator deploy process, read the section below.
Uploading JDBC Driver
In the event that there’s an extended driver required for masking, dxac can upload the driver to a target Masking engine.Given below are the steps to upload a JDBC driver:
-
Copy the driver zip file into /resource/jdbc_driver folder.
-
Use
dxac config update -dn
to set the name of the driver file and classname for the driver in dxac config. -
Run the deploy command with the
-ud
option.
Upload JDBC driver with deploy
./dxac deploy salesforce <authentication-parameters> -ud
Uploading Driver Support Extensions
In the event that there are driver support extensions that need to be deployed, dxac can deploy them to a Continuous Compliance engine.
Given below are the steps to upload a plugin file as part of the deploy operation.
-
Copy the plugin jar file into the
/resource/plugin
folder. -
Use
dxac config update -pn
to set the name of the plugin file in dxac config. -
Run the deploy command with the
-ue
option.
Upload driver extension plugin with deploy
./dxac deploy salesforce <authentication-parameters> -ue
Uploading Certificate Chain
Dxac can upload the certificate chain file present in the “resource/certs” folder to a target Masking engine. Given below are the steps to upload a certificate chain.
-
Copy the certificate chain pem file into /resource/certs folder.
-
Update the
cert_name
parameter in dxac config with the name of the cert file (with extension). -
Run the deploy command with the
-uc
option.
Upload certificate chain with deploy
./dxac deploy salesforce <authentication-parameters> -uc
Uploading OAuth2Settings File
In the event of using headless OAuth2 to authenticate to Salesforce, there is a need for an OAuth2Settings.txt file to be uploaded to the engine and also adding the file reference of the uploaded settings file in the JDBC URL. Dxac can upload the OAuth2Settings.txt file present in the resource/connector
folder to a target Masking engine. Given below are the steps to upload the settings file.
-
Copy the contents of the oauth settings file into the
/resource/connector/OAuth2Settings.txt
file. -
Run the deploy command with the
-uo
option.
Upload OAuth2Settings with deploy
./dxac deploy salesforce <authentication-parameters> -uo
OAuth2Settings.txt
file for OAuth2 based authentication with salesforce, see Create OAuth Settings File.Final Deploy Commands
On MacOS and Linux
DXAC_ENGINE_PASSWORD, DXAC_SANNBOX_PASSWORD,DX_SECURITY_TOKEN
are environment variables. Please refer Setting environment variables .-
Deploy only metadata
./dxac deploy salesforce -i <engine-name> -u <engine user> -U <database user> -e "DXAC_ENGINE_PASSWORD, DXAC_SANNBOX_PASSWORD,DX_SECURITY_TOKEN"
-
Deploy plugin with metadata
./dxac deploy salesforce -i <engine-name> -u <engine user> -U <database user> -e "DXAC_ENGINE_PASSWORD, DXAC_SANNBOX_PASSWORD,DX_SECURITY_TOKEN" -ue
-
Deploy plugin and certificate with metadata
./dxac deploy salesforce -i <engine-name> -u <engine user> -U <database user> -e "DXAC_ENGINE_PASSWORD, DXAC_SANNBOX_PASSWORD,DX_SECURITY_TOKEN" -ue -uc
On Windows 10
-
Deploy only metadata
.\dxac.exe deploy salesforce -i <engine-name> -u <engine user> -U <database user> -e "DXAC_ENGINE_PASSWORD, DXAC_SANNBOX_PASSWORD,DX_SECURITY_TOKEN"
-
Deploy plugin with metadata
.\dxac.exe deploy salesforce -i <engine-name> -u <engine user> -U <database user> -e "DXAC_ENGINE_PASSWORD, DXAC_SANNBOX_PASSWORD,DX_SECURITY_TOKEN" -ue
-
Deploy plugin, and certificate with metadata
.\dxac.exe deploy salesforce -i <engine-name> -u <engine user> -U <database user> -e "DXAC_ENGINE_PASSWORD, DXAC_SANNBOX_PASSWORD,DX_SECURITY_TOKEN" -ue -uc
Deploy command for OAuth2 Authentication
For using OAuth2 based headless authentication with Salesforce, you need to create an OAuth2Settings.txt
file and place it under the resource/connector
folder. You also need the ClientId and ClientSecret from a connected app that is created on the target salesforce environment. To ask dxac to use OAuth2 authentication, you have the below command line parameters:
Parameter |
Description |
---|---|
-a / –auth-type |
Auth type to be specified to dxac. It can take values in [‘basic’, ‘oauth2’] |
-uc / –upload-cert |
Flag to be given with the deploy command if we want to upload the certificate file. |
-uo / –upload-settings |
Flag to be given with the deploy command if we want to upload the |
Linux/ Mac
DXAC_ENGINE_PASSWORD, OAUTHCLIENTID,OAUTHCLIENTSECRET
are environment variables. Please refer Setting environment variables .-
Deploy command for OAuth2
./dxac deploy salesforce -i <engine-name> -u <engine user> -U <database user> -a oauth2 -e "DXAC_ENGINE_PASSWORD, OAUTHCLIENTID,OAUTHCLIENTSECRET"
-
Deploy command for OAuth2 with plugin
./dxac deploy salesforce -i <engine-name> -u <engine user> -U <database user> -a oauth2 -e "DXAC_ENGINE_PASSWORD, OAUTHCLIENTID,OAUTHCLIENTSECRET" -ue
-
Deploy command for OAuth2 with plugin, certificate and settings
./dxac deploy salesforce -i <engine-name> -u <engine user> -U <database user> -a oauth2 -e "DXAC_ENGINE_PASSWORD, OAUTHCLIENTID,OAUTHCLIENTSECRET" -ue -uc -uo
./dxac deploy salesforce -i <engine-name> -u <engine user> -U <database user> -a oauth2 -e "DXAC_ENGINE_PASSWORD, OAUTHCLIENTID,OAUTHCLIENTSECRET"
What’s Next?
You have now used dxac to deploy the masking metadata content successfully to a Continuous Compliance engine.
For information on the dxac deploy command and its parameters, refer to CLI References.