[SNMP4J] Cannot change the snmp password remotely

2013-04-17 Thread Vilagut Abad, Roger
Hello,

In order to remotely change the authentication password of a user I do the 
following steps:


1.   Get the usmUsrSpinLock.0 and save in sValue

2.   I obtain the old key of the user whose password I want to change as 
follows:
byte[] oldKey = snmp.getUSM().getUser(engineId, new 
OctetString(user)).getUsmUser().getAuthenticationPassphrase();

3.   Then I generate the new key as follows:

byte[] newKey = SecurityProtocols.getInstance().passwordToKey(AuthMD5.ID, new 
OctetString(newPassword), engineId.toByteArray());

4.   Then I generate the key change value as follows:

byte[] keyChange = new AuthMD5().changeDelta(oldKey, newKey, random.getBytes());

5.   And finally I do a SET to the usmUserTable:

SET(usmUserSpinLock.0=sValue, usmUserAuthKeyChange=keyChange, 
usmUserPublic=random)

When I read the usmUserTable MIB table after the SET I can see the random value 
in the usmUserPublic column, however when I do a request using the new password 
the agent responds that the password is not correct.

Am I missing something in the password change procedure? I have tried to follow 
the procedure described in RFC 3414 (KeyChange).

Best regards,
Roger Vilagut Abad


Este correo electr?nico y, en su caso, cualquier fichero anexo al mismo, 
contiene informaci?n de car?cter confidencial exclusivamente dirigida a su 
destinatario o destinatarios. Si no es vd. el destinatario indicado, queda 
notificado que la lectura, utilizaci?n, divulgaci?n y/o copia sin autorizaci?n 
est? prohibida en virtud de la legislaci?n vigente. En el caso de haber 
recibido este correo electr?nico por error, se ruega notificar inmediatamente 
esta circunstancia mediante reenv?o a la direcci?n electr?nica del remitente.
Evite imprimir este mensaje si no es estrictamente necesario.

This email and any file attached to it (when applicable) contain(s) 
confidential information that is exclusively addressed to its recipient(s). If 
you are not the indicated recipient, you are informed that reading, using, 
disseminating and/or copying it without authorisation is forbidden in 
accordance with the legislation in effect. If you have received this email by 
mistake, please immediately notify the sender of the situation by resending it 
to their email address.
Avoid printing this message if it is not absolutely necessary.
___
SNMP4J mailing list
SNMP4J@agentpp.org
http://lists.agentpp.org/mailman/listinfo/snmp4j


[SNMP4J] unexpected behavior using TableUtils

2012-05-14 Thread Vilagut Abad, Roger
Hi,

The last node of my MIB is a static table with 5 columns (read-only) and 12 
rows.

When I call getTable(target, oids, null, null) the result is a list of 
TableEvent with size = 11 with a General variable binding error in the last 
element.

If I try to narrow the request by invoking getTable(target, oids, null, new 
OID(12)) the result is the same.

If I call setMaxNumRowsPerPDU(15) before invoking getTable then I get a single 
TableEvent with the same error.

Finally if I call setMaxNumRowsPerPDU(12) before invoking getTable I get a list 
of 13 TableEvent. In taht case the complete table is retrieved and the last 
event contains the error.

Is this the expected behaviour of the getTable method?
What happens then if I the number of rows of the table is variable and I don't 
know beforehand how many rows shall be retrieved. Can I use TableUtils class to 
retrieve the contents in such case?

Regards,

Roger Vilagut Abad
GSS Core AIV Manager
Satellite Navigation and Positioning Systems Department



-Mensaje original-
De: snmp4j-boun...@agentpp.org [mailto:snmp4j-boun...@agentpp.org] En nombre de 
Frank Fock
Enviado el: martes, 08 de mayo de 2012 23:43
Para: snmp4j@agentpp.org
Asunto: Re: [SNMP4J] Support to RFC 2574 for changing authorisation password

Hi Roger,

Yes, SNMP4J-Agent does support the key change mechanisms described in
RFC 2574.

Best regards,
Frank

Am 08.05.2012 13:43, schrieb Vilagut Abad, Roger:
 Hi,

 I am preparing an automatic test suit to test a product that implements a 
 SNMP agent. In one of the tests I need to verify that the product implements 
 correctly the procedure described in RFC 2574 for changing passwords.

 Is this RFC supported by snmp4j?

 Thanks,
 Roger

 
 Este correo electr?nico y, en su caso, cualquier fichero anexo al mismo, 
 contiene informaci?n de car?cter confidencial exclusivamente dirigida a su 
 destinatario o destinatarios. Si no es vd. el destinatario indicado, queda 
 notificado que la lectura, utilizaci?n, divulgaci?n y/o copia sin 
 autorizaci?n est? prohibida en virtud de la legislaci?n vigente. En el caso 
 de haber recibido este correo electr?nico por error, se ruega notificar 
 inmediatamente esta circunstancia mediante reenv?o a la direcci?n electr?nica 
 del remitente.
 Evite imprimir este mensaje si no es estrictamente necesario.

 This email and any file attached to it (when applicable) contain(s) 
 confidential information that is exclusively addressed to its recipient(s). 
 If you are not the indicated recipient, you are informed that reading, using, 
 disseminating and/or copying it without authorisation is forbidden in 
 accordance with the legislation in effect. If you have received this email by 
 mistake, please immediately notify the sender of the situation by resending 
 it to their email address.
 Avoid printing this message if it is not absolutely necessary.
 ___
 SNMP4J mailing list
 SNMP4J@agentpp.org
 http://lists.agentpp.org/mailman/listinfo/snmp4j

--
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax:   +49 7024 8688231

___
SNMP4J mailing list
SNMP4J@agentpp.org
http://lists.agentpp.org/mailman/listinfo/snmp4j

Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, 
contiene información de carácter confidencial exclusivamente dirigida a su 
destinatario o destinatarios. Si no es vd. el destinatario indicado, queda 
notificado que la lectura, utilización, divulgación y/o copia sin autorización 
está prohibida en virtud de la legislación vigente. En el caso de haber 
recibido este correo electrónico por error, se ruega notificar inmediatamente 
esta circunstancia mediante reenvío a la dirección electrónica del remitente.
Evite imprimir este mensaje si no es estrictamente necesario.

This email and any file attached to it (when applicable) contain(s) 
confidential information that is exclusively addressed to its recipient(s). If 
you are not the indicated recipient, you are informed that reading, using, 
disseminating and/or copying it without authorisation is forbidden in 
accordance with the legislation in effect. If you have received this email by 
mistake, please immediately notify the sender of the situation by resending it 
to their email address.
Avoid printing this message if it is not absolutely necessary.
___
SNMP4J mailing list
SNMP4J@agentpp.org
http://lists.agentpp.org/mailman/listinfo/snmp4j


[SNMP4J] Support to RFC 2574 for changing authorisation password

2012-05-08 Thread Vilagut Abad, Roger
Hi,

I am preparing an automatic test suit to test a product that implements a SNMP 
agent. In one of the tests I need to verify that the product implements 
correctly the procedure described in RFC 2574 for changing passwords.

Is this RFC supported by snmp4j?

Thanks,
Roger


Este correo electr?nico y, en su caso, cualquier fichero anexo al mismo, 
contiene informaci?n de car?cter confidencial exclusivamente dirigida a su 
destinatario o destinatarios. Si no es vd. el destinatario indicado, queda 
notificado que la lectura, utilizaci?n, divulgaci?n y/o copia sin autorizaci?n 
est? prohibida en virtud de la legislaci?n vigente. En el caso de haber 
recibido este correo electr?nico por error, se ruega notificar inmediatamente 
esta circunstancia mediante reenv?o a la direcci?n electr?nica del remitente.
Evite imprimir este mensaje si no es estrictamente necesario.

This email and any file attached to it (when applicable) contain(s) 
confidential information that is exclusively addressed to its recipient(s). If 
you are not the indicated recipient, you are informed that reading, using, 
disseminating and/or copying it without authorisation is forbidden in 
accordance with the legislation in effect. If you have received this email by 
mistake, please immediately notify the sender of the situation by resending it 
to their email address.
Avoid printing this message if it is not absolutely necessary.
___
SNMP4J mailing list
SNMP4J@agentpp.org
http://lists.agentpp.org/mailman/listinfo/snmp4j