Révision 96454bcd
Ajouté par Sylvain Sauvage il y a plus de 11 ans
IoTa-Installer/lib/eta.py | ||
---|---|---|
#
|
||
from config import CONFIG
|
||
import installer
|
||
import utils
|
||
|
||
|
||
class ETaInstaller(installer.DBWebAppInstaller):
|
||
... | ... | |
installer.WebAppInstaller.__init__(self, "ETa web application", "eta", [
|
||
("Enter the ETa web application name", "eta", "name", {}),
|
||
("Enter the archive file pathname", "eta", "repo", {"type": "file"}),
|
||
("Enter the Epcis web application URL", "epcis", "url", {}),
|
||
("Enter the URL to the XACML module", "epcis_policies", "xacml_url", {}),
|
||
("Enter the ETa database name", "eta", "db_name", {}),
|
||
("Enter the ETa database login", "eta", "db_login", {}),
|
||
("Enter the ETa database password", "eta", "db_password", {})
|
||
("Enter the ETa database password", "eta", "db_password", {}),
|
||
("Do you want to create the database callback management user", "eta", "db_user_create", {"type": "YN"}),
|
||
("Enter the database login for callback management user", "eta", "callback_db_login", {}),
|
||
("Enter the database password for callaback management user", "eta", "callback_db_password", {}),
|
||
("Enter the Epcis web application URL", "epcis", "url", {}),
|
||
("Enter the URL to the XACML module", "epcis_policies", "xacml_url", {}),
|
||
("Enter the URL to the Callback Receiver module", "eta_callback_receiver", "callback_url", {}),
|
||
("Do you use electronic signatures (SigMa)", "eta", "use_sigma", {"type": "YN"}),
|
||
], [
|
||
("application",
|
||
{ "xacml-url": ("epcis_policies", "xacml_url"),
|
||
"xacml-ihm-url": ("ephi", "url"),
|
||
"xacml-default-user": ("global", "anonymous_user"),
|
||
"epcis-query-url": ("epcis", "query_url"),
|
||
"epcis-capture-url": ("epcis", "capture_url"),
|
||
"eta-userservice-url": ("eta", "userservice_url"),
|
||
"eta-userservice-url": ("user", "url"),
|
||
"eta-callback-url": ("eta_callback_receiver", "callback_url"),
|
||
"ldap-url": ("ldap", "url"),
|
||
"ldap-basedn": ("ldap", "base_dn"),
|
||
"ldap-user": ("ldap", "login"),
|
||
"ldap-password": ("ldap", "password"), })
|
||
"ldap-password": ("ldap", "password"),
|
||
"sigma-url": ("sigma", "url"),
|
||
"sigma-verification": ("eta", "use_sigma"),})
|
||
] )
|
||
|
||
|
||
def postConfigure(self):
|
||
# set default url (for User web service)
|
||
url = "http://" + CONFIG.get("global", "host") + ":" + CONFIG.get("tomcat", "http_port") + "/" + CONFIG.get("eta", "name")
|
||
CONFIG.set("eta", "userservice_url", url + "/" + CONFIG.get("eta", "userservice_name"))
|
||
CONFIG.set("eta", "db_jndi", "ETADB")
|
||
CONFIG.set("ds", "epcis_query_url", url + "/query")
|
||
CONFIG.set("epcilon", "subscription_url", url + "/query")
|
||
self.setURL()
|
||
self.cset("db_jndi", "ETADB")
|
||
url = self.cget("url")
|
||
CONFIG.set("ds", "epcis_type", "ided_epcis")
|
||
CONFIG.set("ds", "epcis_query_url", url + "ided_query")
|
||
CONFIG.set("epcilon", "subscription_url", url + "query")
|
||
# configure database connection for callbacks
|
||
murl = "jdbc:mysql://" + CONFIG.get("db", "host") + ":" + CONFIG.get("db", "port") + "/" + self.cget("db_name") + "?autoReconnect=true"
|
||
self.cset("callback_db_url", murl)
|
||
|
||
|
||
def postInstall(self):
|
||
if self.cisTrue("db_user_create"):
|
||
utils.putMessage("Creating callback management user ...")
|
||
if not utils.execDB("Granting access rights", "mysql",
|
||
"GRANT SELECT ON " + self.cget("db_name") + ".subscription " +
|
||
"TO '" + self.cget("callback_db_login") + "'@'" + CONFIG.get("db", "user_host") + "' " +
|
||
"IDENTIFIED BY '" + self.cget("callback_db_password") + "';"):
|
||
return
|
Formats disponibles : Unified diff
Version 1.9-mock
This is version 1.9-mock. 1.9 because the API still have changes pending
(principally relative to the Discovery Services). “mock” because TLS
configuration is not yet available and the signatures (SigMa) are not fully
implemented.
- code cleaned and refactored
- lots of bugs fixed
- dependencies checked and trimmed
- documentation added
- Identity handling added
- code refactored
- new, better APIs
- Identity handling added
- use EPCglobal and DS events (no proxy types anymore)
- ETa-Callback modules are now available as web applications
- filtering rules: if a part of an event is not allowed, now the whole
event is deleted from the result (before only the rejectd part was)
- new temporary User web service
- new Xi module: XACML Interrogation web service (was two modules: TCP and
servlet)
- ETa and its Callback modules
- ActiveMQ
- SigMa
- certificate/signing key
- new simplified figures (sans IoTa and simplified IoTa)
- new figure for ETa modules
- show 3rd party clients
- data flows specified
- TLS and link security added
- IDs and trusted IDs added
- color adjusted for printing
- GREYC logo added