Hi,
I’m using codefresh onprem 2.2.7, and I think the tools for programatically creating API keys don’t work - the error messages are similar between both the cli and web api.
I’m trying these commands:
% codefresh create token dave-test-token --subject dave-test-token --type runtime-environment
Error: Required object not found
% curl \
-X POST \
-H "Authorization: ${CODEFRESH_API_KEY}" \
-H 'Content-Type: application/json; charset=utf-8' \
-d '{}' \
"https://our.on.prem.codefresh.com/api/auth/key?subjectType=runtime-environment&subjectReference=dave-test-token"
{
"status": 404,
"code": "1002",
"name": "NOT_FOUND_ERROR",
"message": "Required object not found",
"context": {}
}
I’m fuzzy on what the error message “Required object not found” means, especially in the web api case, where I’m passing it an empty json object, and that’s exactly what’s documented in y’all’s own documentation at Codefresh API
I think its a bug in the web api, that the cli is using too.
Other notes:
- Codefresh onprem version 2.2.7
- Codefresh cli versions 0.87.2 and 0.87.3
- CODEFRESH_API_KEY - tried both service worker keys and personal keys, verified that auth works with both.