I’m trying to configure GenieACS in a way that every CPE has its own username and password calculated on the serial number. I’m working with GenieACS v1.2.9 on Debian 11. I have GENIEACS_EXT_DIR=/opt/genieacs/ext in my environment file. I created /opt/genieacs/ext/authenticate.js as follows
and set cwmp.auth to AUTH(DeviceID.SerialNumber, EXT("authenticate", "getPassword", DeviceID.SerialNumber)) but, at least for the moment, I only get Authentication failure.
Addendum: I see my default inform sets Device.ManagementServer.ConnectionRequestUsername and Device.ManagementServer.ConnectionRequestPassword which, as far as I can tell, are meant to set the password that the ACS uses when issuing a request to the CPE.
On the contrary, my goal is to set, in a reproducible way, the password that the CPE has to use while contacting the ACS.
I would listen to @rudymartin and put your ACS on a separate VLAN. This is what we’ve done since the beginning.
To answer you original question though, it looks like you have the part sorted out for the ACS to determine what credentials to use when validating the connection request attempt from the CPE. But where are you actually setting the credentials in the device? That could easily be done in the inform script.
Not at all!
Setting the credentials on the CPE is not a problem since we have to do a manual provisioning in which our internal software generates a configuration file that we directly import on the CPE. This configuration file also contains the address and the credentials of the ACS.
The problem is that the ACS answers with Authentication failure if I set the (supposed) correct username and password on the CPE. I don’t think it’s a problem of the script since I ran it manually via shell and it returns a proper result. My guess would be that there is some issue in the call to the external script but I can’t figure out where the problem is.
Why are you doing a custom config file per customer? The point of an ACS is move away from that. The only custom config for our devices is basic network information (new interface for ACS managment, and the IP of the ACS). Everything else is sorted out when the CPE is connected. Every boot I check if the config state for the CPE is still valid (has the CPE been moved to a new customer). If the CPE needs to be reprovisioned I set the necessary tags and the other provision scripts take over.
Unfortunately, I currently can’t use that set of features of the ACS.
What I can do, is use the ACS to monitor IP addresses, WiFi / SIP configuration, rollout upgrades, run diagnosis and, on request, enable remote web gui.
Just for context, although it’s absolutely irrelevant for the resolution of the problem, I’m operating on a network I do not own so I can’t (well, I can but it has an unreasonable cost) provide a separate VLAN for ACS and I can’t connect the CPE to the internet unless they have a valid PPPoE credential set. And valid means it’s only feasible for that access, I can’t have a set of PPPoE credentials just for provisioning.
So, how do I sort out the EXT script for authentication?
If I set cwmp.auth to AUTH("username", "password") corresponding to the credentials I set on the CPE, it works.
So I assume something is wrong in the EXT call. But don’t know what.
Yeah, I’m sure I could but I don’t really see the point.
Without any change on the CPE, if cwmp.auth is fixed, everything goes fine. If cwmp.auth calls the external script, in cwmp logs I see “Authentication failure”.
Therefore, the problem is certainly server side. It would me much more useful to find a way to debug if and what the EXT call returns.
You have two way to check what EXT call return without any problem.
First one - use ext-runner.js (Ext script test into console)
Second one - use test/debug provisioning and log function to see what it return
The location of where to place the file has changed in v1.2. In v1.2, the file needs to be placed in the location specified by GENIEACS_EXT_DIR in the genieacs.env file.
Okay, thank you for pointing this out. I was missing a require that was not needed in the plain npm run.
Now, the CPE->ACS authentication is working fine. Unfortunately, what is not working now, is the ACS->CPE part. I didn’t modify any parameter on that but if I try to summon I now get Connection request error: Incorrect connection request credentials .
Is there any modification I am supposed to do after having the authentication working correctly?
Connection request username and password get correctly set by the inform script…