Authorization Resource unknown or not protected while issuing commands in CA 7 REST API
{
"error": "UNAUTHORIZED",
"status": 401,
"message": "CA 7 Exception: The request to nnnn:nnnn was unsuccessful. Cause: 400 BAD_REQUEST \"CA 7 Exception: Error sending authorization request to nnnn:nnnn, endpoint alias: JOBDEFREQPRED, reason: Authorization Resource unknown or not protected CA7n\"",
"ca7-configuration-name": "nnnn_INSTANCE",
"timestamp": "yyyy-mm-dddd"
}
Product: CA7
Need to implement the Endpoint Authorization. Clients can secure CA 7 REST API endpoints that access the CA 7 database using the Datacom Server. This feature will utilize whichever type of security, external or internal, that is active in the target CA 7 instance.
Endpoint Alias JOBDEFREQPRED needs to be defined.
For full details see in Secure the CA 7 REST API section Implementing Endpoint Authorization.
In CA 7 issue the /DISPLAY,ST=SEC command on CA7n to display the security options defined for this CA 7 instance, this will verify what security is being used external or internal security.
For example CA7n system is running external RACF security.
Need to define the Rest API resources to RACF:
See sample definitions in the AL2RACFS member in CAL2OPTN library. Below is a snippet of the member that contains the rdefine for the L2APIREQ resource:
/*
/* CA 7 RESTAPI job/definition/requirements pred and successor
/*
RDEFINE PA@EL (L2APIREQ) DATA('RESTAPI REQS') OWNER(CA7GROUP) +
UACC(NONE)
/*
The resource names are L2API*. There are about 13 of them.