Configuration check
1. Overview
This endpoint provides online validation of a Connect2id server configuration. It can be used as part of a DevOps pipeline. The configuration checks are identical to those performed at server startup.
2. Web API overview
Resources | |
---|---|
Representations | Errors |
3. Resources
3.1 /config/check
3.1.1 POST
Validates a set of Connect2id server configuration properties.
Header parameters:
-
Content-Type Must be set to
text/plain
.
Body:
Success:
- Code:
204
Errors:
Example POST to validate a set of configuration properties:
POST /config/check HTTP/1.1
Host: c2id.com
Content-Type: text/plain
op.issuer = https://c2id.com
op.policy = https://c2id.com/policy.html
op.tos = https://c2id.com/tos.html
op.serviceDocs = https://c2id.com/service-docs.html
...
If the configuration properties validate with success the response is 204
:
HTTP/1.1 204 No Content
If a configuration property is found to be invalid the response is 400
with
a descriptive error message:
HTTP/1.1 400 Bad Request
Content-Type: application/json
{
"error" : "invalid_configuration_property",
"error_description" : "Missing property",
"error_uri" : "https://connect2id.com/products/server/docs/config/monitoring#monitor-apiAccessToken",
"property_name" : "monitor.apiAccessToken",
"property_value" : null
}
4. Representations
4.1 Configuration properties
A Connect2id server configuration property set, consisting of the combined properties for
-
core (
/WEB-INF/oidcProvider.properties
) -
session store (
/WEB-INF/sessionStore.properties
) -
authorisation store (
/WEB-INF/authzStore.properties
) -
monitoring (
/WEB-INF/monitor.properties
)
Empty lines, comments and unrecognised property names are ignored, in line with the rules for processing a Java properties file.
Example configuration property set:
op.issuer = https://c2id.com
op.policy = https://c2id.com/policy.html
op.tos = https://c2id.com/tos.html
op.serviceDocs = https://c2id.com/service-docs.html
...
5. Errors
400 Bad Request
Invalid or malformed configuration property.
The response body has the JSON object members:
-
error {“invalid_properties_format”|“invalid_configuration_property”} The
error code:
- invalid_properties_format – The submitted properties format is invalid.
- invalid_configuration_property – A configuration property is invalid or missing.
- error_description {string} The error description.
- [ error_uri ] {string} Link to online documentation for the configuration property, omitted if not applicable or not available.
-
[ property_name ] {string} The name of the invalid property, omitted or
null
if not applicable. -
[ property_value ] {string} The value of the invalid property, omitted if
not applicable,
null
if not specified or parsing of the value failed for some reason.
Example error for a missing configuration property:
HTTP/1.1 400 Bad Request
Content-Type: application/json
{
"error" : "invalid_configuration_property",
"error_description" : "Missing property",
"error_uri" : "https://connect2id.com/products/server/docs/config/monitoring#monitor-apiAccessToken",
"property_name" : "monitor.apiAccessToken",
"property_value" : null
}
Example error for an invalid JWS algorithm in a configuration property:
HTTP/1.1 400 Bad Request
Content-Type: application/json
{
"error" : "invalid_configuration_property",
"error_description" : "Unsupported ID token JWS algorithm(s)",
"error_uri" : "https://connect2id.com/products/server/docs/config/core#op-idToken-jwsAlgs",
"property_name" : "op.idToken.jwsAlgs",
"property_value" : "X256"
}
500 Internal Server Error
An internal server error has occurred. Check the Connect2id server logs for details.
Example:
HTTP/1.1 500 Internal Server Error