ConfD User Community

Authentication failure message customization

We need to send a custom error message to the rest/netconf requests, if authentication is successful, but failed to met certain conditions. In this case we return confd error in authentication callback and this returns ‘401 authentication needed’ message. But we want to send additional custom message.
We are using ‘dp.auth_seterr’, but this logs our messages in audit log file.
Could you please let me know is there a way to send custom message.


This cannot be done for NETCONF - NETCONF itself does not perform authentication, it leaves that to the transport protocol (i.e. in the typical setup, to SSH), so if authentication fails for that protocol, no NETCONF session is even established. For RESTCONF this might be generally possible, but presumably to keep things simpler, ConfD does not send the error message neither for RESTCONF.