{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":5242,"path":"conversational-interfaces/virtual-agent/va-fd-app-reqs-secure-inputs.md","title":"Workflow Studio scoped application requirements for secure inputs","bundle":null,"doc_type":null,"release":"australia","body":"\n# Workflow Studio scoped application requirements for secure inputs\n\nAdhere to the following scoped application requirements to implement secure \\(password2\\) inputs in your Virtual Agent topics.\n\nYou can add secure inputs to Virtual Agent topics in two ways:\n\n-   [Create a secure custom input control](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/create-custom-control.md) that uses a Workflow Studio action or subflow with secure \\(password2 type\\) inputs.\n-   Add an [Action utility node](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/va-action.md) to a topic that refers to a Workflow Studio action or subflow that has a single password2 field as an input.\n\nThe [Key Management Framework](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/understanding-kmf.md) \\(KMF\\) must be installed and configured for your instance. The scoped application that uses the secure fields must also have the following:\n\n-   A **sys\\_kmf\\_crypto\\_module** record, with a related Symmetric Key Wrapping/Unwrapping **sys\\_kmf\\_module\\_crypto\\_spec** record\n-   A **sys\\_kmf\\_crypto\\_caller\\_policy** record with the following properties:\n    -   Policy name: &lt;modify the auto-generated name&gt;\n    -   Crypto module: **com\\_glide\\_cs\\_glideencrypter**\n    -   Type: **Scope**\n    -   Target Scope: &lt;your application's scope&gt;\n    -   Application: &lt;the name of your scoped application&gt;\n    -   Active: **true**\n    -   Result: **Track**\n-   A Workflow Studio action or subflow that accepts one or more password2 input fields\n-   A [Script step](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/build-workflows/javascript-step-action-designer.md) in the Workflow Studio action that unwraps the password2/KMF passwords as follows:\n\n    ```\n    var op = new \n    sn_kmf_ns.KMFCryptoOperation(\"global.com_glide_cs_glideencrypter\",\"SYMMETRIC_UNWRAPPING\").withAlgorithm(\"AES\").withOutputFormat(\"KMFNONE\");\n    var old_pw_clear_data = op.doOperation(inputs.old_pw);\n    var new_pw_clear_data = op.doOperation(inputs.new_pw);\n    var new_pw_confirmed_clear_data = op.doOperation(inputs.new_pw_confirmed);\n    ```\n\n\nFor more information about password2 encryption with KMF, see [Password2 encryption with KMF](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/password-2way-encrypted-fields.md).\n\n**Parent Topic:**[Integrating Virtual Agent with Workflow Studio workflows](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/va-flow-designer-integration.md)\n\n"}}