Communication Scenario 467:
Printing – Notification Integration¶
Literature - SAP documentation
Refer to SAP_COM_0467 for further information.
The communication scenario 467 extends the communication scenario 466 by adding a notification route to the seal-cpm-checkin service. The notification route is used by the SAP system to notify PLOSSYS Output Engine about jobs to print.
Set up communication scenario SAP_COM_0467 on the SAP side first, using the section matching your deployment type below. Then configure the seal-cpm-checkin service with the values obtained there.
Configure SAP_COM_0467 in SAP (Private Cloud)¶
For on-premise and private cloud systems:
-
Activate the OData service
API_CLOUD_PRINT_PULL_SRVon the SAP system, following SAP Basis Configuration - Server - System Description as of version 1.5.1, chapter OData Service Activation. -
Create or use a technical user with the rights described in SAP Note 3420465 - Print queues in on-premise systems.
-
Ensure the
seal-cpm-checkinservice URL is reachable from within the SAP system landscape. -
Note the SAP system's host, port, and the technical user's name and password; they are used in Configure the cpm-checkin Service and below.
Configure SAP_COM_0467 in SAP (Public Cloud)¶
This section describes only the SAP-side setup, using the Communication Management apps of SAP S/4HANA Cloud Public Edition. It does not apply to on-premise or private cloud systems, see Requirements for their SAP-side setup. The system URL, user and password obtained here are used in Configure the cpm-checkin Service and below.
seal-cpm-checkinrequires a certificate issued by an official certification authority, with the correct DNS names for the notification route. The certificate must be added to SAP's list of trusted certificates, see Maintain Trusted Certificates.
Prerequisites¶
-
The solution process
1LQ Output Managementis installed in the SAP system. -
A user with the business roles
Communication Management(SAP_CORE_BC_COM) andOutput Management(SAP_CORE_BC_OMorSAP_CORE_BC_OM_PRT) is available. Without these roles, the configuration steps below cannot be performed.
Check Communication Scenario SAP_COM_0467¶
-
Sign in to the SAP S/4HANA system with the user described above.
-
Go to the
Communication Managementsection and start the appDisplay Communication Scenarios. -
Find the communication scenario described above in the list. If the entry does not exist, the system is not set up correctly; contact SAP.
Create a Communication User¶
-
Go to the
Communication Managementsection and start the appMaintain Communication Users. -
Create a new user for this scenario: enter user name, description and a password, or use
Propose Password. Do not use the certificate section; only basic authentication is currently implemented. -
Press
Createto save the new user.
Create a Communication System¶
-
Go to the
Communication Managementsection and start the appCommunication Systems. -
Create a new communication system, using a System ID that was not used before. The System Name is filled automatically; keep it unchanged to avoid confusion.
-
In the
Generalsection, enter the host name or IP address and port of the notification route that SAP sends notifications to. -
In the
Users for Inbound Communicationsection, add the communication user created above. -
In the
Users for Outbound Communicationsection, add a user accepted by PLOSSYS Output Engine. -
Save the communication system.
Create a Communication Arrangement¶
-
Go to the
Communication Managementsection and start the appCommunication Arrangements. -
Create a new communication arrangement for the communication scenario described above, referencing the communication system created above. The user name is filled automatically with the communication user created earlier.
-
Save the arrangement.
Create a Print Queue¶
-
Go to the
Output Managementsection and start the appMaintain Print Queues. -
Create a new print queue of type
OMS for Notification Integration Queue— the default queue type is for SAP's own Cloud Print Manager and does not appear in the OMS. -
Enter a name and description for the queue, choose a format, and select the communication user and arrangement created above.
-
Choose the notification type: a single notification, or one notification per given number of items, sent out either once that number is reached or after 3 minutes as a fallback.
-
Note the system URL shown at the bottom of the print queue list; it is needed in Configure the cpm-checkin Service and below.
A communication user can have any number of print queues. When changing the user or the notification destination of a communication arrangement, the print queue names using that user can be updated automatically via the arrangement's additional properties.
Configure SAP_COM_0467 in SAP (BTP)¶
This section assumes the pull integration for SAP BTP is already configured. SAP BTP does not use communication scenarios; push notifications are configured per service instance using a BTP destination instead.
-
In the SAP BTP cockpit, go to the
Connectivitysection, openDestinationsand create a new destination:Type:HTTPURL: the notification route of theseal-cpm-checkinservice, see belowProxy Type:InternetAuthentication: matching theAUTH_TYPEconfigured forseal-cpm-checkin, e.g.BasicAuthenticationwith the user and password expected byHTPASSWD
If the notification route's certificate is not signed by a public certification authority, add it to the destination's own trust store instead of using the default trust store.
Hint - Check Connection may report a false error
In the Cloud Foundry environment, a destination's
Check Connectionbutton only performs a plain HTTPHEADrequest; it does not send the configured authentication header and does not build up the trust store. AnSSLHandshakeor401error reported there does not necessarily mean the destination is misconfigured (see SAP KBA 3245877). Verify the connection by sending an actual print job instead. -
Update the service instance created for pull integration - or create a new one - with the following configuration parameters (JSON), replacing
<destination>with the name of the destination created above:{ "notifications": [ { "destinationName": "<destination>", "usage": "OMS" } ] } -
In the
Maintain Print Queuesapp, assign the updated service instance to the print queue asPrint Userand choose a notification type, e.g.Single Notification.
Failed notifications are retried by SAP up to three times; after that, an error is logged to the subaccount's Audit Log Service instead of being redelivered.
Notification Route¶
The general URL of the notification route is:
https://<oms_host>:<oms_port>/v1/jobs/notification
<oms_host> and <oms_port> are host and port of the seal-cpm-checkin service, see seal-cpm-checkin in the port list for the default port.
Example - notification route URL
https://out-ngn-server.example.com:2148/v1/jobs/notification
For the notification route to work correctly and secure, the following service keys need to be configured:
-
TLS_EXTERNAL_DIR: Directory with TLS certificates and keys used for TLS encryption and authentication -
USE_HTTP: Optional, if set totrue, theseal-cpm-checkinservice will only use HTTP for communication with the SAP system. This is useful for cloud environments that handle traffic via load balancers and nginx controllers. Default isfalse.
Logging¶
If LOG_SAP_API_CALLS is set to true, incoming notification requests sent by SAP to the notification route are logged in addition to the outgoing API calls made to SAP.
Authentication¶
Since SAP calls the notification route to deliver print job notifications, it must be secured against unauthorized access. The authentication type is configured with the following key:
AUTH_TYPE: The authentication type to use for the notification route, possible values arenone,basic,certandoidc, default isnone. Depending on the authentication type, different environment keys are required.
Caution - AUTH_TYPE none and basic
The AUTH_TYPE none is dangerous, because it allows any user to access the notification route without authentication. Do not expose the seal-cpm-checkin service to the internet if you use this authentication type.
basic authentication is risky because credentials are sent with every request. Use it only over HTTPS/TLS and only if no better option exists. Prefer modern auth (oidc or cert) for production.
Certificate Authentication¶
Requirements:
AUTH_TYPEis set tocert- For
AUTH_TYPEcertto work theTLS_EXTERNAL_DIRdirectory may need to contain the certification authority certificateca.pem.
Certificate authentication is handled at the TLS layer (mutual TLS). No further environment keys are required.
OIDC Authentication¶
Requirements:
AUTH_TYPEis set tooidc
When using OIDC authentication, the following environment keys are relevant:
-
AUTH_ISSUER_URL: URL of the OIDC identity provider. Used to fetch the provider's public signing key via the OpenID Connect discovery document. Mandatory unlessID_PROVIDER_CERTis set. -
ID_PROVIDER_CERT: Path to a static certificate file used to verify the token signature instead of fetching it viaAUTH_ISSUER_URL. Optional, alternative toAUTH_ISSUER_URL. -
AUTH_PROXY: Optional URL of a proxy for accessing the OIDC identity provider, only relevant whenAUTH_ISSUER_URLis used. -
ID_PROVIDER_NAME: Expected issuer of the token. Mandatory. -
TRUSTED_CLIENT: Expected client name of the token, checked against itsazporaudclaim. Default issap.
Basic Authentication¶
Requirements:
AUTH_TYPEis set tobasic
When using basic authentication, the following environment keys are available.
-
HTPASSWD_FILE: File with user/password combinations for basic authentication. -
HTPASSWD: Single user/password combinations for basic authentication, has priority overHTPASSWD_FILE.
Test the Connection (Public Cloud)¶
This section applies to the public cloud SAP-side setup and assumes Configure the cpm-checkin Service and the Notification Route/Authentication configuration above are already done.
-
Use the system URL, together with the user and password created earlier, to connect PLOSSYS Output Engine to the SAP S/4HANA system.
-
From the
Maintain Print Queuesapp, create a few test pages without an assigned printer for the print queue. They should appear with statusnewin both SAP and PLOSSYS Output Engine. -
Assign a physical printer to the print queue in PLOSSYS Output Engine.
-
The queued documents should print, and their status in SAP should change to
successful.