|
| 1 | +--- |
| 2 | +title: Basic Auth Access Strategy |
| 3 | +description: Generic basic auth authentication and authorization. |
| 4 | +sidebar_position: 1 |
| 5 | +--- |
| 6 | + |
| 7 | +# Basic Auth Access Strategy |
| 8 | + |
| 9 | +## Description |
| 10 | + |
| 11 | +The `basic-auth` access strategy is a generic access strategy that uses basic authentication for authentication and authorization. |
| 12 | +It doesn't specify how the credentials would be exchanged. |
| 13 | + |
| 14 | +To send Basic Authentication with HTTP requests, you include an Authorization header with your request. |
| 15 | +The header value is the word `Basic`, followed by a space, then a Base64-encoded string of `username:password`. |
| 16 | + |
| 17 | +The `accessStrategy`.`type` value for it is: `basic-auth`. |
| 18 | + |
| 19 | +## Optional Tenant HTTP Headers |
| 20 | + |
| 21 | +It may be necessary to indicate which tenant the information are requested for. |
| 22 | +This becomes necessary when the ORD Provider is multi-tenant and the metadata it provides is different across those tenants (system instance aware). |
| 23 | + |
| 24 | +The HTTP headers are optional and will only be sent by the ORD Aggregator if they are applicable and known by it. |
| 25 | + |
| 26 | +If the ORD Provider has metadata that is different per tenant and it understands the provided tenant IDs, it MUST return the ORD related information and metadata for the chosen tenant. |
| 27 | + |
| 28 | +> ℹ Please note that according to [RFC 7230 Section 3.2](https://www.rfc-editor.org/rfc/rfc7230#section-3.2) HTTP headers are case insensitive. |
| 29 | +
|
| 30 | +### Local-Tenant-Id |
| 31 | + |
| 32 | +The local tenant ID is the ID that the system instance itself created and uses to identify its tenants. |
| 33 | +It is passed along as a `Local-Tenant-Id` header. |
| 34 | + |
| 35 | +```http |
| 36 | +GET /.well-known/open-resource-discovery/document/1 |
| 37 | +Content-Type: application/json |
| 38 | +Local-Tenant-Id: 000023 |
| 39 | +``` |
| 40 | + |
| 41 | +### Global-Tenant-Id |
| 42 | + |
| 43 | +The global tenant ID is a globally unique ID for a system instance (tenant). The scope of uniqueness is within the connected aggregator. |
| 44 | +It is passed along as a `Global-Tenant-Id` header. |
| 45 | + |
| 46 | +```http |
| 47 | +GET /.well-known/open-resource-discovery/document/1 |
| 48 | +Content-Type: application/json |
| 49 | +Global-Tenant-Id: c6c80b52-ecc1-47f8-9303-0d55fb67fd41 |
| 50 | +``` |
| 51 | + |
| 52 | +### General Remarks |
| 53 | + |
| 54 | +> ℹ If the metadata is not different across tenants (system instance unaware), the response is static and the same across tenants. |
| 55 | +> In this case, this should be indicated via `systemInstanceAware`: `false` to avoid unnecessary requests for each tenant. |
0 commit comments