8 OCNRF configuration status REST APIs
API details
- scheme:- http, https
- the fixed string "://"
- authority (host and optional port) host and port will be CNCC host and port details
Table 8-1 API Details
| API | HTTP method supported | Description | HTTP response codes |
|---|---|---|---|
| {apiRoot}/nrf-status-data/v1/accessTokenSigningDataStatus | GET |
This API fetches Access Token Signing Data Status from OCNRF. OCNRF provides option to configure access token signing key and certificate details. Using this API, it can be checked that details provided are valid or not and specific key details can be used to sign the token. |
200 OK with AccessTokenSigningDataStatus, if Access Token Signing data details found. 200 OK with Empty List <AccessTokenSigningData> inside AccessTokenSigningDataStatus, if Access Token Signing data details not found. |
API example
Sample API:- {apiRoot}/nrf-status-data/v1/accessTokenSigningDataStatus
Method:- GET
Sample response:-
{
"dataTimeStamp":"2020-11-24T15:55:48.000Z",
"accessTokenSigningKeysCount": 2,
"accessTokenSigningData":[{"keyID": "KeyId01", "privateKey":{ "fileName": "KeyId01-privateKey.pem", "isValid": true, "invalidReason": null },
"certificate":{ "fileName": "KeyId01-publicCertificate.crt", "isValid": true, "invalidReason": null, "expiryTime": "2021-11-24T15:55:48.000Z"}
},
{"keyID": "KeyId02", "privateKey":{ "fileName": "KeyId02-privateKey.pem", "isValid": false, "invalidReason": "Key file not found" },
"certificate":{ "fileName": "KeyId02-publicCertificate.crt", "isValid": false, "invalidReason": "Key file not found", "expiryTime":null }
},
]
}Data Models
Table 8-2 AccessTokenSigningDataStatus
| Attribute | DataType | Description |
|---|---|---|
| dataTimeStamp | string | Time stamp when Data was retrieved |
| accessTokenSigningKeysCount | integer | Count of keys in response |
| accessTokenSigningData | array(AccessTokenSigningData) | See AccessTokenSigningData for details |
Table 8-3 AccessTokenSigningData
| Attribute | DataType | Description |
|---|---|---|
| keyID | string | Key Id for the Access Token Signing Data |
| privateKey | AccessTokenSigningDataDetails | Private key details corresponding to KeyId |
| certificate | AccessTokenSigningDataDetails | Public Certificate details corresponding to KeyId |
Table 8-4 AccessTokenSigningDataDetails
| Attribute | DataType | Description |
|---|---|---|
| fileName | string | File Name of the Private Key and Public Certificate |
| isValid | boolean (true or false) | Details provided are valid to use or not. |
| invalidReason | string | In case isValid value is false then the
reason why the key or certificate is not valid is provided are
invalidReason.
|
| expiryTime | string | This attribute is applicable only for certificate. This will tell when certificate will get expire. |