Presentation is loading. Please wait.

Presentation is loading. Please wait.

25 Apr 2005NVO Team Meeting - Tucson1 VOStore: a Java implementation Matthew J. Graham CACR/Caltech T HE US N ATIONAL V IRTUAL O BSERVATORY.

Similar presentations


Presentation on theme: "25 Apr 2005NVO Team Meeting - Tucson1 VOStore: a Java implementation Matthew J. Graham CACR/Caltech T HE US N ATIONAL V IRTUAL O BSERVATORY."— Presentation transcript:

1 25 Apr 2005NVO Team Meeting - Tucson1 VOStore: a Java implementation Matthew J. Graham CACR/Caltech T HE US N ATIONAL V IRTUAL O BSERVATORY

2 25 Apr 2005NVO Team Meeting - Tucson2 Overview Java webapp: –$TOMCAT_HOME/webapps/vostore Embedded AXIS to handle WS: –$TOMCAT_HOME/webapps/vostore/services Embedded Sleepycat Berkeley DB (JE) Embedded Jakarta Slide to handle WebDAV: –$TOMCAT_HOME/webapps/vostore/webdav WCK to handle relational db stores WSS4J to handle WS-Security

3 25 Apr 2005NVO Team Meeting - Tucson3 WSDL specification revisions getAvailability formats: FILE, CSV transports: SOAP-ATTACHMENT, WEBDAV put(id, format, transport)  VOStoreResponse get(id, format, transport)  VOStoreResponse listAll  VOStoreDescriptor[] list  VOStoreDescriptor[] rename delete

4 25 Apr 2005NVO Team Meeting - Tucson4 StoreDescriptor identifier creationDate modificationDate owner: DN format: –FILE, CSV, WEBDAV-FOLDER, WEBDAV-RESOURCE location parent children isFolder isStored } } VOStoreDescriptor

5 25 Apr 2005NVO Team Meeting - Tucson5 WebDAV A set of extensions to HTTP to support: –Locking– Collections –Properties– Access control –Namespace management– Versioning Verbs: –PROPFIND – PROPPATCH –MKCOL – DELETE –PUT – COPY –MOVE – LOCK –UNLOCK – OPTIONS –SEARCH

6 25 Apr 2005NVO Team Meeting - Tucson6 Identifier-location mapping ivoa:// nvo.caltech / myData # 1 Format = FILEFormat = CSV /files/abcdef12-abcdef12/db/nvo_caltech_myData_1

7 25 Apr 2005NVO Team Meeting - Tucson7 Relational db stores –open JDBC connection to db –drop table nvo_caltech_myData_1 –create table nvo_caltech_myData_1: #Names:  col1, col2, … #Formats:  varchar(20) –insert into nvo_caltech_myData_1 values (…)

8 25 Apr 2005NVO Team Meeting - Tucson8 Security (I) Certificate request: –Country – State– City –Organization – Unit– Name– BEGIN CERTIFICATE REQUEST----- MIIBWTCCAQMCAQAwgZ0xCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlh MREwDwYDVQQHEwhQYXNhZGVuYTEQMA4GA1UEChMHQ2FsdGVjaDEVMBMGA1UECxMM QXN0cm9waHlzaWNzMRcwFQYDVQQDEw5NYXR0aGV3IEdyYWhhbTEkMCIGCSqGSIb3 DQEJARYVbWpnQGFzdHJvLmNhbHRlY2guZWR1MFwwDQYJKoZIhvcNAQEBBQADSwAw SAJBANWUbVnZ+kbWycOcWiICvOZajKyhGFQhzOk5mbc9UcCYha9KkdzxZqtvYslt 8+/m6xC2qvQ+nNSLo8TKc0aJvAECAwEAAaAAMA0GCSqGSIb3DQEBBAUAA0EArAHt lt0rLhSe0IPuft5h3dNrdASOqLCT49Lhdq+4In62NZFum8Ks3dEykMjhon92NjuQ zQB6F3ipro+yCTpUOA== -----END CERTIFICATE REQUEST-----

9 25 Apr 2005NVO Team Meeting - Tucson9 Security (II) X.509 certificate (PEM): -----BEGIN CERTIFICATE----- MIICFDCCAb4CAQcwDQYJKoZIhvcNAQEEBQAwgYsxCzAJBgNVBAYTAlVTMRMwEQYD VQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhQYXNhZGVuYTEQMA4GA1UEChMHQ2Fs dGVjaDENMAsGA1UECxMEQ0FDUjEOMAwGA1UEAxMFQ2lyY2UxIzAhBgkqhkiG9w0B CQEWFG1qZ0BjYWNyLmNhbHRlY2guZWR1MB4XDTA1MDQyMTIxNTkyNVoXDTA1MDUy MTIxNTkyNVowgZ0xCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMREw DwYDVQQHEwhQYXNhZGVuYTEQMA4GA1UEChMHQ2FsdGVjaDEVMBMGA1UECxMMQXN0 cm9waHlzaWNzMRcwFQYDVQQDEw5NYXR0aGV3IEdyYWhhbTEkMCIGCSqGSIb3DQEJ ARYVbWpnQGFzdHJvLmNhbHRlY2guZWR1MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJB ANWUbVnZ+kbWycOcWiICvOZajKyhGFQhzOk5mbc9UcCYha9KkdzxZqtvYslt8+/m 6xC2qvQ+nNSLo8TKc0aJvAECAwEAATANBgkqhkiG9w0BAQQFAANBACwiM3r+07/i ZfiIrF7YPEC1Eml+k+5esbbzObl/OyaSHrUSP0xYM12fuFiBSVMmwU9NlyLCNDHn M8dWnFTIDyI= -----END CERTIFICATE-----

10 25 Apr 2005NVO Team Meeting - Tucson10 Security (III) X.509 certificate (PEM) cont.: Owner: CN=Matthew Graham, OU=Astrophysics, O=Caltech, L=Pasadena, ST=California, C=US Issuer: CN=Circe, OU=CACR, O=Caltech, L=Pasadena, ST=California, C=US Serial number: 7 Valid from: Thu Apr 21 14:59:25 PDT 2005 until: Sat May 21 14:59:25 PDT 2005 Certificate fingerprints: MD5: C0:00:75:FC:D2:7A:BE:B1:35:2D:31:53:3B:27:9D:01 SHA1: 50:9C:96:4B:14:D3:0B:72:3F:49:CC:99:E2:3A:B7:45:FE:D5:F2:24 X.509 certificate (PKCS12)

11 25 Apr 2005NVO Team Meeting - Tucson11 WS-Security (I) Digitally sign SOAP messages with X.509 certificate: MIICFDCCAb4CAQcwDQYJKoZIhvcNAQEEBQAwgYsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYW xp Zm9ybmlhMREwDwYDVQQHEwhQYXNhZGVuYTEQMA4GA1UEChMHQ2FsdGVjaDENMAsGA1UECxMEQ0FD UjEOMAwGA1UEAxMFQ2lyY2UxIzAhBgkqhkiG9w0BCQEWFG1qZ0BjYWNyLmNhbHRlY2guZWR1MB4X DTA1MDQyMTIxNTkyNVoXDTA1MDUyMTIxNTkyNVowgZ0xCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpD YWxpZm9ybmlhMREwDwYDVQQHEwhQYXNhZGVuYTEQMA4GA1UEChMHQ2FsdGVjaDEVMBMGA1UECxMM QXN0cm9waHlzaWNzMRcwFQYDVQQDEw5NYXR0aGV3IEdyYWhhbTEkMCIGCSqGSIb3DQEJARYVbWpn QGFzdHJvLmNhbHRlY2guZWR1MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANWUbVnZ+kbWycOcWiIC vOZajKyhGFQhzOk5mbc9UcCYha9KkdzxZqtvYslt8+/m6xC2qvQ+nNSLo8TKc0aJvAECAwEAATAN BgkqhkiG9w0BAQQFAANBACwiM3r+07/iZfiIrF7YPEC1Eml+k+5esbbzObl/OyaSHrUSP0xYM12f uFiBSVMmwU9NlyLCNDHnM8dWnFTIDyI=

12 25 Apr 2005NVO Team Meeting - Tucson12 WS-Security (II): /j0+BLme8mKuxVed9eXCNnSmZBU= m8z0ODW17ynpovU0tn13WD5byd41cePcoaFaTKzS+9z3RSB6vcE2Sjb50fhtO75Uuu+8JM9HUBmD AFWJ7Tz3zg== ivoa://nvo.caltech/myData#1 WEBDAV CSV

13 25 Apr 2005NVO Team Meeting - Tucson13 WSS4J: Client public VOStoreTestSecureClient() { EngineConfiguration config = new FileProvider("client_deploy.wsdd"); VOStoreLocator loc = new VOStoreLocator(config); Stub axisPort = (Stub) loc.getPort(VOStoreSoap.class); axisPort._setProperty(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE); axisPort._setProperty(WSHandlerConstants.SIG_PROP_FILE, "client_crypto.properties"); axisPort._setProperty(WSHandlerConstants.USER, "mjg-cert"); axisPort._setProperty(WSHandlerConstants.PW_CALLBACK_CLASS, "net.ivoa.vospace.client.PWCallback"); axisPort._setProperty(WSHandlerConstants.SIG_KEY_ID, "DirectReference"); service = (VOStoreSoapStub) axisPort;

14 25 Apr 2005NVO Team Meeting - Tucson14 WSS4J: Server public String getUser() { MessageContext context = MessageContext.getCurrentContext(); Vector recvResults = (Vector) context.getProperty(WSHandlerConstants.RECV_RESULTS); WSHandlerResult result = (WSHandlerResult) recvResults.get(0); Vector results = result.getResults(); WSSecurityEngineResult wsseResult = (WSSecurityEngineResult) results.get(0); String DN = wsseResult.getPrincipal().getName(); String user = DN.substring(13, DN.indexOf(','));

15 25 Apr 2005NVO Team Meeting - Tucson15 Secure WebDAV Server: Client: Protocol.registerProtocol("https", new Protocol("https", new SSLCertSocketFactory("ca.pem", "client.p12"), 443)); HttpURL hrl = new HttpsURL(“localhost", 8443, "/webdav"); WebdavResource wdr = new WebdavResource(hrl);

16 25 Apr 2005NVO Team Meeting - Tucson16 Attachments: Client Put: DataHandler attachmentFile = new DataHandler(new FileDataSource("test.fits")); service._setProperty(Call.ATTACHMENT_ENCAPSULATION_FORMAT, Call.ATTACHMENT_ENCAPSULATION_FORMAT_DIME); service.addAttachment(attachmentFile); Get: Object[] messageAttachments = service.getAttachments(); AttachmentPart attachment = (AttachmentPart) messageAttachments[0]; DataHandler dh = attachment.getDataHandler(); InputStream is = dh.getInputStream();

17 25 Apr 2005NVO Team Meeting - Tucson17 Attachments: Server Adding: FileDataSource fds = new FileDataSource(tempFile); AttachmentPart replyAttachment = new AttachmentPart(new DataHandler(fds)); MessageContext context = MessageContext.getCurrentContext(); Message respMsg = context.getResponseMessage(); respMsg.getAttachmentsImpl().setSendType(Attachments.SEND_TYPE_DIM E); respMsg.addAttachmentPart(replyAttachment); Retrieving: MessageContext context = MessageContext.getCurrentContext(); Message reqMsg = context.getRequestMessage(); Attachments messageAttachments = reqMsg.getAttachmentsImpl();

18 25 Apr 2005NVO Team Meeting - Tucson18 Interoperability C#: –WSE 2.0 –WSRF.Net Perl : –DIME-based attachments not yet fully functional in SOAP::Lite –WS-Security will be supported by WSRF::Lite (but not yet) –HTTP::Webdav/PerlDAV Python: –ZSI –pyGridWare –Python DAV client library

19 25 Apr 2005NVO Team Meeting - Tucson19 What next? VOTable and FITS binary table parsers SRB for bulk data transfers SAML tokens


Download ppt "25 Apr 2005NVO Team Meeting - Tucson1 VOStore: a Java implementation Matthew J. Graham CACR/Caltech T HE US N ATIONAL V IRTUAL O BSERVATORY."

Similar presentations


Ads by Google