Amazon Cognito discovery
Summarize
Summary of Amazon Cognito discovery
The Amazon Cognito pattern in ServiceNow Discovery and Service Mapping enables authentication, authorization, and user management discovery functions for AWS customers. It requires the latest Discovery and Service Mapping Patterns application and runs on ServiceNow AI Platform versions London Patch 8, Madrid Patch 2, or later.
Show less
Prerequisites
- User permissions: Provide read-only access to the AWS Cognito ListUserPools API for effective data retrieval.
- AWS Credentials: Configure and activate AWS Credentials on your ServiceNow instance.
- Cloud service account: Set up a cloud service account linked to your AWS account ID, using the configured AWS Credentials.
Setup and Configuration
- Discovery schedule: Create and configure a cloud application schedule for AWS Cognito discovery, setting Discovery to Cloud application.
- Execution pattern: Define and activate serverless execution patterns for cloud application discovery, selecting the appropriate AWS Cognito pattern(s).
- Full AWS discovery schedule: Create a discovery schedule from the cloud service account to run all AWS patterns together.
- REST API permissions: Use the downloadable Cloud Discovery patterns spreadsheet to assign necessary user permissions and stay updated with quarterly pattern releases.
Data Collected
The AWS Cognito pattern collects key data about user pools, including:
- Main CI (cmdbcicloudauthentication): Name, object ID (account ID), and ARN (FQDN).
- Tags: Tag keys and values linked to Cognito resources.
It also establishes CI relationships, such as between cloud authentication and logical datacenters.
Troubleshooting
- Discovery timeout errors: If discovery fails due to REST timeout, increase the
mid.sa.cloud.requesttimeoutparameter on the MID Server (default 30000 ms). - Pattern Designer debug timeouts: For debug session timeouts, increase the
sa.debugger.maxtimeoutparameter on the MID Server (default 240 seconds).
The ServiceNow Discovery and Service Mapping applications use the Amazon AWS Cognito pattern to provide authentication, authorization, and user management functions for AWS customers. Discovering some of these resources may require updating to the latest version of the Discovery and Service Mapping Patterns application from the ServiceNow Store.
You can use this pattern on the ServiceNow AI Platform using London Patch 8, Madrid Patch 2, or later releases.
Request apps on the Store
Visit the ServiceNow Store website to view all the available apps and for information about submitting requests to the store. For cumulative release notes information for all released apps, see the ServiceNow Store version history release notes.
Prerequisites
- User permissions
- Provide user with read-only permission to run the following API:
- https://cognito-idp.<region>.amazonaws.com
- Method: POST
- Body: {\"MaxResults\": 10}
- Headers: X-Amz-Target:AWSCognitoIdentityProviderService.ListUserPools,Content-Type:application/x-amz-json-1.0
- AWS Credentials
- On your instance, configure credentials of type AWS Credentials and set to Active.
- Cloud service account
- On your instance, configure the cloud service account of type AWS Datacenter and set to AWS account ID. Use the credentials defined in the preceding AWS Credentials.
- Discovery schedule
- Create a cloud application schedule for discovering AWS Cognito and configure the attributes. Set Discovery to Cloud application.
- Execution pattern
- Create and define the serverless execution pattern for cloud application discovery.
- Create new Cloud Execution Patterns.
- Define Name.
- Verify that Active is true.
- Verify that Domain is global.
- Choose the AWS pattern you want to run.
- Create multiple records if you want to run more than one pattern.
- Discovery schedule for full AWS discovery
- Create a discovery schedule from your Cloud service account created in the earlier procedure.
Verify the REST API Permissions
Download the Cloud Discovery patterns spreadsheet so you can grant user permissions required for running the Discovery patterns. In addition to permissions, the spreadsheet also includes useful information such as pattern names, types, CI Classes, and links to vendor documentation. New patterns are available quarterly, so check periodically to be sure you have the latest version of the spreadsheet.
Data collected by Discovery and Service Mapping during horizontal and top-down discovery
The AWS Cognito pattern collects data.
| Field | Description |
|---|---|
| Main CI: cmdb_ci_cloud_authentication | |
| name | A descriptive name used to identify the user pool. |
| object_id | This is equal to the account_id and used by IRE identification rules. |
| Fqdn | Example of an ARN: arn:aws:cognito-idp:eu-west-1:751200741520:userpool/eu-west-1_fim5E2mix |
Tags are also being collected by an extension section that runs following the pattern. The tagging API for AWS specifies the resource type Cognito.
| Field | Description |
|---|---|
| cmdb_key_value | |
| key | The actual tag key. |
| value | The tag value. |
| configuration_item | The unique resource ID (ARN) that identifies the resource in the AWS console. |
CI relationships
| CI | Relationship | CI |
|---|---|---|
| Cloud authentication [cmdb_ci_cloud_authentication] | Hosts:Hosted on | Logical datacenter [cmdb_ci_logical_datacenter] |
Troubleshooting
| Symptom | Cause | Solution |
|---|---|---|
| Discovery fails. The discovery message contains the information about an error caused by the REST timeout. | There are many CIs sending the REST call response in the deployment. The MID Server cannot process the REST call response without exceeding the time limit controlled by the mid.sa.cloud.request_timeout parameter. | By default, the mid.sa.cloud.request_timeout parameter is set to 30000 milliseconds. Increase the value of this parameter on the relevant MID Server and run discovery again. Note: If the Configuration Parameters related list for the relevant MID Server does not show this parameter, you may need to add it. |
| Pattern Designer fails during a debug session. The Pattern Designer message contains information about an error caused by a timeout. | The Pattern Designer fails because of a timeout during pattern debugging (and not during discovery). | By default, the sa.debugger.max_timeoutparameter is set to 240 seconds. Increase the value of this parameter on the relevant MID Server. |