Jump to: navigation, search

Difference between revisions of "Main Page"

Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
+8801713083079
+
* '''Launchpad Entry''': [https://blueprints.launchpad.net/nova/+spec/openid-nova OpenID Authentication Service API in OpenStack Nova]
 +
* '''Created''': Rasib Hassan Khan
 +
* '''Contributors''': Jukka Ylitalo, Abu Shohel Ahmed
  
1. Download files data from many
+
== Summary ==
URLs and save them to the local
+
Currently, the Django-Nova/Dashboard supports only basic  username/password based access. There is separate user credential  management both on the web service point and [[OpenStack]]. [[OpenStack]]  relies on the web server for user authentication resulting in Multiple  Policy Decision Points (PDP). Integration of OpenID with Openstack  allows flexible SSO mechanism for administrators. The solution also  removes the existing multiple identity silos in web server and [[OpenStack]].
files in the directory of your choice:
 
  
This Java program lets you download files from one or more URLs and save them in the directory where you want. This program takes destination directory for the files to save as first command line argument and URLs for the files as next command line arguments separated by space. Java provides URLConnection class that represents a communication link between the application and a URL. Invoking the openConnection method on a URL creates URLConnection object. Now get [[InputStream]] object from that connection and read the data. Finally write the data to the local file.
+
== Release Note ==
 +
Integration of OpenID with [[OpenStack]]. Introducing OpenID Authentication API in [[OpenStack]] Extending OpenID service for Dashboard and Django-Nova.
  
[[FileDataDownload]].java:
+
== Rationale ==
 +
== User stories ==
 +
Flexibility for Administrators to use user-centric OpenID Authentication in [[OpenStack]].
  
import java.io.*;
+
== Assumptions ==
import java.net.*;
+
== Design ==
public class [[FileDataDownload]] {
+
[[Media:StartingPage$C:\Users\rasib\Documents\My|Dropbox\Academic\Thesis\Write ups\Diagrams\Sequence_block_diag.png|C:\Users\rasib\Documents\My Dropbox\Academic\Thesis\Write ups\Diagrams\Sequence_block_diag.png]]
final static int size=1024;
 
public static void
 
[[FileDownload]](String fileAddress, String
 
localFileName, String destinationDir) {
 
[[OutputStream]] os = null;
 
URLConnection URLConn = null;
 
  
// URLConnection class represents a communication link between the
+
== Implementation ==
// application and a URL.
+
This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like:
  
[[InputStream]] is = null;
+
=== UI Changes ===
try {
+
Should cover changes required to the UI, or specific UI that is required to implement this
URL fileUrl;
 
byte[] buf;
 
int [[ByteRead]],[[ByteWritten]]=0;
 
fileUrl= new URL(fileAddress);
 
os = new [[BufferedOutputStream]](new
 
[[FileOutputStream]](destinationDir+”\\”+
 
localFileName));
 
//The URLConnection object is
 
created by invoking the
 
  
// openConnection method on a URL.
+
=== Code Changes ===
 +
Code changes should include an overview of what needs to change, and in some cases even the specific details.
  
URLConn = fileUrl.openConnection();
+
=== Migration ===
is = URLConn.getInputStream();
+
Include:
buf = new byte[size];
 
while (([[ByteRead]] = is.read(buf)) != -1) {
 
os.write(buf, 0, [[ByteRead]]);
 
[[ByteWritten]] += [[ByteRead]];
 
}
 
System.out.println(“Downloaded
 
Successfully.”);
 
System.out.println(“File name
 
:\””+localFileName+ “\”\nNo of
 
bytes :” + [[ByteWritten]]);
 
}
 
catch (Exception e) {
 
e.printStackTrace();
 
}
 
finally {
 
try {
 
is.close();
 
os.close();
 
}
 
catch (IOException e) {
 
e.printStackTrace();
 
</nowiki></pre>
 
public static void fileDownload(String
 
fileAddress, String destinationDir)
 
{
 
  
// Find the index of last occurance of character ‘/’ and ‘.’.
+
* data migration, if any
 +
* redirects from old URLs to new ones, if any
 +
* how users will be pointed to the new way of doing things, if necessary.
  
int lastIndexOfSlash =
+
== Test/Demo Plan ==
fileAddress.lastIndexOf(‘/’);
+
This need not be added or completed until the specification is nearing beta.
int lastIndexOfPeriod =
 
fileAddress.lastIndexOf(‘.’);
 
  
// Find the name of file to be downloaded from the address.
+
== Unresolved issues ==
 +
This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.
  
String fileName=fileAddress.substring
+
== BoF agenda and discussion ==
(lastIndexOfSlash + 1);
+
Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.
  
// Check whether path or file name is given correctly.
+
----
 
+
[[Category:Spec]]
if (lastIndexOfPeriod >=1 && lastIndexOfSlash >= 0 &&
 
lastIndexOfSlash < fileAddress.length()
 
-1 1)
 
{
 
[[FileDownload]](fileAddress,fileName,
 
destinationDir);
 
}
 
else
 
{
 
System.err.println(“Specify correct path or file name.”);
 
}}
 
public static void main(String[] args)
 
{
 
 
 
// Check whether there are atleast
 
two arguments.
 
 
 
if(args.length==2)
 
{
 
for (int i = 1; i < args.length; i++) {
 
fileDownload(args[i],args[0]);
 
}
 
}
 
else{System.err.println(“Provide
 
\”Destination directory path\” and \”file
 
names\” separated by space.”);
 
}
 
}
 
}
 
 
 
Compile and Run:
 
 
 
In this example, the location for the
 
directory where file “jsf.htm” is to be
 
saved is “c:\download”.
 
 
 
C:\[[JavaJazzup]]>javac [[FileDataDownload]].java
 
C:\[[JavaJazzup]]>java [[FileDataDownload]]
 
c:\download http://localhost:8080/
 
tomahawk_tags/pages/jsf.htm
 

Revision as of 12:02, 19 April 2011

Summary

Currently, the Django-Nova/Dashboard supports only basic username/password based access. There is separate user credential management both on the web service point and OpenStack. OpenStack relies on the web server for user authentication resulting in Multiple Policy Decision Points (PDP). Integration of OpenID with Openstack allows flexible SSO mechanism for administrators. The solution also removes the existing multiple identity silos in web server and OpenStack.

Release Note

Integration of OpenID with OpenStack. Introducing OpenID Authentication API in OpenStack Extending OpenID service for Dashboard and Django-Nova.

Rationale

User stories

Flexibility for Administrators to use user-centric OpenID Authentication in OpenStack.

Assumptions

Design

Dropbox\Academic\Thesis\Write ups\Diagrams\Sequence_block_diag.png|C:\Users\rasib\Documents\My Dropbox\Academic\Thesis\Write ups\Diagrams\Sequence_block_diag.png

Implementation

This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like:

UI Changes

Should cover changes required to the UI, or specific UI that is required to implement this

Code Changes

Code changes should include an overview of what needs to change, and in some cases even the specific details.

Migration

Include:

  • data migration, if any
  • redirects from old URLs to new ones, if any
  • how users will be pointed to the new way of doing things, if necessary.

Test/Demo Plan

This need not be added or completed until the specification is nearing beta.

Unresolved issues

This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.

BoF agenda and discussion

Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.