Generate a Java Keystore (JKS) file and configure security on your ServiceNow instance
To use Google Dialogflow as your NLU provider for Virtual Agent, use the private key you downloaded to generate a JKS file and set up authentication in your ServiceNow instance.
Before you begin
Make sure the Java Development Kit (JDK) is installed on the system.
Role required: admin
About this task
Note: Google Dialogflow uses OAuth2.0 for authentication.
Procedure
Open a command shell window.
To create a JKS file from the P12 file, do the following:
Run the following command:
keytool -importkeystore -srckeystore /local_dir/myprivatekey.p12 -srcstoretype pkcs12 -destkeystore /local_dir/myprivatekey.jks -deststoretype JKSIn this example,
/local_dir/myprivatekey.p12points to the private key that you downloaded in the previous step.When prompted, enter
notasecretfor the destination keystore password and the source keystore password.notasecretis the private key password you noted from the previous step. You will enter this password three times.
A JKS file is created in the same directory.
In your ServiceNow instance, add the JKS file to the Google Dialogflow X.509 certificate record:
Navigate to All, and then enter
sys_certificate.listin the filter.Select Google Dialogflow X.509 Certificate to open the record.
On the form, fill in the fields as follows.
Field Value Type Select Java Key Store. Key store password Enter the private key password that you specified when creating the JKS file ( notasecret).Active Select this option to activate the certificate. Select the attachment icon and upload the JKS file to the record.
Under Related Links, select Validate Stores/Certificates.
You should see a
Valid key_storemessage.Select Update.
In your ServiceNow instance, update the Google Dialogflow JWT (JSON Web Token) Keystore alias record.
Navigate to All, and then enter
jwt_keystore_aliases.listin the filter.Select Google Dialogflow JWT Keystore to open the record.
On the form, fill in the fields as follows.
Field Value Signing Keystore Select Google DialogFlow X.509 Certificate. Signing Algorithm Select RSA 256. Signing Key Enter the private key password that you specified when creating the JKS file ( notasecret).Key Id Leave this field empty. Select Update.
In your ServiceNow instance, update the Google Dialogflow JWT provider record.
Navigate to All, and then enter
jwt_provider.listin the filter.Select Google Dialogflow JWT Provider to open the record.
In the Signing Configuration field, select Google DialogFlow JWT Keystore.
In the Standard Claims related list, enter the email address for your Google Dialogflow agent service account as the Claim Value for the iss entry.
The Google DialogFlow JWT Provider configuration form displays the Signing Configuration and the iss record. The iss claim value is the agent service account email address.
For more information, refer to [Create a service account and private key in Google Dialogflow ES](vad-create-srvc-acct-key-dialogflow.md).
5. Select **Update**.
In your ServiceNow instance, update the Google Dialogflow NLU OAuth Provider record:
Navigate to All, and then enter
oauth_entity.listin the filter.Select Google Dialogflow NLU to open the record.
On the form, fill in the fields as follows.
Field Value Client ID Enter the unique ID for your Google Dialogflow agent service account that you saved from a previous step. Client Secret Enter the private key password that you specified when creating the JKS file ( notasecret).Default Grant Type Select JWT Bearer. Select Update.
In your ServiceNow instance, update the GoogleDialogFlowESNLUPrediction system alias.
Navigate to All, and then enter
sys_alias.listin the filter.Select GoogleDialogFlowESNLUPrediction to open the record.
Select the Connection Attributes tab and find the EnvID record.
In the Default value column, update the value with the name of the Google Dialogflow environment where the agent was published.
The default value is prod.
The EnvID column is highlighted in the list with a default value of prod.
5. Select **Update**.
Specify Google Dialogflow ES as your NLU provider in Virtual Agent.
For more information, see Configure Natural Language Understanding in Virtual Agent.
Parent Topic:Configure Google Dialogflow ES as the NLU provider for Virtual Agent
Previous topic:Create a service account and private key in Google Dialogflow ES
Next topic:Activate the Google Dialogflow ES service and enable it in your instance