{"id":16163324,"url":"https://github.com/gregorwolf/sap-support-message-reporting","last_synced_at":"2025-03-16T10:30:39.546Z","repository":{"id":43363811,"uuid":"342649451","full_name":"gregorwolf/sap-support-message-reporting","owner":"gregorwolf","description":"SAP Support Message Reporting","archived":false,"fork":false,"pushed_at":"2024-08-26T14:17:33.000Z","size":4291,"stargazers_count":19,"open_issues_count":4,"forks_count":5,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-02-27T07:30:46.309Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregorwolf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["gregorwolf"],"patreon":null,"open_collective":null,"ko_fi":"gregorwolf","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-02-26T17:26:15.000Z","updated_at":"2024-08-26T14:17:37.000Z","dependencies_parsed_at":"2022-07-09T06:16:11.750Z","dependency_job_id":"40fd4c2f-3aa5-44a3-b0a0-3d0fcf2e1125","html_url":"https://github.com/gregorwolf/sap-support-message-reporting","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorwolf%2Fsap-support-message-reporting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorwolf%2Fsap-support-message-reporting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorwolf%2Fsap-support-message-reporting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorwolf%2Fsap-support-message-reporting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregorwolf","download_url":"https://codeload.github.com/gregorwolf/sap-support-message-reporting/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243809888,"owners_count":20351407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T02:35:17.021Z","updated_at":"2025-03-16T10:30:38.977Z","avatar_url":"https://github.com/gregorwolf.png","language":"JavaScript","funding_links":["https://github.com/sponsors/gregorwolf","https://ko-fi.com/gregorwolf"],"categories":[],"sub_categories":[],"readme":"# SAP Support Message Reporting\n\nReplicate data from SAP Support Launchpad Incident OData service for local reporting.\n\n## Architecture\n\n![Architecture](assets/Architecture.png)\n\n## Current functionality\n\nCurrently two visualizations are implemented. An Overview Page:\n\n![Overview Page](assets/OVP.png)\n\nand an Analytical List Page:\n\n![Analytical List Page](assets/ALP.png)\n\n## TODO\n\n- [x] Load data from mock\n- [x] Load data SAP Service Marketplace\n- [x] Docker Image\n- [ ] Add reporting for the event log (MessageAlogSet)\n- [x] Find a user friendly way to maintain the Authentication Cookie. Using the SAP Passport (X.509 Client Certificate) would be a good option. Here [using SSL Certificate with Axios](https://stackoverflow.com/questions/51363855/how-to-configure-axios-to-use-ssl-certificate) might help.\n- [ ] Deploy to SAP HANA Cloud \u0026 SAP BTP Cloud Foundry\n- [ ] Expose Data to SAP Analytics Cloud\n- [ ] Implement further reports in SAP Analytics Cloud\n\n## Start the project with sample data\n\nTo run the project with sample data you can directly use `npm start`.\n\n## Load Data from SAP Service Marketplace\n\n### Getting Cookie using SAP Passport Certificate\n\nTo load data from OSS add the following content to the _default-env.json_ file in the root folder:\n\n```JSON\n{\n  \"VCAP_SERVICES\": {},\n  \"destinations\": [\n    {\n      \"destination\": \"OSS\",\n      \"url\": \"https://launchpad.support.sap.com\",\n      \"credentials\": {}\n    }\n  ],\n  \"OSS_COOKIE\": {\n    \"cookie\": \"\u003cYour Cookie\u003e\"\n  }\n}\n```\n\nyou can now replace `\u003cYour Cookie\u003e` with the content of [your cookie that you've got from your browser](#update-mock-data-with-your-own-incidents). The other option is to use the SAP Passport (X.509 Client Certificate). At https://launchpad.support.sap.com/#/sappassport all S-Users can get their SAP Passport and install it into their local certificate store to Single Sign On (SSO) to the SAP Service Marketplace. [With this steps](https://www.ibm.com/support/knowledgecenter/SSVP8U_9.7.0/com.ibm.drlive.doc/topics/r_extratsslcert.html) the resulting PFX file can be prepared to be used with curl and NodeJS:\n\n```\nopenssl pkcs12 -in s-user.pfx -nocerts -out s-user.key\nopenssl pkcs12 -in s-user.pfx -clcerts -nokeys -out s-user.crt\nopenssl rsa -in s-user.key -out s-user-decrypted.key\n```\n\nThen run `npm run cookie:update` to update the cookie in _default-env.json_.\n\nThen start the project with `npm start` and execute the _loadDataFromSAP_ request in the _test/cap-endpoint.http_ file.\n\n### Getting Cookie using the browser developer tools\n\nIf you want to update the mock date in the srv/data folder with your own SAP Incidents, then open your Browser, activate the Development tools, switch to the network tab and then open the URL:\n\nhttps://launchpad.support.sap.com/services/odata/incidentws/?$format=json\n\nYou need to login with your SAP User. Open the details of the request and look for the Request Headers:\n\n![Cookie](assets/cookies.png)\n\nYou find the Cookies. Copy the content of the Cookies header and add it's content to a file named .env in the test folder. The Content should look like that:\n\n```\ncookie=\"JTENANTSESSIONID_supportportal....\"\n```\n\nWhen you've done that make sure that you've opened this project in VS Code and the [REST Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) is installed. Open the test/get-data-from-sap.http file and execute the first two requests. With the result you can fill the corresponding files in the srv/data folder. To protect the privacy only specific columns are selected. If you comment the lines starting with _\u0026$select=_ with a # you will get all data.\n\n## Run from Docker image\n\nFirst time start:\n\n```\ndocker run --name sap-support-message-reporting -i -p 4004:4004 gregorwolf/sap-support-message-reporting:latest\n```\n\n[Load Data from Mock Service](#load-data-from-mock-service)\n\nThen open http://localhost:4004 in the browser.\n\nStop:\n\n```\ndocker stop sap-support-message-reporting\n```\n\nStart:\n\n```\ndocker start -i sap-support-message-reporting\n```\n\nRemove:\n\n```\ndocker rm sap-support-message-reporting\n```\n\n## Deploy to Kyma\n\nDownload the kubeconfig from your Kyma instance via the menu behind the account Icon in the upper right corner. Save it in _~/.kube/kubeconfig-kyma.yml_. Then run:\n\n```\nexport KUBECONFIG=~/.kube/kubeconfig-kyma.yml\n```\n\nPlease note that the token in the kubeconfig is [only valid for 8 hours](https://kyma-project.io/docs/components/security#details-iam-kubeconfig-service). So you might have to redo the download whenever you want to run the commands again.\n\nTo keep this project separate from your other deployments I would suggest to create a namespace:\n\n```\nkubectl create namespace sap-support-message-reporting\n```\n\nDeploy the configuration:\n\n```\nkubectl -n sap-support-message-reporting apply -f kyma/deployment.yaml\n```\n\nUpdate the container:\n\n```\nkubectl -n sap-support-message-reporting rollout restart deployment/sap-support-message-reporting\n```\n\nIf you want to delete the deployment, then run:\n\n```\nkubectl -n sap-support-message-reporting delete -f kyma/deployment.yaml\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorwolf%2Fsap-support-message-reporting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregorwolf%2Fsap-support-message-reporting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorwolf%2Fsap-support-message-reporting/lists"}