This document is also available in these non-normative format: PDF
This document is licensed under
Creative Commons Attribution 4.0 International Public License
This is a proposed recommendation approved by TO. Comments regarding this document may be sent to api@logius.nl
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key words MUST and SHOULD in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
External Contract Reference is an extension on the Federated Service Connectivity (FSC) standard FSC Core. It can only be used in addition to the FSC Core specification. The purpose of the External Contract Reference extension is to allow delegation through contracts that are not defined by FSC. The External Contract Reference extension contains descriptions of the Properties that can be added to the ServiceConnectionGrant and the ServicePublicationGrant, and how these properties can be used by the FSC components.
The External Contract Reference specification is an extension of the Federated Service Connectivity (FSC) Core specification. This extension enables delegation of a Service publication and Service consumption through references to external contracts (contracts not defined by FSC).
In delegation as defined by FSC Core, the delegator organization MUST use a FSC Manager to create and sign Contracts. This extension addresses scenarios where the delegator lacks the technical capability to operate FSC infrastructure, allowing a delegatee (API provider or consumer) to act based on an external contract.
An API provider creates a Contract using a ServicePublicationGrant. In this Contract the API provider adds a reference to an existing (paper) contract using Properties. The Contract is received by the Peer acting as Directory. The Peer validates the reference manually or automatically, outside FSC with a custom component. The validation itself is out of scope for this extension. The Contract is accepted and the Service is published on behalf of the organization specified in the reference.
An API consumer creates a Contract with a ServiceConnectionGrant. In this Contract the API consumer adds a reference to an existing (paper) contract using Properties. The Contract is received by the API provider. The API provider validates the reference manually or automatically, outside FSC with a custom component. After validation the Contract is accepted and the API consumer can consume the Service on behalf of the organization specified in the reference.
This extension is developed as a temporary solution because external contracts defined in this extension cannot be validated by FSC components. This breaks the trust. In the future, this extension will be replaced by an extension that allows Delegators to sign contracts in a cryptographically secure manner without having to use an FSC Manager.
This section lists terms (#header) and abbreviations that are used in this document. This document assumes that the reader is familiar with the Terminology of FSC Core.
contract:
contract without a capital C is a contract that is not defined by FSC.
This chapter describes the architecture of an External Contract Reference.
The key architectural principle is trust transfer: the delegatee asserts authority to act on behalf of the delegator, backed by an external contract reference. The receiving party (Directory or API provider) performs validation of this assertion before accepting the Contract.
The External Contract Reference introduces a three-party trust model:
Trust is established through the external contract, which exists outside the FSC framework. The external contract reference serves as a pointer to evidence of this trust relationship.
When a Contract containing an External Contract Reference is received, the receiving organization:
The validation process itself is out of scope for this extension and MUST be performed manually or automatically by a component outside of FSC.
If validation fails, the Contract MUST be rejected. If validation succeeds, the Contract follows the FSC Core Contract lifecycle rules.
When an API provider publishes a Service on behalf of a delegator organization, the following architectural flow is executed:
Step-by-step process:
Grant Creation: The Manager of the API provider creates a ServicePublicationGrant containing the property delegation.publication.external_contract_reference. This object contains three fields:
reference - URL or identifier of the external contractdelegator_id - Identity of the delegator organizationdelegator_name - Name of the delegator organizationContract Transmission: The Manager of the API provider creates a Contract containing the ServicePublicationGrant and transmits it to the Manager of the Directory.
Validation: The Directory performs validation of the External Contract Reference according to the validation requirements in Section 2.2
Contract Acceptance or Rejection:
Contract Completion: Upon receiving the signed Contract, the API provider signs it, making the Contract valid according to FSC Core rules
Service Publication: The Service is now published in the Directory on behalf of the delegator organization
The Directory MUST:
delegation.publication.external_contract_reference in the Service discovery responses to indicate the true Service ownerWhen an API consumer consumes a Service on behalf of an organization, the following architectural flow is executed:
Step-by-step process:
Grant Creation: The Manager of the API consumer creates a ServiceConnectionGrant containing the Property delegation.connection.external_contract_reference. This object contains three fields:
reference - URL or identifier of the external contractdelegator_id - Identity of the delegator organizationdelegator_name - Name of the delegator organizationContract Transmission: The Manager of the API consumer creates a Contract containing the ServiceConnectionGrant and transmits it to the Manager of the API provider.
Validation: The API provider performs validation of the External Contract Reference according to the validation requirements in Section 2.2
Contract Acceptance or Rejection:
Contract Completion: Upon receiving the signed Contract, the API consumer signs it, making the Contract valid according to FSC Core rules
Service Access: The API consumer can now access the Service on behalf of the delegator organization
API providers can use the delegation.connection.external_contract_reference added in the prp of the access token to:
The architectural flow of external contract reference properties through the system:
ServicePublicationGrant or ServiceConnectionGrantprp claim when API consumer requests accessadditional_dataThis end-to-end propagation ensures complete traceability and auditability of delegated service access.
This extension integrates with FSC Core as follows:
ServicePublicationGrant and ServiceConnectionGrantThe External Contract Reference can be added to the ServiceConnectionGrant and ServicePublicationGrant using Properties.
The Grants and Properties are both defined in FSC Core.
All properties are required when using the delegation.connection.external_contract_reference object.
Example:
{
"delegation.connection.external_contract_reference": {
"reference": "https://linktocontract.nl/1",
"delegator_id": "12345678901234567890",
"delegator_name": "Example organisation"
}
}
All properties are required when using the delegation.publication.external_contract_reference object.
Example:
{
"delegation.publication.external_contract_reference": {
"reference": "https://linktocontract.com/1",
"delegator_id": "12345678901234567890",
"delegator_name": "Example organisation"
}
}
In Groups that use the Transaction log extension the External Contract Reference properties MUST be stored as additional_data in the transaction log.
Example Transaction Log record:
{
"transaction_id": "019a7dea-9048-7c4d-9e66-4d3f75a18f58",
"direction": "DIRECTION_INCOMING",
"grant_hash": "$1$4$+PQI7we01qIfEwq4O5UioLKzjGBgRva6F5+bUfDlKxUjcY5yX1MRsn6NKquDbL8VcklhYO9sk18rHD6La3w/mg",
"source": {
"type": "SOURCE_TYPE_SOURCE",
"outway_peer_id": "12345678901234567891"
},
"destination": {
"type": "DESTINATION_TYPE_DESTINATION",
"service_peer_id": "12345678901234567891"
},
"service_name": "random_service_name",
"additional_data": {
"delegation.connection.external_contract_reference": {
"reference": "https://linktocontract.com/1",
"delegator_id": "12345678901234567890",
"delegator_name": "Example organization"
}
}
"created_at": 1672527600
}
The External Contract Reference properties are added to the Access Token. FSC Core defines that properties added to a Grant MUST be added the access token as the prp claim.
Example access token bases on a ServiceConnectionGrant with an External Contract Reference.
{
"gid": "fsc.group.example.id",
"gth": "$1$3$n4kellB6p2-VjrriscICkH3P5flgMmG6rX7MFIF3cU2Y2OVysoU6W903TkGCH3u_bB1XhOgdOVFhLCVj1iFnNg",
"sub": "12345678901234567890",
"iss": "12345678901234567891",
"svc": "test",
"aud": "https://inway.organization-b.open-fsc.localhost:443",
"exp": 1493726400,
"nbf": 1493722800,
"cnf": {
"x5t#S256": "06QekfpQ2IkYWhXyZqz3T1llvPEqDYYO0UyETSr7QdU"
},
"prp": {
"delegation.connection.external_contract_reference": {
"reference": "https://linktocontract.com/1",
"delegator_id": "12345678901234567893",
"delegator_name": "Example organization"
}
}
}
The Inway MUST include External Contract Reference properties in the Transaction Log records as additional_data when the Logging extension is used.
The Outway MUST include External Contract Reference properties in the Transaction Log records as additional_data when the Logging extension is used.