Hello!
I am currently studying IAM (Identity and Access Management) and am in the process of developing code to analyze user logs for each cloud service provider (CSP) with the goal of assigning minimum necessary permissions.
For AWS, I was able to extract the list of permissions used by a user by leveraging CloudTrail, which records all events performed by users. Based on these logs, I could specify a desired time range and extract the list of permissions used by a user during that period.
However, in GCP, despite enabling data read access for all services in Cloud Audit Logs, I encountered a challenge. Events such as SetIamPolicy or CreateRole, which involve changes in data, are logged. However, actions related to reading, such as checking the list of roles, are not captured in the logs. Consequently, I faced difficulty in extracting the list of permissions used by a user based on logs.
As an alternative, I explored the usage of the Recommender API’s security statistics to extract the permissions used by a user. However, it appears that I cannot specify a time range for the data extraction, and it seems to retrieve all permissions used in the last 90 days. Is there a way to extract the list of permissions used during a specific period within the last 90 days?
Additionally, I would like to inquire about the timing when a new role assignment starts to be recorded in security statistics when assigning a user a new role. If a user is assigned a new role, from what point in time does this new role appear in the security statistics?
Moreover, I observed that there is no information in the security statistics for groups. Is it possible to extract the list of permissions used by users belonging to a specific group from the security statistics?
I am curious to know if reading actions are not logged by default in console logs or if there might have been an issue with my approach.
If it turns out that not all user events are logged, I would appreciate any guidance on alternative methods to extract the list of all permissions used by a user within a specified time range.
Thank you in advance for your assistance.