msgbartop
Blog di Dino Ciuffetti (Bernardino in realtà)
msgbarbottom

15 Mar 11 Assolutamente dico NO al nucleare in italia!!!

I motivi per cui penso che in Italia passare al nucleare sia una PURA FOLLIA sono estremamente semplici, anche un bamboccione alienato dalla televisione riuscirebbe a capirli:

1) Il costo per la realizzazione delle centrali e’ altissimo (piu’ di 30 miliardi di euro) e non vale assolutamente il leggero incremento in percentuale di energia elettrica prodotta (solo il 4%).
2) Non abbiamo la tecnologia in casa per produrre il combustibile fissile (uranio arricchito 3% e/o plutonio) per cui saremo costretti a comprare dalla francia, dalla germania e/o dalla svizzera tale combustibile ad un costo molto alto.
3) L’energia nucleare produce scorie estremamente pericolose e inquinanti che rimangono radioattive per milioni di anni. Nessuna regione vorrebbe mai centrali nucleari, che rilasciano continuamente nell’atmosfera particelle radioattive e producono le scorie, e ovviamente nessuna regione vorrebbe mai ospitare un deposito di scorie nucleari.
4) Le centrali, anche quelle di ultima generazione, utilizzano dei reattori entro i quali il combustibile fissile reagisce in modo controllato. Purtroppo a volte, anche se le centrali sono estremamente sicure, ad esempio per eventi catastrofici (vedere il terremoto in Giappone dell’11 marzo 2011) possono verificarsi dei fenomeni non previsti dal progetto che possono risultare in un incidente nucleare (vedi Fukushima o Chernobyl). Il problema grave e’ che la radioattivita’ e’ disastrosa per gli esseri viventi.
5) Si vuole investire sul nucleare proprio mentre il resto del mondo, a valle dell’incidente giapponese, vuole rivedere i propri programmi relativi all’energia dell’atomo, inoltre l’Italia partirebbe oggi con piu’ di 40 anni di ritardo rispetto alle altre nazioni!!
6) I giacimenti di Uranio finiscono. L’energia nucleare non e’ energia rinnovabile. Non avremo uranio per molti anni avvenire, come lo stesso vale per il petrolio.

No energia nucleare in Italia

A questo punto la scelta e’ una sola e per giunta obbligata: investire nelle fonti di energia pulita e rinnovabile (vento, sole, maree, geotermica, ecc).

A mio avviso chi non capisce questo non e’ intelligente, e sicuramente non pensa al suo futuro e a quello dei propri figli.

14 Mar 11 Utilizzare openssl come Certification Authority

Come utilizzare openssl per creare una CA (Certification Authority)

NOTE: there’s a new more advanced article: https://dino.ciuffetti.info/2021/05/how-to-create-a-cool-ssl-ca-certification-authority-with-openssl/

Ciao gente.
A volte capita la necessita’ di creare un ente certificatore con openssl, ad esempio per poter generare e firmare dei certificati x509 che possono essere utili ai fini di riconoscimento lato server/client, ad esempio con apache.

I passaggi che da seguire sono semplici:

# Generazione della chiave privata dell’ente certificatore
openssl genrsa -des3 -out ca.key 4096
# Generazione del certificato dell’ente certificatore
openssl req -new -x509 -days 9999 -key ca.key -out ca.crt

# Creazione della chiave privata del server
openssl genrsa -out server.key 2048
# Generazione del CSR del server
openssl req -new -key server.key -out server.csr
# Creazione del certificato server e firma con il certificato dell’ente certificatore
openssl x509 -req -in server.csr -out server.crt -sha1 -CA ca.crt -CAkey ca.key -CAcreateserial -days 1365

# Creazione della chiave privata del client da autenticare
openssl genrsa -des3 -out user.key 1024
# Generazione del CSR del client
openssl req -new -key user.key -out user.csr
# Creazione del certificato client e firma con il certificato dell’ente certificatore
openssl x509 -req -in user.csr -out user.crt -sha1 -CA ca.crt -CAkey ca.key -CAcreateserial -days 1365
# Conversione in formato PKCS#12
openssl pkcs12 -export -in user.crt -inkey user.key -name “Nome e cognome” -out user.p12

Se avete domande chiedete pure.
Ciao, Dino.

11 Mar 11 Japan earthquake 11 mar

earthquake in Japan: great number of big circles on my phone… never seen before… Japanese kids, guys, moms, people, hold on. We are with all of you!!!

android earthquake alert app, big circles on my android map over japan

android earthquake alert app, big circles on my android map over japan show a great number of big quakes over Japan. Hold on guys!! We are with you.

08 Mar 11 Modify JSESSIONID cookie path with apache and mod_headers

The question is: how can I change the path of the JSESSIONID cookie for a web application deployed in tomcat, jboss, or any other AS, and served by an apache reverse proxy (ProxyPass on mod_proxy, or jkMount on mod_jk) to add a trailing slash?

The answer is in mod_headers module. This module supports perl regular expression that you can use to substitute a string with another on any HTTP header, on the request or on the response.

We may want to add a trailing slash (mypath/) to the JSESSIONID cookie path, for example for security reasons.
This is the correct way (apache >= 2.2.4):

Header edit Set-Cookie "^(JSESSIONID=.*; Path=/YOUR_APP_PATH)(.*)$" "$1/$2"

eg:

Header edit Set-Cookie "^(JSESSIONID=.*; Path=/jsp-examples)(.*)$" "$1/$2"

The first attribute defines the regular expression that matches against the string that must be edited (the SESSIONID header in this case), the second attribute is the expression of the new string (the sessionid with the path modified with a trailing slash). Note that the expression begins with ‘^‘ character (it means: the string must begin with).
This kind of regexp defines that each match pattern is enclosed into brackets, so the first match is anything that begins with “JSESSIONID=”, have some kind of sub string (.*), and then contains “; Path=/jsp-examples”.
The second match is anything on the right of the path (.*).
The second argument implies that the string is composed by the first match, a slash, then the second match. So we have a cookie called JSESSIONID with a trailing slash added in the path.

If you don’t understand perl regular expression well, I advice you to get deeper into it, because it’s very very very useful for any sysadmin. There is very good documentation in internet, try to google “perl regular expression examples”.

Apache httpd is a very good and powerful piece of code, and it’s generally possible to do anything you can thinking of. You have only to know where to search, and the manual is generally the right place.

Ciao, Dino.

05 Mar 11 Great event, great day

Today was one of the most productive day of the year for me. Codemotion event was great, full of great talks, good new ideas and tech staff demistified.
Great speech on orientdb and nosql by Luca Garulli and very good talk by Alessandro Nadalin: “REST in peace”, the RESTful + ESI correct usage.

02 Mar 11 ajax_proxy cross domain php in bundle with orientdb

I’m very happy that my simple proxy php script is now in bundle with a great product: orientdb.
Now, I’m going to take two beers!! Cheers!!!!

08 Feb 11 NuvolaBase.com, the OrientDB on the Cloud

So this is finally there. NuvolaBase.com (alpha release) has been published yesterday at UIM-GDB in Barcelona by Luca Garulli, the OrientDB author.

I am really excited as TuxWeb cofounder for joining our technical collaboration with him for the alpha realization of this project.

I personally cover all the system administration and low level stuff.

– dAm2K!!

07 Feb 11 Finalmente arrivato a Barcellona

Eccomi finalmente in quel di Barcellona, con un ritardo complessivo di 4 ore e 15 minuti per colpa del volo Vueling.

L’hotel e’ fico e abbiamo anche la connettivita’ internet, molto veloce devo dire. Unica cosa: la porta rj45 era nascosta dietro la scrivania e l’albergatore e’ pazzo.

Domani mi spetta una giornata speciale. W i graphdb!!
http://www.dama.upc.edu/research-2/UIM-GDB

06 Feb 11 In volo per Barcellona…

In questo momento mi trovo all’aeroporto di Fiumicino, cercando di prendere un volo per Barcellona per assistere ad una conferenza internazionale sui GraphDB.

Mi trovo qui all’aeroporto ma il volo della compagia Vueling e’ stato spostato a data da destinarsi.
Quelli della Vueling ci hanno spostato su un altro volo, il problema e’ che ha tardato pure questo e il risultato e’ che siamo qui in attesa di partire… con tanto di bestemmie gratuite e variegate… e nel frattempo lavoriamo col PC e con il telefono.

Iniziamo bene quest’avventura…

07 Set 10 N4g10s monitoring system

Server Room – AD 2034

Sys techie 01A2B: Hey boss, we just had a complete network crash! It seems our main router got down 3 seconds ago, and the main network branch red blinks on our N4g10s monitoring system!!

Network Boss: Uhh… that’s strange, because it’s coupled with a network HA backup. Go upstairs to the router cabinet and check immediately!

Sys techie 01A2B: Ok boss. I’m going… …

Network Boss: what’s up?

Sys techie 01A2B: Hey boss, the two routers have been stolen!! The cables are detached and unlinked, no routers present here!!

Network Boss: mmmhhh… I’m getting there. Wait.

Sys techie 01A2B: .. Hey boss the routers are there now!! That was the cleaning lady! She thought there was time to clean the routers from dust…

Network Boss: ok ok, re create links, please. I’m going to handle angry users now… And get up and running quickly!

[A Angry User]: Hey, I am experimenting a network problem! What’s up?

Network Boss: Which network problem? There is not a network problem. Please retry.

[A Angry User]: mmhh… very strange, it now works! Sorry, that was a false negative. May be a client Winblows problem. Thank you.

Network Boss: Please double check next one. Hi man.