Menu
AWS Single Sign-On
User Guide

Logging AWS SSO API Calls with AWS CloudTrail

AWS SSO is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service in AWS SSO. If you create a trail, you can enable continuous delivery of CloudTrail events to an Amazon S3 bucket, Amazon CloudWatch Logs, and Amazon CloudWatch Events. Using the information collected by CloudTrail, you can determine the request that was made to AWS SSO, the IP address from which the request was made, who made the request, when it was made, and additional details.

To learn more about CloudTrail, including how to configure and enable it, see the AWS CloudTrail User Guide.

AWS SSO Information in CloudTrail

When CloudTrail logging is enabled in your AWS account, API calls made to AWS SSO actions are tracked in log files. AWS SSO records are written together with other AWS service records in a log file. CloudTrail determines when to create and write to a new file based on a time period and file size.

The following actions are supported:

  • AssociateDirectory

  • AssociateProfile

  • CreateApplicationInstance

  • CreateApplicationInstanceCertificate

  • CreatePermissionSet

  • CreateProfile

  • DeleteApplicationInstance

  • DeleteApplicationInstanceCertificate

  • DeletePermissionsPolicy

  • DeletePermissionSet

  • DeleteProfile

  • DescribePermissionsPolicies

  • DisassociateDirectory

  • DisassociateProfile

  • GetApplicationInstance

  • GetApplicationTemplate

  • GetPermissionSet

  • GetSSOStatus

  • ImportApplicationInstanceServiceProviderMetadata

  • ListApplicationInstances

  • ListApplicationInstanceCertificates

  • ListApplicationTemplates

  • ListDirectoryAssociations

  • ListPermissionSets

  • ListProfileAssociations

  • ListProfiles

  • PutPermissionsPolicy

  • StartSSO

  • UpdateApplicationInstanceActiveCertificate

  • UpdateApplicationInstanceDisplayData

  • UpdateApplicationInstanceServiceProviderConfiguration

  • UpdateApplicationInstanceStatus

  • UpdateApplicationInstanceResponseConfiguration

  • UpdateApplicationInstanceResponseSchemaConfiguration

  • UpdateApplicationInstanceSecurityConfiguration

  • UpdateDirectoryAssociation

  • UpdateProfile

Every log entry contains information about who generated the request. The identity information in the log helps you determine whether the request was made by an AWS account root user or with IAM user credentials. You can also learn whether the request was made with temporary security credentials for a role or federated user or by another AWS service. For more information, see the CloudTrail userIdentity Element.

You can create a trail and store your log files in your Amazon S3 bucket for as long as you want. You can also define Amazon S3 lifecycle rules to archive or delete log files automatically. By default, your log files are encrypted with Amazon S3 server-side encryption (SSE).

To be notified of log file delivery, configure CloudTrail to publish Amazon SNS notifications when new log files are delivered. For more information, see Configuring Amazon SNS Notifications for CloudTrail.

You can also aggregate AWS SSO log files from multiple AWS regions and multiple AWS accounts into a single Amazon S3 bucket. For more information, see Receiving CloudTrail Log Files from Multiple Regions and Receiving CloudTrail Log Files from Multiple Accounts.

Understanding AWS SSO Log File Entries

A trail is a configuration that enables delivery of events as log files to an Amazon S3 bucket that you specify. CloudTrail log files contain one or more log entries. An event represents a single request from any source and includes information about the requested action, the date and time of the action, request parameters, and so on. CloudTrail log files are not an ordered stack trace of the public API calls, so they do not appear in any specific order.

The following example shows a CloudTrail log entry for an administrator (samadams@example.com) that took place in the AWS SSO console:

{ "Records":[ { "eventVersion":"1.05", "userIdentity":{ "type":"IAMUser", "principalId":"AIDAJAIENLMexample", "arn":"arn:aws:iam::08966example:user/samadams", "accountId":"08966example", "accessKeyId":"AKIAIIJM2K4example", "userName":"samadams" }, "eventTime":"2017-11-29T22:39:43Z", "eventSource":"sso.amazonaws.com", "eventName":"DescribePermissionsPolicies", "awsRegion":"us-east-1", "sourceIPAddress":"203.0.113.0", "userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36", "requestParameters":{ "permissionSetId":"ps-79a0dde74b95ed05" }, "responseElements":null, "requestID":"319ac6a1-d556-11e7-a34f-69a333106015", "eventID":"a93a952b-13dd-4ae5-a156-d3ad6220b071", "readOnly":true, "resources":[ ], "eventType":"AwsApiCall", "recipientAccountId":"08966example" } ] }

The following example shows a CloudTrail log entry for an end-user (bobsmith@example.com) action that took place in the AWS SSO user portal:

{ "Records":[ { "eventVersion":"1.05", "userIdentity":{ "type":"Unknown", "principalId":"example.com//S-1-5-21-1122334455-3652759393-4233131409-1126", "accountId":"08966example", "userName":"bobsmith@example.com" }, "eventTime":"2017-11-29T18:48:28Z", "eventSource":"sso.amazonaws.com", "eventName":"https://portal.sso.us-east-1.amazonaws.com/instance/appinstances", "awsRegion":"us-east-1", "sourceIPAddress":"203.0.113.0", "userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36", "requestParameters":null, "responseElements":null, "requestID":"de6c0435-ce4b-49c7-9bcc-bc5ed631ce04", "eventID":"e6e1f3df-9528-4c6d-a877-6b2b895d1f91", "eventType":"AwsApiCall", "recipientAccountId":"08966example" } ] }