Hi Team,
We are now using rest APIs to do the configuration from backend (using Ansible, scripts etc) . But only Admin is having access to config and system related APIs .
We should be able to use these APIs with a user who is given API access along with CCM access for their Ids . If he/she can do the apply config from CCM using their Ids, the same should be allowed using API as well.
Is there going to be any change coming up for this or is it already fixed in some later releases of NagiosXi? We are currently using 5.5.9 version.
Please provide your views and suggestions.
Thanks.
REST API Access for Users
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: REST API Access for Users
Hi @ddaluka,
Yes, currently, the admin has access to the config and system API and that will not be changing int the next release ( 5.6.0 ). If you'd like I can submit a feature request on your behalf for this functionality.
Yes, currently, the admin has access to the config and system API and that will not be changing int the next release ( 5.6.0 ). If you'd like I can submit a feature request on your behalf for this functionality.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: REST API Access for Users
Hi benjaminsmith,benjaminsmith wrote:Hi @ddaluka,
Yes, currently, the admin has access to the config and system API and that will not be changing int the next release ( 5.6.0 ). If you'd like I can submit a feature request on your behalf for this functionality.
Yes please. Can you please give me the request number once it is raised? Also, is there any workaround available for now? The easiest , I can see as of now is to edit this file '/usr/local/nagiosxi/html/api/includes/utils-api.inc.php' where it is checking if user is admin.
Code: Select all
protected function config($verb, $args)
{
if (is_admin() == false) { return array('error' => _('Authenticiation failed.')); }
switch ($this->method)-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: REST API Access for Users
Hi @ddaluka,
Appreciate your feedback, I will submit a feature request. Please keep in mind the decision to implement the feature is at the discretion of the development team.
By the way, I did a simple test by commenting out the is_admin check, and then substituting a users a API key, and it did work. If you make any changes to the file, it will be overwritten during an upgrade.
Appreciate your feedback, I will submit a feature request. Please keep in mind the decision to implement the feature is at the discretion of the development team.
By the way, I did a simple test by commenting out the is_admin check, and then substituting a users a API key, and it did work. If you make any changes to the file, it will be overwritten during an upgrade.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: REST API Access for Users
Hi benjaminsmith,benjaminsmith wrote:Hi @ddaluka,
Appreciate your feedback, I will submit a feature request. Please keep in mind the decision to implement the feature is at the discretion of the development team.
By the way, I did a simple test by commenting out the is_admin check, and then substituting a users a API key, and it did work. If you make any changes to the file, it will be overwritten during an upgrade.
Thanks for testing it. is there anyway to track the feature request? would I come to know if dev team has considered the request?
Thanks.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: REST API Access for Users
Hi @ddaluka,
Please open a new post in a few months or send me PM and I can update you on the status. Currently, we're busy getting ready for the next minor release (5.6), and I should have more information once that is finished.Thanks for testing it. is there anyway to track the feature request? would I come to know if dev team has considered the request?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!