cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3232
Views
0
Helpful
4
Replies

Convert string to tailf:aes-cfb-128-encrypted-string for authgroup remote-password using MAAPI Java API

Philip Petty
Cisco Employee
Cisco Employee

Hi,

I'm trying to create an authgroup using the MAAPI Java API as previously asked here:

Create an authgroup using MAAPI Java API

In that threat, I got help in creating the umap list but I am still having an issue with creating the encrypted remote-password field.

Below is the code I am currently using:

     ConfPath umapAuthgroupPath = new ConfPath("/ncs:devices/authgroups/group{%s}/umap{admin}", name);

     maapi.create(th, umapAuthgroupPath);

     ConfBuf remoteNameBuf = new ConfBuf(username);

     maapi.setElem(th, remoteNameBuf, umapAuthgroupPath.copyAppend(Ncs._remote_name_));

     ConfBuf remotePasswordBuf = new ConfBuf(password);

     maapi.setElem(th, remotePasswordBuf, umapAuthgroupPath.copyAppend(Ncs._remote_password_));

And below is the exception I am seeing:

     com.tailf.maapi.MaapiException: /ncs:devices/authgroups/group{testing}/umap{admin}/remote-password: <<"testing">> is not a valid value.

Appreciate your assistance with this!

1 Accepted Solution

Accepted Solutions