Projet

Général

Profil

« Précédent | Suivant » 

Révision 19b58bab

Ajouté par Remy Menard il y a plus de 11 ans

Version 1.9

  • All:
    - use TLS for secured links
    - SigMa is now fully functionnal
    - completed documention
    - a lot of bugs fixed!
  • SigMa:
    - signature creation from the canonical form of the event
    - signature creation using ECDSA algorithm
    - signature is correctly verified
  • ETa:
    - manage the extension identifying the owner of the event
    - if no identity is provided, the identity of the certificate is used
  • EpcisPHi:
    - access to the web interface of policy management is made by
    certificate
  • OMeGa:
    - if no identity is provided, the identity of the certificate is used
  • IoTa-Installer:
    - create and use certificates for TLS
    - configure Apache Tomcat for TLS
  • Greyc letters figures:
    - show SigMa library (SigMa-Commons)

Voir les différences:

OMeGa/OMeGa/src/main/java/fr/unicaen/iota/application/soap/BaseOMeGa.java
/*
* This program is a part of the IoTa project.
*
* Copyright © 2008-2012 Université de Caen Basse-Normandie, GREYC
*
* Copyright © 2008-2013 Université de Caen Basse-Normandie, GREYC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
......
package fr.unicaen.iota.application.soap;
import fr.unicaen.iota.application.AccessInterface;
import fr.unicaen.iota.application.Configuration;
import fr.unicaen.iota.application.model.*;
import fr.unicaen.iota.application.soap.client.IoTaFault;
import fr.unicaen.iota.ds.model.TEventItem;
import fr.unicaen.iota.ds.model.TEventItemList;
import fr.unicaen.iota.nu.ONSEntryType;
import fr.unicaen.iota.tau.model.Identity;
import fr.unicaen.iota.xi.client.EPCISPEP;
import fr.unicaen.iota.xi.utils.Utils;
import java.rmi.RemoteException;
import java.util.*;
import java.security.Principal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.xml.ws.WebServiceContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.fosstrak.epcis.model.EPC;
......
public abstract class BaseOMeGa implements IoTaServicePortType {
private static final Log log = LogFactory.getLog(BaseOMeGa.class);
@Resource
private WebServiceContext wsContext;
private final EPCISPEP xiclient;
public BaseOMeGa() {
xiclient = new EPCISPEP(Configuration.XI_URL, Configuration.PKS_FILENAME, Configuration.PKS_PASSWORD, Configuration.TRUST_PKS_FILENAME, Configuration.TRUST_PKS_PASSWORD);
}
protected abstract AccessInterface getAI();
private void checkAuth(Identity id) throws IoTaException {
Principal authId = wsContext.getUserPrincipal();
String tlsId = authId == null ? null : authId.getName();
int chk = xiclient.canBe(tlsId, id.getAsString());
if (!Utils.responseIsPermit(chk)) {
throw new IoTaException(tlsId + " isn't allowed to pass as " + id.getAsString(), IoTaFault.tau.getCode());
}
}
private Map<String, String> filters(List<QueryParam> qps) {
Map<String, String> filters = new HashMap<String, String>();
for (QueryParam qp : qps) {
......
@Override
public QueryEPCISResponse queryEPCIS(QueryEPCISRequest queryEPCISRequest) throws IoTaException {
checkAuth(queryEPCISRequest.getIdentity());
AccessInterface controler = getAI();
List<EPCISEventType> list;
try {
......
@Override
public QueryDSResponse queryDS(QueryDSRequest queryDSRequest) throws IoTaException {
checkAuth(queryDSRequest.getIdentity());
AccessInterface controler = getAI();
List<TEventItem> list;
try {
......
@Override
public TraceEPCResponse traceEPC(TraceEPCRequest traceEPCRequest) throws IoTaException {
checkAuth(traceEPCRequest.getIdentity());
AccessInterface controler = getAI();
List<EPCISEventType> list;
try {

Formats disponibles : Unified diff