On the SMC, I can execute REST API queries, no problem.
However, when I try to execute any gaia api commands, it just does not work:
[Expert@LPACAICSP1:0]# mgmt_cli show hostname --context gaia_api
Username: admin
Password:
code: "generic_error"
message: "Internal error."
[Expert@LPACAICSP1:0]#
I'm using the superuser/admin account.
It looks like a authorization issue, but I have setup Blades->Management API->Accept API calls from All IP addresses..
[Expert@LPACAICSP1:0]# mgmt_cli login user admin password 'mySuperSecret' --context gaia_api --format json
{
"code" : "generic_error",
"message" : "Error 403. Access to the API server is forbidden. Please check the Management API blade settings to make sure that the server is allowed to accept requests from this IP address."
}
I have tried (wthout success) to add the user admin the right to use gaia api like is says in the gaia api guide here: https://sc1.checkpoint.com/documents/latest/GaiaAPIs/#api_access~v1.5%20 :
the command executes just fine but nothing happens (since 'access-mechanism API' is not there):
[Expert@LPACAICSP1:0]# gaia_api access --user admin --enable true
[Expert@LPACAICSP1:0]#
LPACAICSP1> show rba user admin
User
admin
access-mechanism Web-UI
access-mechanism CLI
role adminRole
LPACAICSP1>
If I try to create new users in the Smart Console, they are created there, but I cannot see them with "show rba users".
API status here:
LPACAICSP1> api status
API Settings:
---------------------
Accessibility: Require all granted
Automatic Start: Enabled
Processes:
Name State PID More Information
-------------------------------------------------
API Started 21527
CPM Started 5877 Check Point Security Management Server is running and ready
FWM Started 3997
APACHE Started 8197
Port Details:
-------------------
JETTY Internal Port: 50276
APACHE Gaia Port: 443
Apache port retrieved from: httpd-ssl.conf
Profile:
------------
Machine profile: Large SMC env resources profile without SME
CPM heap size:
API heap size:
--------------------------------------------
Overall API Status: Started
--------------------------------------------
API readiness test SUCCESSFUL. The server is up and ready to receive connections
Notes:
------------
To collect troubleshooting data, please run 'api status -s <comment>'
LPACAICSP1>
[Expert@LPACAICSP1:0]# gaia_api status
API Status:
---------------------
Build: cp991255022
Uptime: 0:49:03.576685
Current Sessions: 0
Latest Version: 1.5
Processes:
Name State PID
---------------------------------
GAIA_API Started 29357
GAIA_API_DOCS Started 29356
APACHE Started 8197
CONFD Started 8194
CLISHD Started 25719 24906 21350 8282 1147
CELERY Started 29354
REDIS Started 29355
Port Details:
-------------------
APACHE Gaia Port: 443
--------------------------------------------
Overall API Status: Started
--------------------------------------------
[Expert@LPACAICSP1:0]#
I have restarted web and gaia api server, no success. Anyone got an idea what to do to make gaia api work?