Hide a Security Property

Each managed security policy has security properties. Integration developers see the security properties and provide values for them while defining a connection. However, when a value is static or is programmatically derived across all connections for the adapter, you can hide the security property.

For example, consider an application that supports OAuth 2.0 Authorization Code as a security policy. Every invoke connection must use that security policy. In such cases, you can hard code the security policy for every invoke connection and hide the security policy. That way, you simplify the experience for integration developers.
  1. In Visual Studio Code, in the Explorer pane, expand definitions, and select the adapter definition document.

    The adapter definition document has an extension of .add.json, such as adapter.add.json.

    The adapter definition document appears in the workspace.

  2. Expand the connection section of the adapter definition document.
  3. Add the default and hidden properties below the name property for the connection and provide values for the properties.

    For example, the following code sample shows how to provide a default value to the name property and hide it. Keep in mind that for this sample, the password field still appears when the integration developer configures the connection.

    {
          "type": "managed",
          "policy": "BASIC_AUTH",
          "description": "Username and password credentials.",
          "displayName": "Username and password credentials.",
          "scope": "ACTION",
          "securityProperties": [
            {
              "name": "username",
              "default" : "FIXED_USER",
              "hidden": true,
              "required": true
            },
            {
              "name": "password",
              "displayName": "Account Password",
              "description": "<Overrides the description>",
              "shortDescription": "<Override the short description>",
              "hidden": false,
              "required": true
            }
          ]
        }
    
  4. Save your changes.