-
Notifications
You must be signed in to change notification settings - Fork 64
RHIDP-10933: [Doc] ServiceNow plugin: Allow integration without changing ServiceNow infrastructure #2020
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rh-tokeefe
wants to merge
16
commits into
redhat-developer:main
Choose a base branch
from
rh-tokeefe:RHIDP-10933
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
RHIDP-10933: [Doc] ServiceNow plugin: Allow integration without changing ServiceNow infrastructure #2020
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
7b989e2
RHIDP-10933: [Doc] ServiceNow plugin: Allow integration without chang…
rh-tokeefe 773d52c
RHIDP-10933: edits from AI review
rh-tokeefe 08f74df
RHIDP-10933: revised for style using AI
rh-tokeefe cf526cc
RHIDP-10933: Updated based on dev review
rh-tokeefe 1e0404d
RHIDP-10933: updated task for using servicenow scaffolder actions
rh-tokeefe b3bc2a8
RHIDP-10933: added task after discussion with developer
rh-tokeefe e4c2853
RHIDP-10933: modified procedure name and updated assembly
rh-tokeefe 382631f
RHIDP-10933: name change and tshooting
rh-tokeefe 91016f6
RHIDP-10933: tshooting
rh-tokeefe e490704
RHIDP-10933: tshooting
rh-tokeefe 2320888
RHIDP-10933: fixed CQA warnings
rh-tokeefe f8e78e9
RHIDP-10933: edits from dev review
rh-tokeefe e0efe76
RHIDP-10933: updated section headers
rh-tokeefe 824ee8b
RHIDP-10933: updated based on dev comment
rh-tokeefe b48cb68
RHIDP-10933: updated short description to address CQA item flagged
rh-tokeefe 4f690a8
RHIDP-10933: minor edit
rh-tokeefe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| :_mod-docs-content-type: CONCEPT | ||
| [id="servicenow-entity-linking-methods_{context}"] | ||
| = ServiceNow entity linking methods | ||
|
|
||
| [role="_abstract"] | ||
| To view and manage ServiceNow incidents directly in {product} ({product-very-short}), you must link an entity to your ServiceNow records. Linking ensures that incident data is accurately synchronized and visible within the relevant component or system. | ||
|
|
||
| {product} provides two methods for linking these entities. You can choose the method that best fits your organization's security requirements and your ability to modify the ServiceNow schema. | ||
|
|
||
| == Direct mapping (Backstage Entity ID column) | ||
|
|
||
| The default method requires adding a custom column named `backstage_entity_id` to your ServiceNow incident table. You then manually or programmatically assign the specific {product-very-short} entity reference (for example, `component:default/my-service`) to this column in ServiceNow. | ||
|
|
||
| * Advantages: | ||
| ** Highly secure and precise | ||
| ** Ensures data is only exposed to the intended entity | ||
| * Limitations: | ||
| ** Requires a schema change in ServiceNow | ||
| ** Requires manual data entry for each incident | ||
|
|
||
| == Flexible mapping (Custom column mapping) | ||
|
|
||
| The flexible mapping approach is an opt-in feature that allows you to use any existing column in your ServiceNow incident table to link to {product-very-short} entities. Instead of creating a new column, you configure the ServiceNow plugin to look at an existing field (such as `short_description`, `cmdb_ci`, or a custom organizational ID) to match the entity. | ||
|
|
||
| * Advantages: | ||
| ** Does not require ServiceNow schema changes | ||
| ** Faster to implement for organizations with strict ServiceNow governance | ||
| * Limitations: | ||
| ** Requires careful configuration to ensure that the search criteria in the chosen column are unique enough to prevent displaying unrelated incidents | ||
|
|
||
| == Comparison of linking methods | ||
|
|
||
| [cols="1h,1,1"] | ||
| |=== | ||
| | Feature | Direct mapping | Flexible mapping | ||
|
|
||
| | ServiceNow schema change | Required | Not required | ||
| | Security level | High (strict matching) | Medium (dependent on column data) | ||
| | Configuration complexity | Low (plugin side) | Medium (requires YAML mapping) | ||
| | Ideal use case | New ServiceNow instances or high-security environments | Existing ServiceNow instances where schema changes are restricted | ||
| |=== |
57 changes: 57 additions & 0 deletions
57
modules/shared/proc-configure-the-servicenow-plugin-in-the-configmap.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| :_mod-docs-content-type: PROCEDURE | ||
| [id="configure-the-servicenow-plugin-in-the-configmap_{context}"] | ||
| = Configure the ServiceNow plugin in the ConfigMap | ||
|
|
||
| [role="_abstract"] | ||
| Update the `{product}` ConfigMap to enable the ServiceNow backend, frontend, and Scaffolder actions. This configuration defines the connection parameters and UI components required to integrate ServiceNow with your software catalog. | ||
|
|
||
| .Prerequisites | ||
|
|
||
| * You have administrator access to an {ocp-brand-name} cluster. | ||
|
|
||
| * {product} is installed on the cluster. | ||
|
|
||
| .Procedure | ||
|
|
||
| . Open your `{product}` ConfigMap for editing. | ||
|
|
||
| . Add the ServiceNow backend and frontend plugin packages to the `dynamic-plugins.yaml` section, including the connection and UI configuration: | ||
| + | ||
| [source,yaml] | ||
| ---- | ||
| kind: ConfigMap | ||
| apiVersion: v1 | ||
| metadata: | ||
| name: rhdh-plugin-config | ||
| data: | ||
| dynamic-plugins.yaml: | | ||
| includes: | ||
| - dynamic-plugins.default.yaml | ||
| plugins: | ||
| # ServiceNow Backend Plugin | ||
| - package: 'oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-servicenow-backend:bs_1.45.3__1.6.1' | ||
| disabled: false | ||
| pluginConfig: | ||
| servicenow: | ||
| instanceUrl: ${SERVICENOW_BASE_URL} | ||
| basicAuth: | ||
| username: ${SERVICENOW_USERNAME} | ||
| password: ${SERVICENOW_PASSWORD} | ||
|
|
||
| # ServiceNow Scaffolder Module | ||
| - package: 'oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-scaffolder-backend-module-servicenow:bs_1.49.4__2.15.0' | ||
| disabled: false | ||
| pluginConfig: | ||
| servicenow: | ||
| baseUrl: ${SERVICENOW_BASE_URL} | ||
| username: ${SERVICENOW_USERNAME} | ||
| password: ${SERVICENOW_PASSWORD} | ||
|
|
||
| # ServiceNow Frontend Plugin | ||
| - package: 'oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-servicenow:bs_1.45.3__1.6.0' | ||
| disabled: false | ||
| ---- | ||
|
|
||
| . Save the changes to the ConfigMap. | ||
|
|
||
| . Wait for the {product-very-short} Operator to redeploy the pods. The plugins are available once the pods are in a `Running` state. |
54 changes: 54 additions & 0 deletions
54
modules/shared/proc-link-servicenow-tickets-to-catalog-entities.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| :_mod-docs-content-type: PROCEDURE | ||
| [id="link-servicenow-tickets-to-catalog-entities_{context}"] | ||
| = Link ServiceNow tickets to catalog entities | ||
|
|
||
| [role="_abstract"] | ||
| The ServiceNow integration in {product} uses software catalog annotations to associate entities with ServiceNow records. By defining these identifiers, the ServiceNow plugin can retrieve and display relevant tickets and incidents directly within the component dashboard. | ||
|
|
||
| .Prerequisites | ||
| * The ServiceNow plugin is installed and configured in your {product} instance. | ||
| * You have the unique identifier (such as a Service ID or Category) for the ServiceNow resource you want to link. | ||
|
|
||
| .Procedure | ||
|
|
||
| . Open the `catalog-info.yaml` file of the component you want to link to ServiceNow. | ||
|
|
||
| . Add the `servicenow.com/service-id` annotation to the `metadata.annotations` section. | ||
| + | ||
| [source,yaml] | ||
| ---- | ||
| apiVersion: backstage.io/v1alpha1 | ||
| kind: Component | ||
| metadata: | ||
| name: example-component | ||
| annotations: | ||
| servicenow.com/service-id: <your-service-id> | ||
| ---- | ||
|
|
||
| `servicenow.com/<field-name>`:: | ||
| Annotation pattern for linking to ServiceNow records. Replace `<field-name>` with any ServiceNow table column name (such as `service-id`, `category`, `company`). The `servicenow.com/` prefix enables the ServiceNow tab. You can add multiple annotations to filter by different fields. | ||
|
|
||
| . Optional: If your organization uses different categories to filter tickets, you can also add the category annotation: | ||
| + | ||
| [source,yaml] | ||
| ---- | ||
| metadata: | ||
| annotations: | ||
| servicenow.com/category: "software" | ||
| ---- | ||
|
|
||
| metadata.annotations.servicenow.com/category:: Specifies the ServiceNow category used to filter the displayed incidents. | ||
|
|
||
| . Save the changes to `catalog-info.yaml` and commit them to your repository. | ||
|
|
||
| . If the changes do not appear automatically, manually refresh the entity in the {product} catalog. | ||
|
|
||
| .Verification | ||
|
|
||
| . Log in to your {product} and navigate to the *Catalog*. | ||
|
|
||
| . Select the component you updated. | ||
|
|
||
| . Select the *ServiceNow* tab. | ||
|
|
||
| . Confirm that the tab displays ServiceNow tickets or incidents associated with the provided ID. |
50 changes: 50 additions & 0 deletions
50
modules/shared/proc-use-servicenow-scaffolder-actions-in-software-templates.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| :_mod-docs-content-type: PROCEDURE | ||
| [id="use-servicenow-scaffolder-actions-in-software-templates_{context}"] | ||
| = Use ServiceNow scaffolder actions in software templates | ||
|
|
||
| [role="_abstract"] | ||
| Add ServiceNow actions to your software templates to automate the creation, retrieval, and modification of ServiceNow records during the software scaffolding process. | ||
|
|
||
| .Prerequisites | ||
|
|
||
| * You have configured the ServiceNow instance parameters in the {product}ConfigMap or app-config.yaml file. | ||
| * You have the required permissions to edit Software Templates in the source repository. | ||
| * You have registered the Software Template in the {product} catalog. | ||
|
|
||
| .Procedure | ||
|
|
||
| . Open your software template YAML file. | ||
|
|
||
| . In the `spec.steps` section, add the ServiceNow action that corresponds to your goal. | ||
|
|
||
| . Define the `tableName` and the `requestBody` containing the fields to populate or modify. The following example demonstrates how to use the `servicenow:now:table:createRecord` action to generate an incident ticket: | ||
| + | ||
| [source,yaml] | ||
| ---- | ||
| steps: | ||
| - id: create-incident | ||
| name: Create ServiceNow Incident | ||
| action: servicenow:now:table:createRecord | ||
| input: | ||
| tableName: incident | ||
| requestBody: | ||
| short_description: "New project scaffolded" | ||
| description: "A new software component was created via the Developer Hub." | ||
| severity: "3" | ||
| ---- | ||
|
|
||
| . Optional: To perform other operations, use the appropriate action ID and parameters: | ||
| + | ||
| |=== | ||
| | Goal | Action ID | Key Input Parameters | ||
|
|
||
| | **Delete a record** | `servicenow:now:table:deleteRecord` | `tableName`, `sysId` | ||
| | **Modify a record** | `servicenow:now:table:modifyRecord` | `tableName`, `sysId`, `requestBody` | ||
| | **Retrieve a record** | `servicenow:now:table:retrieveRecord` | `tableName`, `sysId` | ||
| | **Update a record** | `servicenow:now:table:updateRecord` | `tableName`, `sysId`, `requestBody` | ||
| |=== | ||
|
|
||
| [TIP] | ||
| ==== | ||
| To view the full schema and all available ServiceNow actions for your specific installation, navigate to **Create** > **Installed Actions** in the {product} interface. | ||
| ==== |
89 changes: 89 additions & 0 deletions
89
modules/shared/ref-servicenow-configuration-parameters.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| :_mod-docs-content-type: REFERENCE | ||
| [id="servicenow-configuration-parameters_{context}"] | ||
| = ServiceNow configuration parameters | ||
|
|
||
| [role="_abstract"] | ||
| 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. | ||
|
|
||
| == ServiceNow backend and frontend configuration | ||
| 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. | ||
|
|
||
| |=== | ||
| | Parameter | Description | Requirement | ||
|
|
||
| | `instanceUrl` | The base URL of your ServiceNow instance (e.g., `https://dev12345.service-now.com`). | Required | ||
| | `basicAuth.username` | The service account username for Basic authentication. | Optional | ||
| | `basicAuth.password` | The service account password for Basic authentication. | Optional | ||
| | `oauth.grantType` | The OAuth 2.0 grant type. Supports `client_credentials` or `password`. | Optional | ||
| | `oauth.clientId` | The client ID for OAuth authentication. | Optional | ||
| | `oauth.clientSecret` | The client secret for OAuth authentication. | Optional | ||
| |=== | ||
|
rh-tokeefe marked this conversation as resolved.
|
||
|
|
||
| == ServiceNow scaffolder configuration | ||
| The ServiceNow Scaffolder module requires a separate configuration block. Note that this module uses `baseUrl` instead of `instanceUrl`. | ||
|
|
||
| |=== | ||
| | Parameter | Description | Requirement | ||
|
|
||
| | `baseUrl` | The base URL of your ServiceNow instance. | Required | ||
| | `username` | The service account username. | Required for Basic Auth | ||
| | `password` | The service account password. | Required for Basic Auth | ||
| |=== | ||
|
|
||
| == Authentication examples | ||
| The following examples demonstrate how to structure different authentication methods in your configuration. | ||
|
|
||
| == Basic authentication example | ||
| [source,yaml] | ||
| ---- | ||
| servicenow: | ||
| instanceUrl: ${SERVICENOW_INSTANCE_URL} | ||
| basicAuth: | ||
| username: ${SERVICENOW_USER} | ||
| password: ${SERVICENOW_PASS} | ||
| ---- | ||
|
|
||
| == OAuth with Client Credentials | ||
| [source,yaml] | ||
| ---- | ||
| servicenow: | ||
| instanceUrl: ${SERVICENOW_INSTANCE_URL} | ||
| oauth: | ||
| grantType: client_credentials | ||
| clientId: ${SERVICENOW_CLIENT_ID} | ||
| clientSecret: ${SERVICENOW_CLIENT_SECRET} | ||
| ---- | ||
|
|
||
| == OAuth with Password Grant | ||
| [source,yaml] | ||
| ---- | ||
| servicenow: | ||
| instanceUrl: ${SERVICENOW_INSTANCE_URL} | ||
| oauth: | ||
| grantType: password | ||
| clientId: ${SERVICENOW_CLIENT_ID} | ||
| clientSecret: ${SERVICENOW_CLIENT_SECRET} | ||
| username: ${SERVICENOW_USER} | ||
| password: ${SERVICENOW_PASS} | ||
| ---- | ||
|
|
||
| == Frontend UI configuration | ||
| The frontend plugin configuration defines how ServiceNow data appears on component entity pages. | ||
|
|
||
| [source,yaml] | ||
| ---- | ||
| dynamicPlugins: | ||
| frontend: | ||
| backstage-community.plugin-servicenow: | ||
| entityTabs: | ||
| - path: /servicenow | ||
| title: ServiceNow | ||
| mountPoint: entity.page.servicenow | ||
| mountPoints: | ||
| - mountPoint: entity.page.servicenow/cards | ||
| importName: ServicenowPage | ||
| config: | ||
| layout: | ||
| gridColumn: 1 / -1 | ||
| height: 75vh | ||
| ---- | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.