
Overview
In this blog, I have outlined the steps to enable SAP BTP audit, retrieve logs, and provide details on all audit log subscriptions.
DISCLAIMER
The content of this blog post is provided “AS IS”. This information could contain technical inaccuracies, typographical errors, and out-of-date information. This document may be updated or changed without notice at any time. Use of the information is therefore at your own risk. In no event shall SAP be liable for special, indirect, incidental, or consequential damages resulting from or related to the use of this document.
Purpose
In this section, you can find information about audit log functionalities in the Cloud Foundry environment.
SAP Audit Log is a core, security, and compliance-based service within SAP BTP, designed for audit purposes. The Audit Log Service for SAP BTP Applications and Services offers the following features:
Default Features:
Compliance audit data from SAP BTP services and applications is written using the oAuth2 service plan. By default, this data is retained for 90 days at no additional cost, and retrieval of audit data within this period is managed through the Auditlog Management Service.
Advanced Features:
Write audit data from your own BTP applications., Configure the retention period.
These advanced features help you comply with SAP Product Standards and industry regulations. To enable them, you need to activate the premium edition service plan, which incurs additional costs based on usage, Audit logs are a special type of log that provide security-relevant chronological records, serving as documentary evidence for events or activities. The table below illustrates the differences between audit logs, activity logs, and application logs. Note that SAP Audit Log only stores audit logs written by SAP BTP services when actions are taken on your account data.
SAP BTP Audit API service Subscriptions.
3 plans or subscription SAP provided for BTP Audit logs
Premium Subscription :- Reach out to SAP with retantion period
Default Plan :- Fetch Audit log for subaccount
Central Plan :- Fetch Audit logs for Global account
SAP BTP Audit logs Enable / View
Prerequisite
You should have the SAP BTP CLI installed on your machine. Additionally, the Postman tool should be installed to retrieve logs.
Steps: –
Create Service Instance for Service:-
Create service instance via CLI command line :-
cf create-service auditlog-management default serviceInstance
I have named the instance "serviceInstance," but you can choose a name that suits your preference.
Create a key for the service instance:-
Create Key for service instance via CLI command line :-
cf create-service-key serviceInstance key
I have named the Key "key," but you can choose a name that suits your preference.
List the key of the service instance:-
cf service-key serviceInstance key
List all keys, users id, password and URLs.
All below info you will get from above command output
Client ID:-
Client secret:-
URL 1:- https://abc.eu10.hana.ondemand.com
URL2 :- https://auditlog-management.cfapps.eu10.hana.ondemand.com
Open postman tool and select post use URL1 with /oauth/token?grant_type=client_credentials extension for get new access token for retrieve audit logs.
Generate access token and use for GET audit logs from BTP sub account
Open postman tool and select post use URL2 with /auditlog/v2/auditlogrecords extension for retrieve audit logs.
All output will be formatted into JSON. You can copy this output and view it in Excel or use visualization tools for better structure.
You can use this JSON format to import into Excel or a visualization tool. Here’s how to do it:
For a more complex or customized data set, provide the details, and I'll format it accordingly.
2637286 - How to collect Audit Logs for SAP BTP
Useful for audit, review activities and fix development issues
I hope this document will help you with the BTP Audit log Enable and retrieve logs
Cheers!
Anikesh Jyotishi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
8 | |
6 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |