|
3 | 3 | = ServiceNow configuration parameters |
4 | 4 |
|
5 | 5 | [role="_abstract"] |
6 | | -Configure the ServiceNow integration by defining instance connection parameters in the app-config.yaml file. This reference provides the required configuration blocks and syntax for both the ServiceNow UI plugin and Scaffolder actions. |
| 6 | +The ServiceNow integration requires specific parameters in your configuration files to establish a connection between {product} and your ServiceNow instances. Use these parameters to define authentication methods, instance URLs, and UI layouts. |
7 | 7 |
|
8 | | -== ServiceNow backend configuration |
| 8 | +== ServiceNow backend and frontend configuration |
| 9 | +Define the following parameters in the `app-config.yaml` file or the `dynamic-plugins.yaml` section of the `{product}` ConfigMap to enable the backend and frontend plugins. |
9 | 10 |
|
10 | | -The following parameters apply to the core ServiceNow integration used by the UI plugin and Scaffolder actions. |
11 | | - |
12 | | -== ServiceNow global configuration parameters |
13 | | - |
14 | | -[cols="3,1,1,5", options="header"] |
15 | 11 | |=== |
16 | | -| Parameter | Type | Default | Description |
| 12 | +| Parameter | Description | Requirement |
17 | 13 |
|
18 | | -| `baseUrl` | String | N/A | Required. The base URL of your ServiceNow instance (for example, `https://instance.service-now.com`). |
19 | | -| `username` | String | N/A | The username for Basic Authentication. Required if not using OAuth. |
20 | | -| `password` | String | N/A | The password for Basic Authentication. Required if not using OAuth. |
21 | | -| `apiToken` | String | N/A | An alternative to username/password for token-based authentication. |
| 14 | +| `instanceUrl` | The base URL of your ServiceNow instance (e.g., `https://dev12345.service-now.com`). | Required |
| 15 | +| `basicAuth.username` | The service account username for Basic authentication. | Optional |
| 16 | +| `basicAuth.password` | The service account password for Basic authentication. | Optional |
| 17 | +| `oauth.grantType` | The OAuth 2.0 grant type. Supports `client_credentials` or `password`. | Optional |
| 18 | +| `oauth.clientId` | The client ID for OAuth authentication. | Optional |
| 19 | +| `oauth.clientSecret` | The client secret for OAuth authentication. | Optional |
22 | 20 | |=== |
23 | 21 |
|
24 | | -== OAuth 2.0 authentication |
| 22 | +== ServiceNow scaffolder configuration |
| 23 | +The ServiceNow Scaffolder module requires a separate configuration block. Note that this module uses `baseUrl` instead of `instanceUrl`. |
25 | 24 |
|
26 | | -If your organization uses OAuth 2.0, use the following parameters instead of `username` and `password`: |
| 25 | +|=== |
| 26 | +| Parameter | Description | Requirement |
27 | 27 |
|
28 | | -* `oauthClientId`: The Client ID from your ServiceNow OAuth application. |
29 | | -* `oauthClientSecret`: The Client Secret from your ServiceNow OAuth application. |
30 | | -* `oauthTokenUrl`: The URL used to retrieve the access token. |
| 28 | +| `baseUrl` | The base URL of your ServiceNow instance. | Required |
| 29 | +| `username` | The service account username. | Required for Basic Auth |
| 30 | +| `password` | The service account password. | Required for Basic Auth |
| 31 | +|=== |
31 | 32 |
|
32 | | -== Scaffolder actions configuration |
| 33 | +== Authentication examples |
| 34 | +The following examples demonstrate how to structure different authentication methods in your configuration. |
33 | 35 |
|
34 | | -To use ServiceNow actions in software templates, define your instances under the `scaffolder.notifications.servicenow` block. |
| 36 | +.Basic authentication example |
| 37 | +[source,yaml] |
| 38 | +---- |
| 39 | +servicenow: |
| 40 | + instanceUrl: ${SERVICENOW_INSTANCE_URL} |
| 41 | + basicAuth: |
| 42 | + username: ${SERVICENOW_USER} |
| 43 | + password: ${SERVICENOW_PASS} |
| 44 | +---- |
35 | 45 |
|
| 46 | +.OAuth with Client Credentials |
36 | 47 | [source,yaml] |
37 | 48 | ---- |
38 | | -scaffolder: |
39 | | - notifications: |
40 | | - servicenow: |
41 | | - production: |
42 | | - baseUrl: ${SERVICENOW_PROD_URL} |
43 | | - username: ${SERVICENOW_USER} |
44 | | - password: ${SERVICENOW_PASS} |
| 49 | +servicenow: |
| 50 | + instanceUrl: ${SERVICENOW_INSTANCE_URL} |
| 51 | + oauth: |
| 52 | + grantType: client_credentials |
| 53 | + clientId: ${SERVICENOW_CLIENT_ID} |
| 54 | + clientSecret: ${SERVICENOW_CLIENT_SECRET} |
45 | 55 | ---- |
46 | | -+ |
47 | | -scaffolder.notifications.servicenow.<instance_name>:: Defines a unique key for a ServiceNow instance used by the Scaffolder. |
48 | 56 |
|
49 | | -== Catalog annotations |
| 57 | +.OAuth with Password Grant |
| 58 | +[source,yaml] |
| 59 | +---- |
| 60 | +servicenow: |
| 61 | + instanceUrl: ${SERVICENOW_INSTANCE_URL} |
| 62 | + oauth: |
| 63 | + grantType: password |
| 64 | + clientId: ${SERVICENOW_CLIENT_ID} |
| 65 | + clientSecret: ${SERVICENOW_CLIENT_SECRET} |
| 66 | + username: ${SERVICENOW_USER} |
| 67 | + password: ${SERVICENOW_PASS} |
| 68 | +---- |
50 | 69 |
|
51 | | -The ServiceNow plugin does not use `app-config.yaml` for entity mapping or filtering. To link catalog entities to ServiceNow, use the following annotations in the `catalog-info.yaml` file: |
| 70 | +== Frontend UI configuration |
| 71 | +The frontend plugin configuration defines how ServiceNow data appears on component entity pages. |
52 | 72 |
|
53 | | -* `servicenow.com/service-id`: Maps the entity to a specific ServiceNow Service ID. |
54 | | -* `servicenow.com/category:` Filters incidents by a specific ServiceNow category. |
| 73 | +[source,yaml] |
| 74 | +---- |
| 75 | +dynamicPlugins: |
| 76 | + frontend: |
| 77 | + backstage-community.plugin-servicenow: |
| 78 | + entityTabs: |
| 79 | + - path: /servicenow |
| 80 | + title: ServiceNow |
| 81 | + mountPoint: entity.page.servicenow |
| 82 | + mountPoints: |
| 83 | + - mountPoint: entity.page.servicenow/cards |
| 84 | + importName: ServicenowPage |
| 85 | + config: |
| 86 | + layout: |
| 87 | + gridColumn: 1 / -1 |
| 88 | + height: 75vh |
| 89 | +---- |
0 commit comments