czwartek, października 02, 2008

Powrót



  1. REST:




    1.  http://www.informit.com/articles/article.aspx?p=27645



    2.  http://www.ajaxonomy.com/2008/xml/web-services-part-1-soap-vs-rest



  2. Mainsoft oferuje intergrację między .NET a Webshpere :



  3. Klient  <---> Logika prezentacyjna - poprzez HTTP do klienta zawiera Portlet container (Struts,  JSF/JSP portlets oraz ASP.NET JSR 168 Portlets)) <---> Warstwa logiki biznesowej (EJB, COM). Obie warstwy serwerowe korzystają z Serwisów (Security, Messaging, JNDI, Logging i Mail)



  4. Już nikt nie kwestionuje istnienia dwóch ekosystemów Java i .NET. Dlatego powstaje wiele  rozwiązań pomostowych (aplikacje heterogeniczne): 



    1. Boulder, Colo.-based JNBridge's new JNBridgePro 4.0
    2. Thought - rozwiązanie - dynamic object-to-relational mapping (ORM) - CocoBase 5. Mają mieć produkt JPA dla .NET. Technologia JPA została wprowadzona do EJB 3.0 (składa się z API i JPQL)

  5. Co jeszcze mamy:


      • Bridge Solutions The code infrastructure in most enterprises today is a heterogeneous mix of Microsoft and Java platforms. Many companies have turned to Web services to get these two environments to interoperate, but that need has also spawned a category of "bridge" solutions, including those from JNBridge LLC and the CocoBase JPA solution from Thought Inc. A short list of similar offerings dev shops might want to consider includes:
      • JuggerNET A development tool designed to generate .NET bindings for arbitrary Java classes. It can be used to publish .NET versions of Java APIs and COM bindings for Java APIs, and to integrate .NET clients into JMS or EJB applications. Vendor: Codemesh Inc. Developer license: JuggerNET pricing starts at $1,995 for a Starter Kit, which includes one developer license, first year maintenance and support, and up to five client or server CPU deployments.
      • J-Integra for COM Bridges Java and Microsoft COM apps using a Java implementation of Microsoft's DCOM wire protocol, with optional native "JNI" mode. Vendor: Intrinsyc Software International Inc. Developer license $399; Server license (1 CPU) $3,999; Server license (multi-CPU) $7,999; Client license (5 pack) $745. Free trial available.
      • EZ JCom Enterprise Provides a bridge between Java-based programs and COM/ActiveX objects. Can be used to interface to standard COM objects that don't include a UI, such as COM objects that provide a service. Can also be used from non-Windows platforms-such as Unix, Linux, Mac or handhelds-by using the included Remote Access Service.  Vendor: EZ JCom Enterprise license: $1,495; includes royalty-free redistribution license and a license to use as a server component. The professional version, EZ JCom Pro, is available for $895. Evaluation downloads available.
      • JACOB  A Java-to-COM bridge designed to allow users to call COM Automation components from Java. It uses JNI to make native calls into the COM and Win32 libraries. Vendor: Open source project hosted on SourceForge License: GNU Library or Lesser General Public License (LGPL). The latest milestone release was announced in December 2007.  

      Wklejono z <http://adtmag.com/news/article.aspx?editorialsid=9923>


     Inne ciekawe linki:


    • Oficjalne zapowiedzi VS 2010 oraz .Net Framewok 4.0 - najwyższy poziom tego pakietu to Team Suite. Ogromna zmiana - MS lansował model tworzenia aplikacji w oparciu w DSL (fizyczny poziom projektowania), teraz będzie wspierał UML (logiczny poziom projektowania) co się ma odbić w nowej wersji narzędzi "OSLO". O swej determinacji do przejścia na UML świadczy fakt wstąpienia MS do Object Management Group (OMG) - http://adtmag.com/news/article.aspx?editorialsid=10246
    • Ciekawy protokoł GSS istnieje jego implementacja w Java - http://www.ietf.org/rfc/rfc2853.txt - ma dwie implemetacje:

      • The  Simple Public-Key GSS-API Mechanism [SPKM]
      • The Kerberos Version 5  GSS-API Mechanism [KERBV5]


    • REST czy SOAP?

    It was surprising enough when four years ago, Microsoft made an historic decision to ditch its own Web services architecture attempts and go with the flow. Today, it announced its next version of Windows will go with a different flow.


    For the last four years, one of the most prominent signs of Microsoft's change of thinking with regard to the division of labor in programming, has been its embrace of Simple Object Access Protocol (now just called SOAP, after too much deliberation over the acronym) in Windows Communication Foundation (WCF). It was Web standards organizations, not Microsoft, that initially drove the widespread adoption of so-called WS-* services that use SOAP, but Windows' embrace of SOAP later cemented the standard as a fixture of Web development.


    Initially, WS-* support was to be the hallmark of Microsoft's next-generation operating system back when it was still code-named "Longhorn," but later it was retrofitted to later editions of Windows XP, as well as to the .NET Framework.


    But now that the tide of developer sentiment has recently shifted toward a new Web services model, that trades SOAP's platform independence for a more simplistic transaction structure called Representational State Transfer (REST), Microsoft is saying that it will be building what it's calling a "unified XAML model" into the next editions of both WCF and .NET. Those components will premiere in Windows 7, and beta testing will begin later this month.


    As .NET Framework product manager Steven Martin described on his blog this afternoon, "As developers are broadly adopting the use of web services to build applications (using a spectrum of both advanced WS-* services as well as lighter weight RESTful services), they are reusing services that can live disparately across their enterprises, or on the Web. The best part of composite applications is that they can improve productivity and efficiency on the dev side and give more power to end users for accessing and managing data that's most critical to the business. As a result of the growing popularity of composite apps, developers require new levels of sophistication for building distributed, long-running, and workflow-centric applications."


    That's the crux of Microsoft's marketing message explaining the move toward the REST model. But a white paper also released by Microsoft today takes that language somewhat deeper, going so far as to call into question the viability of the very aspects the company had cited as recently as months earlier as its reasons for embracing SOAP in the first place.


    "Composite apps present new challenges around scalability, performance and reliability," reads Microsoft's latest "Overview" white paper on its new "RESTful" technology, code-named "Dublin" (DOCX available here). "The tried and true strategies for optimizing traditional applications do not satisfy in the more complex environment of composite applications. To address these requirements, composite applications must adopt more sophisticated application architectures -- including managing of highly asynchronous transactions, automation of long-running durable workflows, coordination of processes across very heterogeneous environments and seamless interoperability across platforms using standards. Increasingly, customers are turning to workflow-centric and 'declarative' approaches of defining application logic to help manage this complexity."


    On the day that Microsoft first announced its WS-* technology adoption publicly, its product managers cited as its reasons for doing so what they called the "four pillars:" scalability, performance, availability, and reliability. (Marketers since that time have merged the final two items into one.) This February 2007 study by WCF program manager Saurabh Gupta graphically demonstrated the superior performance, scalability, and availability of WS-* Web services over the technologies that Microsoft had previously employed prior to embracing WS-* and SOAP, including ASP.NET Web Services (ASMX) and the Web Services Enhancements (WSE) add-on to Visual Studio 2005.


    "To summarize the results, WCF is 25%-50% faster than ASP.NET Web Services, and approximately 25% faster than .NET Remoting," reads Gupta's conclusions. "Comparison with .NET Enterprise Service is load dependant, as in one case WCF is nearly 100% faster but in another scenario it is nearly 25% slower. For WSE 2.0/3.0 implementations, migrating them to WCF will obviously provide the most significant performance gains of almost 4x." Earlier in the study, Gupta warned that the chief limiting factor in any SOA system is the implementation of that service, rather than the underlying technology.


    Whether a REST implementation will be significantly more scalable or perform better than a similar SOAP implementation may yet be proven by similar tests. Perhaps we'll see some of those tests during Microsoft's PDC in Los Angeles at the end of the month.


    What's the difference between REST and SOAP, really? The two implementations of Web services architecture are actually completely different; they may accomplish much the same results, but they go about their jobs in entirely separate ways.


    With SOAP, each Web service has its own URL, and a request made of that URL is submitted as a message in an XML enclosure. Each request uses an instruction that's part of the namespace of the service, which is itself explained through an XML scheme called Web Services Description Language (WSDL). So a Web client passes a message to the service, using the lexicon outlined by WSDL and enclosed in a SOAP envelope. The service then responds with results that are enclosed in a very symmetrical fashion, so that the queried element and the response tend to match up.


    The key benefits of SOAP are that it is transport-agnostic (just because it uses HTTP now doesn't mean it has to in ten or fifteen years' time), and that it's easy to associate a Web service with an appropriate URL. That makes directories of Web services easier to assemble.


    REST is actually a bit simpler to explain, especially to someone who hasn't grown too accustomed to SOAP. Unlike SOAP, REST relies entirely on HTTP. But because of that, its request language is already known; there are only four "verbs" in REST which translate directly to the GET, POST, PUT, and DELETE. So the need for WSDL on the request side is completely thwarted.


    With REST, the item of data the client requests -- not the Web service itself -- is the target of the URL. For example, the field where a customer's surname would appear in a database may be the URL, whereas in SOAP, the URL refers to the service to which a request for that surname would be placed in an envelope. The server responds with a message in an XML envelope that pairs both the item that was requested and its response, which makes it easier for an auditing application to account for data transactions.


    Is REST necessarily an easier way to go? It is if you're developing applications using a new concept called the model view controller scheme. These are the "composite" applications to which Microsoft's marketing literature refers; they involve three separate components which may be programmed in completely different languages, and may be running on separate processors. The model component sets up the data that's the subject of an application, whereas the view component prepares a meaningful relationship of that data for a human reader. This tends to translate well to systems where JavaScript or dynamic language code can do the modeling, and HTML can set up the view. The controller may be a server application that maintains the active state and integrity of the database.


    It's an extremely sensible way to think of a network application, and it may be much easier to develop such a system because the three aspects of maintaining it can be delegated to separate development teams. But it almost mandates that the "what" of the application -- the part which the model component is setting up, and the view is preparing to lay out -- have a discrete name, without relying upon some Web service to give it a name later on during the transaction process. That's where the REST model may be a better fit.


    Last November, Microsoft unveiled something called the ASP.NET Model View Controller Framework at a developer's conference in Las Vegas. There, one of the company's non-employee MVPs, author Dino Esposito, noted what he perceived to be the new framework's key benefit.


    Summing up that benefit for his blog, Esposito wrote, "It uses a REST-like approach to ASP.NET Web development. It implements each request to the Web server as an HTTP call to something that can be logically described as a 'remote service endpoint.' The target URL contains all that is needed to identify the controller that will process the request up to generating the response -- whatever response format you need. I see more REST than MVC in this model. And, more importantly, REST is a more appropriate pattern to describe what pages created with the MVC framework actually do."


    That's a sentiment Microsoft evidently took to heart. As Corporate Vice President Scott Guthrie wrote in describing his team's MVC implementation, "It includes a very powerful URL mapping component that enables you to build applications with clean URLs. URLs do not need to have extensions within them, and are designed to easily support SEO and REST-friendly naming patterns. For example, I could easily map the /products/edit/4 URL to the 'Edit' action of the ProductsController class in my project...or map the /Blogs/scottgu/10-10-2007/SomeTopic/ URL to a 'DisplayPost' action of a BlogEngineController class."


    PDC in Los Angeles is a little over four weeks away, and BetaNews will be there to see how the first public betas of .NET 4.0 with REST perform in comparison to their predecessors.


    Wklejono z <http://www.betanews.com/article/NET_Framework_40_to_become_less_SOAPcentric_embrace_REST/1222895836/2>



środa, września 17, 2008

Zebrane wiadomsci z Chrome:



  1. Porównanie kodowania znaków w .NET: http://www.billdawson.com/Articles/dotnetstreams.html
  2. O certyfikatach. Oprogramowanie: 
  3. Oprogramowanie do SSL: 

    1. OpenSSL i XCA - bezpłatne
    2. Oprogramowanie darmowe do zastosowań profesjonalnych, jak zbudowane na bazie OpenSSL i Perla pakiety OpenCA i OpenXPKI (www.openxpki.org/) oraz oparty o Javę i serwer JBoss pakiet EJBCA,  oprogramowanie komercyjne średniej klasy, takie jak Microsoft Certificate Services 
    3. Oprogramowanie komercyjne z wyższej półki, takie jak RSA Certificate Manager (KEON), Entrust Authority czy Cybertrust Unicert (dawniej Baltimore)

  4. Podpis elektroniczny w aplikacjach biurowych (securitystandard.pl) - http://www.securitystandard.pl/news/165699_1.html - wg. zaimplementowany jako XML-DSig w formacie OpenXML (ISO 29500, ECMA 376) rozpoznawalnym przez rozszerzenie DOCX.
  5. Materiały na temat JS - http://www.webdesignerwall.com/general/javascript-in-modern-web-design/ - widać, że najpopularniejszymi rusztowaniami są MooTools i jQuery. Tutaj są zebrane najpopularniejsze widgety. Bardzo przyjemny wygląd zewnętrzny.
  6. Cos dla dzieci: http://abrick.sourceforge.net/
  7. Ciekawe skrypty w różnych j. programowania - http://usefulscripts.wordpress.com/2008/09/08/using-md5-encryption-with-c-and-microsoft-sql-server/ - tutaj pokazene jest jak przechowywać w bazie hasła kodowane MD5.
  8. Zasoby Pythonowe - http://dawson.webfactional.com/blog/
  9. Formatowanie liczb w JS - http://usefulscripts.wordpress.com/2008/08/17/javascript-decimals/ na podstawie biblioteki z http://www.javascriptkit.com/javatutors/formatnumber.shtml
  10. Bardzo fajna strona o JS - http://www.javascriptkit.com/javatutors/formatnumber.shtml
  11. CodeProject - CertyfikatyX.509 w .NET - http://www.codeproject.com/KB/cpp/X509Certificate.aspx
  12. C-Sharp - Strumienie w pamięci - http://www.c-sharpcorner.com/UploadFile/Ashish1/memorystream10272005214644PM/memorystream.aspx?ArticleID=90a33ad2-49df-441b-91fc-94ed620f6010
  13. Dr.Dobbs - XML Sign - http://www.ddj.com/windows/184416926 cz.1
  14. Najlepsze blogi techniczne - http://itmanagement.earthweb.com/cnews/article.php/3770056/Top+200+Tech+Blogs:+the+Datamation+List.htm a tam sugerują:

    1. http://www.techcrunch.com/2008/04/20/who-are-the-top-tech-bloggers/
    2. http://news.cnet.com/CNET-News.coms-Blog-100/2009-12_3-5887900.html

 


piątek, września 05, 2008

Znana witryna - http://today.java.net/pub/a/today/2006/11/21/xml-signature-with-jsr-105.html?page=1 - "XML Signature with JSR-105 in Java SE 5" Standard ten jest już przyjęty tutaj jest dokumentacja - http://jcp.org/aboutJava/communityprocess/final/jsr105/index.html

Celem podpisu cyfrowego jest zapewnienie integralności danych zgodnie z RFC 2828, dodatkowo chodzi o mocniejszy dowód - autentykację (message authentication).

<Signature ID?>
<SignedInfo>
<CanonicalizationMethod/>
<SignatureMethod/>
(<Reference URI? >
(<Transforms>)?
<DigestMethod>
<DigestValue>
</Reference>)+
</SignedInfo>
<SignatureValue>
(<KeyInfo>)?
(<Object ID?>)*
</Signature>

Znaczenie Reference - łącznik między danymi do podpisania a samym podpisem. Wewnątrz dla danych jest liczony skrót wiadomości (hash, digest, footprint, odcisk) w elemencie DigestValue algorytmami (tzw. one way hash) SHA-1, SHA -256, SHA-512. Elementem, który jest podpisywany jest SignedInfo wg algorytmów DSA-SHA1, RSA_SHA1.

Podpisywanie składa się z dwóch etapów:

  • Obliczenie wartości hash i wpisanie jej do Digest Value dla każdej wiadomości
  • Wygenerowanie podpisu cyfrowego (digital signature) dla całego elementu SignedInfo i wstawienie go do pola SignatureValue. Inaczej mówiąc zaszyfrowanie całego bloku SignedInfo. Do podpisu stosuje się klucz prywatny wysyłającego (podpisującego)

Walidacja podstawowa składa się również z 2 etapów: (http://java.sun.com/developer/technicalArticles/xml/dig_signatures/fig8.gif):

  • Reference validation - czy każdy element Reference jest poprawny tzn. oblicza się hash otrzymanego wiadomości i sprawdza z DigestValue
  • Signature validation - polega na sprawdzeniu przy pomocy klucz publicznego podpisującego (?) - odszyfrowanie bloku SignedInfo posługując się kluczem publicznym i porównanie tej wartości z wartością hash elementu SignedInfo otrzymanej wiadomości
  • Potwierdzenie tego jest na stronach Sun-a - http://java.sun.com/developer/technicalArticles/xml/dig_signatures/
  • Inne potwierdzenie "Performing a digital signature involves two steps. In the first step, the data is run through a hashing algorithm. A typical hashing algorithm scans through the data and generates a number of some size -- this is typically called a "digest." If the same data is run through the hashing algorithm again, the same digest should be generated. Good hashing algorithms vary the digest unpredictably if the slightest change is made in the data. This makes it impossible to reverse engineer the original data, given the digest.

The second step in producing a digital signature is to encrypt the digest using the private key of the author. If you're not familiar with the terms public key or private key, then you've probably never heard of public key cryptography. The basic concepts of public key cryptography are simple: anything that is encrypted using an individual's private key, can only be decrypted using the same individual's public key. The reverse is also true: anything encrypted using an individual's public key, can only be decrypted using the same individual's private key. The two keys are mathematically linked. After encrypting the digest with the user's private key, the resulting scrambled data is then appended to the original document data.

Because public keys can be shared with anyone, and private keys should be known only to the signing author, verifying a digital signature is simple. The steps are:

  1. Rehash the document data that was received.
  2. Decrypt the encrypted digest with the author's public key that is typically appended to the document.
  3. Compare the two digests. If they are equal, the signature is valid.

If the two digests are not equal, then either the document has been altered, or the author of the document is not the same as the individual that signed it. However this information does not indicate which of those two faults (or both) have occurred. Wklejono z <http://www.java-tips.org/java-ee-tips/xml-digital-signature-api/using-the-java-xml-digital-signatur-2.html>"

Znaczenie Object -rekomenduje się aby tam umieścić dane które będą podpisywane (w przypadku wersji podpisu enveloping). KeyInfo z kolei może zawierać informacje o kluczu publicznym potrzebnym przy weryfikacji.

Pomocne narzędzia w Javie to keytool - http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.html

Lista dyskusyjna:

Podpis cyfrowy w Java przy pomocy biblioteki Apache XML Security (DigiSig) - http://www.linux.com/feature/39427

Bardzo ciekawy artykuł "JAVA XML Digital Signature" pokazuje architekturę JCA (Java Cryptographic Architecture) jako rozszerzalną platformę:

Niezbędne biblioteki:

  • javax.xml.crypto
  • javax.xml.crypto.dsig
  • javax.xml.crypto.dsig.keyinfo
  • javax.xml.crypto.dsig.spec
  • javax.xml.crypto.dom
  • javax.xml.crypto.dsig.dom

W celu przyśpieszenia operacji kryptograficznych (zajmują one do 30% CPU) proponuje SUN wykorzystanie rozszerzenia PKCS#11 (Crypto.Token Interface Standard) w celu przeniesienia ciężąru obliczeń na akceleratory sprzętowe lub karty inteligentne.

Na powyższym rysunku Sun PKCS#11 Provider stanowi pomost między warstwami wyższymi a konkretną implementacją obliczeń kryptograficznych. Statycznie określenie rodzaju dostawcy polega na edycji pliku konfiguracyjnego sunpkcs11 umieszczonego w ../jre/lib/scurity/java.security Oto fragment mojego pliku:

#

# List of providers and their preference orders (see above):

#

security.provider.1=sun.security.provider.Sun

security.provider.2=sun.security.rsa.SunRsaSign

security.provider.3=com.sun.net.ssl.internal.ssl.Provider

security.provider.4=com.sun.crypto.provider.SunJCE

security.provider.5=sun.security.jgss.SunProvider

security.provider.6=com.sun.security.sasl.Provider

security.provider.7=org.jcp.xml.dsig.internal.dom.XMLDSigRI

security.provider.8=sun.security.smartcardio.SunPCSC

security.provider.9=sun.security.mscapi.SunMSCAPI

Jak widać jest nawet obsługa MS CAPI (poprzez wpis 9).

Fundamentalne łącza:

Przykład diagramu:


czwartek, września 04, 2008

Zasoby z Toshiby:
30.08.2008
==========
Zasoby: Kruger, DaniWeb, Zen Habit, Ajaxian
1. http://www.ajaxtoolbox.com/request/examples.php
2. http://www.mattkruse.com/
27.08.2008
==========
1. jsc - sourceforge, chyba to jest to - http://docs.google.com/View?docid=dfmc8fvr_208fmcjqmhm
2. Obsługa JDOM -http://www.informit.com/guides/content.aspx?g=java&seqNum=432&ns=15275, biblioteka - http://jdom.org/
3. Triki optymalizacyjne w JS wykorzystujace najnowsze osiagnięcia optymalizacji - http://arstechnica.com/news.ars/post/20080822-firefox-to-get-massive-javascript-performance-boost.html
4. Nowa gra "Battelfield Heros" z EA - http://arstechnica.com/news.ars/post/20080826-first-look-battlefield-heroes-is-good-free-pc-gaming-fun.html, podobna gra Team Fortress 2
5. Mini Ajax -pomysły na ajaxa - http://miniajax.com/
6. Miętowy Ajax - http://mintajax.pl/
7. JS corral -http://www.crays.com/jsc/index.htm
8. Ściągnij najnowszy MS SQL Server - http://www.microsoft.com/express/sql/default.aspx
9. Zasoby JS na MOzilli - http://www.mozilla.org/js/scripting/
10. Wykorzystanie FireBug-a - http://www.webmonkey.com/tutorial/Build_Better_Pages_With_Firebug#FirePHP_equivalents_for_other_languages
11. UI JWuery - http://docs.jquery.com/UI/Tabs
12. Jak zacząć GWT - http://code.google.com/webtoolkit/
13. Nauka programowania Java - http://java.sun.com/developer/technicalArticles/wombat_basics/
==================================================
24.08.2008
Linki -
1. http://zenhabits.net/2008/08/minimalist-fitness-how-to-get-in-lean-shape-with-little-or-no-equipment/
2. http://nettuts.com/javascript-ajax/submit-a-form-without-page-refresh-using-jquery/
3. http://effectize.com/jquery-developer-guide
4. http://developer.yahoo.com/
5. http://www.qsor.pl/artykuly/skrypty_wsh/transformacja_xml_xsl/
6. http://msdn.microsoft.com/en-us/library/ms229745.aspx
7. Bouncy Castle
===================================================
sly =
parchment -
he jumped bail =
torrid =
technocrati zbiera linki autoró, delicious linki odwiedzających
http://www.informit.com/articles/article.aspx?p=1232366&seqNum=1
was wringing its hands back in - załamał
--------
Izolacja od IE:
===============
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="/ie-fix.css />
<![endif]-->
--------
<!--[if IE6]> : allows you target a specific browser version
<!--[if gt IE 5]> : allows you to target all versions after the one you specify
<!--[if lt IE 5]> : allows you to target all versions before the one you specify
<!--[if gte IE7]> : allows you target all versions after and including the one that you specify
<!--[if lte IE6]> : allows you target all versions before and including the one that you specify
--------
.NET for Visual FoxPro
--------
+48601100123 - iPlus
--------
02.08.2008
======================
http://java.about.com/
-
Pożyteczne łącza:
1. Strony z wyszukiwarkami kodu dla programistów. Np (csourcesearch.net, QuickRef.org, Koders, ByteMyCode, Planet Code, and O'Reilly Search, Krugle)
2. Pokaż dane z bazy jako transformowalna strona w kontrolce przeglądarki - codeguru
3. Biblioteka jibu do wsparcia wielowątkowosci
4. Zapis treści dokumentu z MS Word do BLOBa
5. XADes - zawiera również aspekty elementu znacznika czasu -tzn. formaty XAdES-T, XAdES-X oraz XAdES-A
-
http://weblog.infoworld.com/securityadviser/archives/2008/08/user_access_con.html?source=NLC-DAILY&cgd=2008-08-01
http://snippets.dzone.com/posts/show/2439
http://www.hscripts.com/tutorials/index.php
http://bytes.com/forum/thread85596.html
http://thejavamonkey.blogspot.com/2008/07/digital-signatures-in-java-public-key.html
http://forums.sun.com/thread.jspa?threadID=5126495&tstart=0
http://swing-fx.blogspot.com/2008/05/swing-search-engine.html
http://forums.sun.com/thread.jspa?threadID=5317720
http://dotnetslackers.com/XML/re-21255_XAdES_Interop_with_XML_DSIG_as_implemented_by_the_NET_Framework.aspx
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3440889&SiteID=1
http://www.secnewsgroups.net/group/microsoft.public.dotnet.security/topic14281.aspx
http://groups.google.com/group/microsoft.public.dotnet.security/msg/d10a83484f4c19eb
http://groups.google.com/group/microsoft.public.dotnet.security/browse_thread/thread/4bbcbf65a23a5afb/d10a83484f4c19eb
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3173985&SiteID=1
http://www.softwaremaker.net/blog/xadesinteropwithxmldsigasimplementedbythenetframework.aspx
http://snippets.dzone.com/posts/show/2439


Zasoby Javy:

  1. Bezpieczeństwo appletu i podpisywanie:
    1. "Java security evolution and concepts" - http://www.javaworld.com/javaworld/jw-12-2001/jw-1221-jdk4security.html
  1. Podpis cyfrowy w Java:
    1. http://www.openxades.org/
    2. http://docs.oasis-open.org/dss/oasis-dss-1.0-profiles-XAdES-spec-cd-01.pdf
    3. http://xml.coverpages.org/xmlSig.html
    4. http://world.std.com/~dtd/sign_encrypt/sign_encrypt7.html
    5. http://xmlbeans.googlepages.com/
    6. http://sourceforge.net/projects/gdigidoc
    7. http://sourceforge.net/project/showfiles.php?group_id=99569
    8. Koncepcja wykorzystania appletów w zespół z servletem do prezentowania danych pochodzących z wartswy biznesowej (na serwerze) - http://www.javaworld.com/javaworld/jw-05-2002/jw-0524-j2ee.html?page=2
    9. Jak wysyłać dane POST w Javie - http://www.javaworld.com/javatips/jw-javatip34.html?page=2
    10. W tym samym stylu pobieranie zasobu plikowego z internetu - http://www.javaworld.com/javatips/jw-javatip19.html
    11. Forum javaworld na temat bezpieczeństwa - http://www.javaworld.com/javaforums/postlist.php?Cat=2&Board=JavaSecurity
    12. Do przejrzenia:
      1. http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.html
      2. http://forums.sun.com/thread.jspa?threadID=660634&messageID=3879820
      3. http://www.linux.com/feature/39427
      4. http://java.sun.com/developer/technicalArticles/xml/dig_signatures/
      5. http://osdir.com/ml/encryption.bouncy-castle.devel/2004-09/msg00046.html
      6. http://forums.java.net/jive/thread.jspa?messageID=247428
      7. http://forums.java.net/jive/thread.jspa?messageID=255470
      8. http://www.java-tips.org/java-ee-tips/xml-digital-signature-api/using-the-java-xml-digital-signatur-2.html
      9. http://java.sun.com/javase/6/docs/technotes/guides/security/xmldsig/XMLDigitalSignature.html
      10. http://www.java2s.com/Code/Jar/wsit/xmldsig.jar.htm
      11. http://coding.derkeiler.com/Archive/Java/comp.lang.java/2004-03/0527.html
      12. http://www.koders.com/java/fidCEFECC0B536138DCFE919C5324844F8D1A0AC068.aspx
      13. http://geekswithblogs.net/DavidBarrett/archive/2008/04/21/121459.aspx
      14. http://www.java2s.com/Code/Jar/wsit/Downloadxmldsigjar.htm
      15. http://www.javaworld.com/javaworld/jw-12-2002/jw-1220-xmlsecurity.html
      16. http://www.javaworld.com/javaworld/jw-10-2002/jw-1011-securexml.html
      17. http://www.javaworld.com/javaworld/jw-06-2005/jw-0627-plugin.html
      18. http://www.javaworld.com/javaworld/jw-03-2003/jw-0321-wssecurity.html
      19. http://www.javaworld.com/javaworld/jw-01-2001/jw-0112-howto.html
      20. http://www.javaworld.com/javaworld/jw-07-2001/jw-0706-webstart.html
      21. http://today.java.net/pub/a/today/2006/11/21/xml-signature-with-jsr-105.html?page=1
  1. Podpis cyfrowy w MS:
    1. http://msdn.microsoft.com/en-us/library/ms229745.aspx
    2. http://msdn.microsoft.com/en-us/library/ms229749.aspx
  1. Podpis cyfrowy w IBM:
    1. http://www.ibm.com/developerworks/java/library/s-digsig.html
    2. http://www.ibm.com/developerworks/library/ws-soa-verifyxml/index.html
    3. http://www.ibm.com/developerworks/edu/ws-dw-ws-understand-web-services4.html?S_TACT=105AGX04&S_CMP=ART
  1. Pobieranie danych z Internetu:
    1. http://www.computing.net/answers/programming/http-post-in-c-/12267.html
    2. http://www.codeproject.com/KB/cs/ScriptBuilder.aspx
    3. http://www.codeproject.com/KB/aspnet/SoftArch5.aspx
    4. http://hdtv.com.pl/


Podstawy podpisu 1
Na podstawie (http://www.javaworld.com/javaworld/jw-12-1998/jw-12-howto.html?page=4)
  1. Key - klucz - informacja służąca do szyfrowania i deszyfrowania danych. Mamy dwa typy kryptografii: 
    1. bazująca na kluczu niejawnych (secret) zwana symetryczną - stosuje jeden typ klucza zarówno do szyfrowania jak i odszyfrowania. Klucz jest wspólny dla odbiorcy i wysyłającego.
    2. bazująca na kluczach publicznych zwana asymetryczną - ma dwa klucze (jeden klucz służy do szyfrowania, drugi do odszyfrowania:
      1. publiczny - (public key)stosowany do potwierdzenia autentyczności (informacja zaszyfrowana kluczem prywatnym danej osoby może być odszyfrowana TYLKO JEJ kluczem publicznym i żadnym innym)
      2. prywatny - (private key) powinnien być znany tylko właścicielowy
  2. Message digest - skrót wiadomości (obrazowo cyfrowy odcisk - digital footprint) - krótki ciąg informacji unikalny dla niej.
  3. Digital signature - podpis cyfrowy. Wyliczony na podstawie Message digest i private key ciąg informacji (zazwyczaj ciąg ten jest znacznie krótszy od orginalnej wiadomości, możnaby podpisać cyfrowo całą wiadomość orginalną ale wymagałoby to znacznej mocy obliczeniowej i czasu). Stanowi potwierdzenie, że dana wiadomość została podpisana przez osobę posiadającą w/w klucz prywatny.
  4. Z uwagi na istniejące i historycznie zaszłe ograniczenia na publikację algorytmów kryptograficznych, twórcy architektury do obsługi w javie kryptografii (JCA - Java Cryptography Architecture) zdecydowali się na zbudowanie jej na koncepcji dostawców usług (providers). JCA jest dostarczana z domyślnymi dostawcami, inne firmy mogą podpiąć własnych dostawców usług kryptograficznych. Dostawca jest pośrednikiem między istniejącą implementacją np. algorytmu MessageDigest a aplikacją.
  5. Kod wygląda mniej więcej tak:
  6.    // The getInstance() method is a static method of the    //  Signature class.  It returns an instance of the    //  installed class that implements the SHA/DSA    //  digital signature algorithm.    Signature signature = Signature.getInstance("SHA/DSA");


Nowości:
  1. o nowego w przeglądarkach nowej generacji. Pojawiły się nowe wersje przeglądarek internetowych (wszystkie w wersji beta). Porównanie wypada słabo. IE 8 - jest to ciężka przeglądarka, ciągnąca w swym balaście wszystkie dobre i złe cechy poprzednich wersji w ramach zgodności wstecznej (aby nie naruszyć istniejących stron napisanych pod konkretną wersję IE). Jest dla starych użytkowników IE i poszerza o nowe możliwości. Chrome jest lekka, ma spartańskie interfejs.Podobne jest podejście do izolacji stron, w obu przeglądarkach każda zakładka to odrębny, niezależny proces. "Like Chrome, IE 8 uses multiple, discrete processes to isolate and protect each tab's contents. However, while Chrome takes a purist approach and literally launches a new process with each opened tab, IE 8 uses more of a hybrid model: It creates multiple instances of the iexplore.exe process but doesn't specifically assign each tab to its own instance. Thus a look at Task Manager under Windows will show an equal or greater number of Chrome instances than running tabs, whereas IE 8 will generate a fewer number of instances -- for example, six copies of iexplore.exe to support 10 discrete tabs -- and share them among the running tabs." Wklejono z <http://www.computerworld.com.au/index.php?id=1560002236&eid=-44>
  2. Powoduje to olbrzymie obciążenie systemu i znaczne zużycie pamięci operacyjnej.
  3. Język F# czyli programowanie funkcjonalne - http://www.computerworld.com.au/index.php?id=1826342097&eid=-301
  4. Jak wystartować z Gears - http://gears.google.com/

  5. Jak pogodzić życie osobiste z zawodowym - http://www.cio.com.au/index.php?id=1361025773&eid=-153



Nie pomijać znaczenia JavaScript
  1. Jak zauważyła Forrest Group jest to pożyteczny język ale ma etykietkę do tworzenia stron internetowych po stronie klienta, czyli nie jest tak popularny.

    Trzeba pamiętać, że aplikacje internetowe to są dwie nogi: strona serwerowa (języki Java, .NET, skryptowe jak Python, PHP, Ruby) i kliencka (JS). Proporcje między nimi decydują o rodzaju i charakterystyka użytkowo-funkcjonalnej aplikacji webowych oraz szybkości działania. Jeżeli przeważa część serwerowa to mamy mocne obciążenie łącza oraz serwera (gro przetwarzania odbywa się na serwerze). Jeżeli przewagę ma część kliencka to serwer działa jako dostawca danych rozpakowywanych i prezentowanych u klienta. Tutaj większą część przetwarzania bierze na siebie komputer klienta odciążając serwer. Do tego dochodzi jakość interpretowania JS (teraz w projektach Mozilli FF 3.1 mówi się o kompilatorze języka TraceMonkey, opartego na badaniach uniwersyteckich, obiecującego radykalne przyśpieszenie działania) oraz sprawność motoru przeglądarki. Ponieważ tak czy inaczej strona internetowa wytworzona na serwerze trafia do punktu docelowego jakim jest przeglądarka to tak naprawdę to ona określa efekt końcowy odbierany przez użytkownika. A jeżeli coś się dzieje w przeglądarce (a powinno, choćby renderowanie strony lub wykonywanie jakieś logiki na strukturze DOM tej strony) to jest ona inteligentna tzn. bierze na siebie wykonywanie pewnych operacji w języku JS. Wniosek - dużo zależy do szybkości pracy motoru przeglądarki i jakości i szybkości interpretowania JS. W tym świetle cieszy pogodzenie tendencji ewolucyjnych z rewolucyjnymi w komitecie zajmującym się pracami nad rozwojem i standaryzacją ECMAScript (JS) - ECMA International Commitee . Wygrała frakcja wersji 3 nad wersją 4, tzn. prostszy język i szybsze wykonywanie się w przeglądarce i urządzeniach mobilnych. Zaowocowało to w nowej wersji 3.1 która nosi nazwę Harmony. Duże znaczenie miała opinia twórców rusztowań Dojo, Scriptaculous i innych.

    W związku z tym zachodzi nowy trend - przetwarzania aplikacji w kontenerze klienckim (np. przeglądarka) natomiast dostęp do zasobów znajdujących się w Internecie poprzez protokół HTTP i jego wyższe warstwy wykorzystujące technologię AJAX. Wszyscy liczący się gracze na rynku aplikacji web2 mają coś w zanadrzu:

    • Adobe - technologię AIR (połączenie odmiany JS - ActionScript i Flasha) - super to wygląda graficzne, wykorzystuje wszystkie dostępne możliwości Windows
    • Google - technologię Gears oraz nową przeglądarkę Chrome, która łączy funkcje tradycyjnej przeglądarki (oczywiście wzbogacając ją o prostotę użycia, integrację z Google Apps, wyszukiwarką, szybkością działania dzięki nowoczesnej maszynie wirtualnej JavaScript korzystającej z innowacji Apple -WebKit i Mozilli-Firefox) z uniwersalnym kontenerem umożliwiającym uruchamianie aplikacji klienckich charakteryzujących się możliwością pracy offline (synchronizacja opóżniona), zapamiętaniem stanu aplikacji u klienta (to już nie jest HTTP bezstanowy) w bazie SQL, wykorzystaniem technologii Gears oraz brakiem paska adresu internetowego. Dodatkowo ma specjalne okno tzw. Application window stwarza to iluzję korzystania jak z aplikacji desktopowej. Uwaga: Chrome używa ciągle starej wersji WebKit, która ma wiele znanych przez hackerów dziur.
    • Mozilla - prace nad technologią Prism (podobnie jak Google)
    • Opera/Yahoo - stosowania widgetów (wihajstrów) pracujących w środowisku maszyny wirtualnej, którą sobie trzeba ściągnąć na początku pracy (potem ewentualne aktualizacje)
    • Microsoft - technologia Silverlight o jej możliwościach przekonuje NBC w przekazach z olimpiady w Pekinie. Kawał potężnej technologii zintergrowanej z platformą .NET i przenaszalnej na inne środowiska oprócz Windows dzięki technologii Mono



wtorek, września 02, 2008

Pomoc o OpenSSL

The Most Common OpenSSL Commands

One of the most versatile SSL tools is OpenSSL which is an open source implementation of the SSL protocol. There are versions of OpenSSL for nearly every platform, including Windows, Linux, and Mac OS X. OpenSSL is commonly used to create the CSR and private key for many different platforms, including Apache. However, it also has hundreds of different functions that allow you to view the details of a CSR or certificate, compare an MD5 hash of the certificate and private key (to make sure they match), verify that a certificate is installed properly on any website, and convert the certificate to a different format. A compiled version of OpenSSL for Windows can be found here.

Below, we have listed the most common OpenSSL commands and their usage:

General OpenSSL Commands

These commands allow you to generate CSRs, Certificates, Private Keys and do other miscellaneous tasks.

  • Generate a new private key and Certificate Signing Request

    openssl req -out CSR.csr -pubkey -new -keyout privateKey.key

  • Generate a certificate signing request (CSR) for an existing private key

    openssl req -out CSR.csr -key privateKey.key -new

  • Generate a certificate signing request based on an existing certificate

    openssl x509 -x509toreq -in MYCRT.crt -out CSR.csr -signkey privateKey.key

  • Generate a self-signed certificate

    openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout privateKey.key -out certificate.crt

  • Remove a passphrase from a private key

    openssl rsa -in privateKey.pem -out newPrivateKey.pem

Checking Using OpenSSL

If you need to check the information within a Certificate, CSR or Private Key, use these commands.

  • Check a Certificate Signing Request (CSR)

    openssl req -text -noout -verify -in CSR.csr

  • Check a private key

    openssl rsa -in privateKey.key -check

  • Check a certificate

    openssl x509 -in certificate.crt -text -noout

  • Check a PKCS#12 file (.pfx or .p12)

    openssl pkcs12 -info -in keyStore.p12

Debugging Using OpenSSL

If you are receiving an error that the private doesn't match the certificate or that a certificate that you installed to a site is not trusted, try one of these commands.

  • Check an MD5 hash of the public key to ensure that it matches with what is in a CSR or private key

    openssl x509 -noout -modulus -in certificate.crt | openssl md5
    openssl rsa -noout -modulus -in privateKey.key | openssl md5
    openssl req -noout -modulus -in CSR.csr | openssl md5

  • Check an SSL connection. All the certificates (including Intermediates) should be displayed

    openssl s_client -connect https://www.paypal.com:443

Converting Using OpenSSL

These commands allow you to convert certificates and keys to different formats to make them compatible with specific types of servers or software. For example, you can convert a normal PEM file that would work with Apache to a PFX (PKCS#12) file and use it with Tomcat or IIS.

  • Convert a DER file (.crt .cer .der) to PEM

    openssl x509 -inform der -in certificate.cer -out certificate.pem

  • Convert a PEM file to DER

    openssl x509 -outform der -in certificate.pem -out certificate.der

  • Convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to PEM

    openssl pkcs12 -in keyStore.pfx -out keyStore.pem -nodes

    You can add -nocerts to only output the private key or add -nokeys to only output the certificates.

  • Convert a PEM certificate file and a private key to PKCS#12 (.pfx .p12)

    openssl pkcs12 -export -out certificate.pfx -inkey privateKey.txt -in certificate.crt -certfile CACert.crt