Skip to main content

SAP Core Policy Level (v1.0)

Description​

This policy level MUST be fulfilled by all SAP applications and services; exceptions are allowed only on a case-by-case basis.

It builds on SAP Base v1 and SAP Documentation v1 and inherits all their expectations.

It defines the core rules and guidelines shared across SAP, although more specific rules and guidelines MAY be applied on top. All constraints of the ORD specification itself still apply (the document must remain a valid ORD document); the constraints here come on top and may be stricter than the base spec where it intentionally leaves room for exceptional use cases.

Context Specific Policies​

SAP specific access strategies​

SAP applications and services MUST support SAP specific access strategies:

The accessStrategy open MUST NOT be used without explicit consent by the responsible security experts, especially when the metadata could expose tenant (customer) specific information.

Access strategy for resource definitions​

If the access strategy for retrieving the document differs from the retrieval of the resource definitions: At least one access strategy MUST also be provided for the resource definitions.

Applies when: the access strategy for retrieving the document differs from the retrieval of the resource definitions

Use a recent ORD specification version​

ORD documents SHOULD use a recent ORD specification version in openResourceDiscovery. Validators SHOULD report a warning when the declared version is more than three minor versions behind the latest ORD version they support. This recommendation does not invalidate documents that conform to an older supported ORD version.

Governance Guidelines for API Packages​

For Packages with policy level sap, the Governance Guidelines for API Packages MUST be followed.

  • This includes current limitations:
    • Packages MUST NOT be shared by multiple provider (source) systems
    • Packages MUST NOT contain mixed resource types. E.g., a Package must only contain either APIs or Events, but never both together.

Mixed visibility within a Package​

A Package can contain resources with different visibility values. Each resource and its definitions remain subject to their existing visibility rules.

Provide a Consumption Bundle for consumable API Resources​

For public or internal API Resources with inbound or mixed direction (consumption pattern): SHOULD provide and assign a Consumption Bundle. This is necessary as some SAP ORD Consumers rely on Consumption Bundles to find and navigate accessible resources.

Applies when: the API Resource is public or internal with inbound or mixed direction

Guidelines for publishing API Resources​

For API Resources the Guidelines for publishing API Resources on the SAP Business Accelerator Hub MUST be followed according to our internal API and external API guidelines. The first link includes a decision table for internal vs. external, which corresponds to visibility internal vs. public in ORD.

Extensible must be provided​

The extensible property MUST be provided.

Required resource definitions per API protocol​

For API Resources with visibility: "public" or "internal":

  • Resource definitions MUST be provided for OData, REST, GraphQL and SOAP APIs.
  • OData APIs MUST have a resource definition of "type": "edmx" AND additionally one of either "type": "openapi-v3" or "type": "openapi-v2".
  • Plain REST APIs MUST have a resource definition of "type": "openapi-v3" (RECOMMENDED) or "type": "openapi-v2".
  • GraphQL APIs MUST have a resource definition of "type": "graphql-sdl".
  • SOAP APIs MUST have a resource definition of "type": "wsdl-v2" (RECOMMENDED) or "type": "wsdl-v1".

Applies when: visibility is public or internal

Validate OpenAPI definitions​

OpenAPI definitions SHOULD be validated via the SAP API Metadata Validator, using sap:core:v1 compliance level.

API Harmonization Guideline (out of scope)​

The SAP API Harmonization Guideline rules MAY be adhered, but are not part of the sap:core:v1 scope.

  • We intend to release an additional policy level (sap:core:v2?) that includes this as MUST requirement.

Governance Guidelines for Events​

For Event Resources the Governance Guidelines for Events MUST be followed.

Extensible must be provided​

The extensible property MUST be provided.

Required resource definitions for Event Resources​

For Event Resources with visibility: "public" or "internal":

  • Resource definitions MUST be provided.
  • CloudEvents MUST have a resource definition of "type": "asyncapi-v2" (see AsyncAPI specification 2.0).
  • SAP Business Events (that conform to the SAP Event Specification:
    • MUST use the SAP Event Catalog standard, which is compatible to AsyncAPI 2.0 ("type": "asyncapi-v2").
    • MUST NOT be part of a Consumption Bundle.
      • Events can only be consumed at an intermediary, i.e., the SAP Event Mesh.
      • Consequently, the producing application cannot describe how they are eventually consumed.

Applies when: visibility is public or internal

Validate SAP Event Catalogs​

SAP Event Catalogs SHOULD be validated via the SAP API Metadata Validator, using sap:core:v1 compliance level.

Entity Type definition visibility​

Entity Type definitions MUST have visibility set to either private or internal (stricter than the base spec, which permits public for exceptional open-standardization cases).

Extensible description follows TG12.R2​

If the mandatory Extensible object has a description, it MUST follow the guidance and rules of the SAP Technology Guideline TG12.R2.

Applies when: the mandatory Extensible object has a description

System type restriction for SAP Event Broker subscriptions​

If an Integration Dependency is used to indicate Subscription Content for the SAP Event Broker:

  • Each EventResourceIntegrationAspect MUST provide exactly one systemTypeRestriction application namespace. The value of the systemTypeRestriction MUST always be the same within an integration dependency. These limitation MAY be reconsidered in the future.

Applies when: an Integration Dependency is used to indicate Subscription Content for the SAP Event Broker

Overlays must identify their target​

Standalone Overlay Resources MUST identify the input through their required targets entry, including explicit input visibility. Legacy attached ORD Overlays MUST identify the resource being patched through the overlay file's target.ordId.

Standardize on the ORD Overlay format​

SAP applications and services MUST use type: "ord:overlay:v1" as the overlay format for all published overlays. The oas-overlay-v1 type is supported by the ORD specification for interoperability with the OpenAPI Initiative Overlay ecosystem, but within SAP we standardize on ORD Overlay because it works uniformly across all metadata formats we publish (OpenAPI, AsyncAPI, OData EDMX/CSDL, A2A, MCP, CSN Interop) and integrates with ORD identifiers, purpose, and visibility.

Overlay visibility​

All ORD Overlays governed by this policy MUST have an effective visibility of internal or private, regardless of their purpose or publishing mechanism.

The existing ORD restriction that a resource definition's visibility MUST NOT be less restrictive than the visibility of its containing resource continues to apply.

Workflow Capabilities​

For workflow capabilities published by SAP applications and services, if the definitions property is provided, it SHOULD contain at least one definition with type: "arazzo-v1".

Applies when: a workflow capability published by an SAP application or service provides definitions

Registered Correlation ID types​

With ORD comes a Correlation ID concept.

All correlations that target an sap.* namespace MUST use registered correlation ID types. Like the namespaces, they can be registered in the SAP namespace-registry.

This will help us to 1) achieve internal consistency that we can also automatically validate and 2) get an overview of valid and registered Correlation ID Types.

General Policies​

Namespaces must be registered​

All SAP namespaces MUST be registered in the SAP namespace-registry.

  • All SAP applications MUST use the sap vendor namespace.

Publish at least one static perspective​

SAP applications and services MUST publish at least one applicable static perspective (system-type, system-version, or both).

Keep correlation with existing Business Hub IDs​

IF the resources have already been published to the public SAP Business Accelerator Hub we MUST somehow keep a correlation between their ORD ID and already existing Business Hub ID. This is necessary to keep existing URLs stable and to ensure we update the existing entries, not create new ones.

Preferred Approach:

  • Get in touch with the Business Hub colleagues, to clarify which existing packages need to be associated with the registered namespace (from step above).
  • Keep the <resourceId> fragment of the ORD ID identical to the ID that was previously published on the Business Accelerator Hub.
  • Alternatively, add a Correlation ID to the resource:
    • Add a correlationIds entry, that starts with sap.businesshub namespace and then the Business Accelerator Hub concept name (that is also part of the Old URL), e.g. api or package
    • Package Example: { "ordId": "sap.s4:package:SomeName:v1", "correlationIds": ["sap.businesshub:package:SAPS4HANACloud"] }
    • API Example: { "ordId": "sap.s4:apiResource:AccountingDocumentRead:v1", "correlationIds": ["sap.businesshub:api:API_OPLACCTGDOCITEMCUBE_SRV"] }

Applies when: the resources have already been published to the public SAP Business Accelerator Hub