Document that user must be in 'rest', 'provision' or 'admin' role for provision.pl to work

Description

Hello,
like at the 1.12.9 opennms' version (http://issues.opennms.org/browse/NMS-7112), the provisioning script provision.pl just works if admin user credentials are used.

If another administrator user is used, the provision.pl doesn't work and generate and "403 Access is denied" error:

/opt/opennms/bin/provision.pl --username user --password pass node add "Router" 1.2.3.4 "ROUTERPC" 403 Access is denied at /opt/opennms/bin/provision.pl line 806.
main::post('Router/nodes', 'XML::Twig::Elt=HASH(0x191be98)') called at /opt/opennms/bin/provision.pl line 322
main::cmd_node('add', 'Router', 1.2.3.4, 'ROUTERPC') called at /opt/opennms/bin/provision.pl line 151

Thanks in advance

Best regards,
Pablo

Environment

OPERATING SYSTEM GNU/Linux CentOS (Final) 7 x86_64 Minimal installation SOFTWARE: - OpenNMS 1.14.0.1 - Postgres 9.2.7 - Java 7 (jdk-7u71-linux-x64.rpm)

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Juan Pablo Marco Cardona January 27, 2015 at 5:00 AM

Hello Benjamin,
thank you so much for your support slightly smiling face

I'm going to document by myself your comment.

Best regards,
Pablo

Benjamin Reed January 26, 2015 at 5:16 PM

Fixed in foundation/develop, I updated the spring security configuration to also accept the 'provision' role for write permissions.

Seth Leger January 26, 2015 at 3:46 PM

We should test that these user ACLs work properly before we document this.

Update: Ben says it doesn't work with the 'provision' group so we should fix this.

Juan Pablo Marco Cardona January 7, 2015 at 6:19 AM

Thank you so much for you useful support slightly smiling face

Juan Pablo Marco Cardona January 7, 2015 at 6:14 AM

Hello,
sorry for my long delayed answer.
Adding the user in the "rest" role at $OPENNMS_HOME/etc/magic-users.properties fixes the problem.

Maybe it would be a good idea to add this to some of this documentation:
http://www.opennms.org/wiki/ReST
http://opennms.org/wiki/Magic-users.properties
http://www.opennms.org/wiki/User
http://opennms.org/wiki/Large_Requisitions

Best regards,
Pablo

Fixed

Details

Assignee

Reporter

Components

Affects versions

Priority

PagerDuty

Created December 2, 2014 at 5:12 AM
Updated April 7, 2015 at 3:03 PM
Resolved January 26, 2015 at 5:16 PM

Flag notifications