Sso Settings Api Test Sso Discovery

Sso Settings Api Test Sso Discovery
Validate an issuer and report problems without saving (Administrator only)

A missing or non-https issuer is 400 VALIDATION_FAILED. Every fetch or parse failure is a 200 with ok=false and one stable problem code, never IdP-supplied text: DISCOVERY_FETCH_BLOCKED (blocked, unreachable or timed-out fetch; its fixed message says the address was refused or the request did not complete and that an operator can permit a private issuer host with VTP_OIDC_PRIVATE_ISSUER_HOSTS), DISCOVERY_ERROR_STATUS, DISCOVERY_NOT_JSON, DISCOVERY_ISSUER_MISMATCH, DISCOVERY_MISSING_FIELD and DISCOVERY_UNAVAILABLE. Only the discovery document is fetched. Nothing is persisted or revoked.

Request
URI
POST
https://{api_host}/api/v1/settings/sso/test-discovery
COPY
Request Body

The issuer to test. When issuerUri is absent or blank the saved issuer is tested.

TestDiscoveryRequest of type(s) application/json
Optional
{
    "issuerUri": "https://idp.example.com/realms/example"
}
string
issuerUri
Optional
Constraints: maxLength: 2048

Issuer to check; defaults to the saved issuer when absent

Authentication
This operation uses the following authentication methods.
Responses
200

200 OK successful response envelope. ok is true when the issuer discovery document was fetched and parsed, otherwise ok is false with one stable problem code; a fetch or parse failure is never an error response

Returns TestDiscoveryResponse of type(s) application/json
{
    "ok": true,
    "problems": []
}
boolean
ok
Required  

True when no problem was found

array of object
problems
Required  

Problems found, empty when ok is true


400

400 Bad Request: VALIDATION_FAILED when no issuerUri is submitted and none is saved, or the issuer is not a plain https URL; MALFORMED_REQUEST when the body cannot be read

Returns ApiErrorResponse of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


401

401 Unauthorized: UNAUTHENTICATED when the VTP_SESSION cookie is missing, unknown, expired or revoked

Returns Unauthenticated of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


403

403 Forbidden: FORBIDDEN when the signed-in role is not allowed to call this operation; CSRF_ERROR when the X-XSRF-TOKEN header is missing or wrong on a POST, PUT, PATCH or DELETE (only POST /api/v1/auth/login is exempt, and a request without a valid session gets 401 UNAUTHENTICATED instead); PASSWORD_CHANGE_REQUIRED when the account must change its password first (only GET /api/v1/auth/session, POST /api/v1/auth/logout and POST /api/v1/auth/change-password are exempt); LICENSE_REQUIRED or LICENSE_EXPIRED while the license pool is restricted (no license, or expired past grace) (exempt: every route under /api/v1/auth, GET /api/v1/user/preferences, GET /api/v1/licensing/summary and POST /api/v1/licensing/licenses)

Returns ForbiddenWrite of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/api/v1/settings/sso/test-discovery