20.01.2015 Views

Fuente Confiable de Datos GS1 - GS1 México

Fuente Confiable de Datos GS1 - GS1 México

Fuente Confiable de Datos GS1 - GS1 México

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

FUENTE CONFIABLE DE<br />

DATOS <strong>GS1</strong><br />

ESTÁNDAR RATIFICADO<br />

Rev. No. 1<br />

Fecha <strong>de</strong><br />

Emisión<br />

20/06/2013<br />

Página 58 <strong>de</strong> 66<br />

el caracter diagonal inicial e incluyendo todos los parámetros <strong>de</strong> consulta en el or<strong>de</strong>n<br />

elegidos por el Agregador <strong>de</strong> <strong>Datos</strong> “A”. Estos caracteres URL <strong>de</strong>berán ser tratados como<br />

octetos en la codificación US-ASCII para fines <strong>de</strong> cálculo. La clave inicial para el algoritmo<br />

HMAC es K A B como se dijo previamente durante el acuerdo <strong>de</strong> confianza, que el<br />

Agregador <strong>de</strong> <strong>Datos</strong> “A” toma como una función <strong>de</strong> la URL <strong>de</strong> servicio <strong>de</strong> “B”.<br />

Por ejemplo, si el URL solicitado (antes <strong>de</strong> añadirle el parámetro MAC) es el siguiente:<br />

http://tsd.example.com/service/v1/productData/gtin/00614141123452target<br />

Market=840&dataVersion=1.0&clientGln=0614141000005<br />

Entonces la entrada <strong>de</strong>l algoritmo HMAC son los siguientes caracteres, codificados como<br />

octetos <strong>de</strong> US-ASCII:<br />

/service/v1/productData/gtin/00614141123452targetMrket=840&dateVersion=1.0&clientGl<br />

n=0614141000005<br />

3. El mensaje <strong>de</strong>l código <strong>de</strong> autentificación resultante se convierte en una ca<strong>de</strong>na<br />

hexa<strong>de</strong>cimal <strong>de</strong> 64 caracteres (utilizando letras en mayúscula) y adjunto a la solicitud URL<br />

como el valor <strong>de</strong>l parámetro MAC.<br />

4. El URL final es usado para hacer la solicitud HTTP.<br />

El Agregador <strong>de</strong> <strong>Datos</strong> “B” <strong>de</strong>l servidor DEBERÁ autentificar la i<strong>de</strong>ntidad <strong>de</strong>l Agregador <strong>de</strong> <strong>Datos</strong><br />

“A” <strong>de</strong>l cliente <strong>de</strong> la siguiente manera:<br />

1. El Agregador <strong>de</strong> <strong>Datos</strong> “B” recibe la solicitud HTTP.<br />

2. Utilizando el valor <strong>de</strong>l parámetro ClientGln, el Agregador <strong>de</strong> <strong>Datos</strong> “B” busca la clave K A B<br />

correspondiente. Si no existe esta clave, se <strong>de</strong>tiene: el cliente es <strong>de</strong>sconocido y aparece la<br />

Excepción <strong>de</strong> Seguridad (SecurityException).<br />

3. El Agregador <strong>de</strong> <strong>Datos</strong> “B” calcula un código <strong>de</strong> mensaje <strong>de</strong> autentificación utilizando<br />

HMAC-SHA256, don<strong>de</strong> la entrada <strong>de</strong> información al algoritmo HMAC es el camino y la<br />

consulta <strong>de</strong> porciones <strong>de</strong>l URL solicitado incluyendo el carácter <strong>de</strong> diagonal inicial, e<br />

incluyendo todos los parámetros <strong>de</strong> búsqueda excepto el parámetro MAC y don<strong>de</strong> la clave<br />

es K A B.<br />

4. El Agregador <strong>de</strong> <strong>Datos</strong> “B” compara al MAC calculado en la etapa anterior con el MAC<br />

incluido en la solicitud URL <strong>de</strong> parámetro <strong>de</strong> MAC. Si los MACs son idénticos, entonces la<br />

i<strong>de</strong>ntidad <strong>de</strong>l Agregador <strong>de</strong> <strong>Datos</strong> “A” es autentificada. De otra forma, se <strong>de</strong>tiene: el cliente<br />

no está autentificado y aparece la Excepción <strong>de</strong> Seguridad (SecurityException).<br />

El Agregador <strong>de</strong> <strong>Datos</strong> <strong>de</strong> servicio no autentifica al Agregador <strong>de</strong> <strong>Datos</strong> <strong>de</strong>l cliente antes <strong>de</strong> que la<br />

solicitud sea entregada <strong>de</strong>l cliente al servidor. En cambio, el Agregador <strong>de</strong> <strong>Datos</strong> <strong>de</strong> servicio<br />

proporciona un MAC en respuesta, para que así el cliente pueda autentificar al servidor cuando<br />

reciba la respuesta.<br />

Cuando el servicio <strong>de</strong> Agregador <strong>de</strong> <strong>Datos</strong> “B” respon<strong>de</strong> a una solicitud <strong>de</strong> AAQI hecha por el<br />

cliente Agregador <strong>de</strong> <strong>Datos</strong> “A”, ésta DEBERÁ incluir un Código <strong>de</strong> Autentificación <strong>de</strong> Mensaje<br />

(MAC) <strong>de</strong> la siguiente manera:<br />

1. El Agregador <strong>de</strong> <strong>Datos</strong> “B” calcula un mensaje <strong>de</strong> código <strong>de</strong> autentificación utilizando el<br />

HMAC-SHA256 don<strong>de</strong> la entrada <strong>de</strong> información al algoritmo HMAC es la totalidad <strong>de</strong> la<br />

Este documento es propiedad <strong>de</strong> <strong>GS1</strong> MEXICO. Se prohíbe la copia parcial o total <strong>de</strong>l documento sin el consentimiento <strong>de</strong>l titular.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!