Developer Blog

May 2008 - Posts

  • Staying Secure, Security Best Practices

    The security model we have designed allows for a few options when deciding how to stay secure.  Today's topic will be to explore security and how you can be sure you know all of the primary methods for keeping data and your credentials secure. 

    Authentication

    A session token is generated using an application key, username and password.  With these three credentials you authenticate to a specific application.  Its important that you secure the Application Key because like your username it is also part of the total authentication into the system.

    Passwords

    Each of the password change methods require a full re-authentication by the user.  This is to prevent someone from stealing a session token and taking over an account.  If you use SSL there should be no way for an external party to take over your account.

    Session Tokens

    The session token was designed to give you a sliding window in which you can operate on the APIs from a single external location.  A session token is in essence the key to our web services after you have proven you are who you say you are.  This token is locked to a single IP Address always.  This is because a session token is something that is very specific to a user and should never be given to anyone else. 

    The session token not only will let you get access to the web services but it will also let you download your files.  Below is a URL that has been built based on a session token that will access the file file.txt in "application1" and childuser1 which in this example is a child account.

    http://services.nirvanix.com/SESSIONTOKEN/application1/childuser1/path/file.txt

    Session tokens stay active for 20 minutes unless they are used.  Whenever a session token is used it will be updated to be active for another 20 minutes.  This means if your session token stays active it could be available indefinately.  Because of this its a good idea to call logout which destroys a session token.  The reason this is important is to prevent anyone who may be watching your http traffic.

    The best use case for a session token is to login, do a single operation using HTTPS and then logout.  However, there are a number of reasons this isn't always possible.  If you have large amounts of data to pass or are extremely time sensitive the addition of SSL could be too much overhead.  If you find yourself in such a situation be aware that if someone is able to get a session token they will still have to try to spoof your IP Address to use the token.  This is why its always a best practice to call logout at any time you have completed your operation because that will instantly invalidate the session token assuring you that no-one else may use that token either.

    Upload Tokens

    The upload token is another form of validation that can be created to allow users to interact with the system.  The reason the upload token is separate from session tokens is to allow the ability to pass to the end client in a web site scenario this token to do an upload.  If a session token were used the end client could use that token to call any method under their account.  With the addition of the GetStorageNodeExtended method you can now also lock an upload token to a specific IP and allow them to only upload to a specific directory.

    Download Tokens

    A token can be generated with GetOptimalURLs which lets you access a file for a specified period of time.  The token can be created in a way that is similar to upload tokens that allows you to only allow a specific IP Address.  The download tokens will timeout after a specified period of time.  The suggestion is always to keep the timeout as short as possible since this token cannot be destroyed later.  If you distribute the link and it is not locked to a specific IP Address anyone can download that file until it expires.

    Password Locking

    If the login system is called and fails 5 times your login will be locked.  This is a temporary lock that will be released after 15 minutes.  This is necessary to prevent attempts at guessing passwords.  You can unlock your account at the Nirvanix Management Portal (NMP) (http://nmp.nirvanix.com/) using the security question answer.

    Re-setting Application Key

    The application key should be considered a secure item since it identifies your application.  Should someone get your application key and you are concerned that you have been compromised you can regenerate it using the NMP.  Any applications using the old key will not be able to login again until the new application key is used.

    Additional Security Information

    A whitepaper is available that details eavesdropping, impersonation and database attacks. You can find this and other important whitepapers at: Nirvanix Whitepapers

  • Java SDK 1.3 Released

    The new Java SDK has been released.  This version includes the following changes:

    1. Content-Range was added to support any size files through partial file upload.
    2. Added File object array in UploadSummary event after an upload is completed.
    3. Added single file uploads through path or java.io.File objects.
    4. Fixed thread bug in uploader.
    5. Added file overwrite through GetStorageNodeExtended.  This can be accessed through an overloaded method in the FileUploader constructor.
    6. PresetTranscode has been added.

    The Java SDK has been receiving a good amount of attention lately.  We just stopped in on the San Diego Java Users Group to discuss integration with Nirvanix using Java.  The advantages are clear when you look at the simplicity when porting across platforms.  We have compiled the Jar using the 1.5 JDK since the majority of the users are still using 1.5.  Later we can compile to multiple versions if requested, the source code is available in the same distribution as well. 

    We appreciate all suggestions you wish to give us with our SDKs or sample applications.  Please leave a note in the forums if you have any questions or comments.

    You can find the SDK at: http://developer.nirvanix.com/files/folders/j2ee_java/entry57.aspx 

    Posted May 01 2008, 11:06 PM by BarryR with no comments
    Filed under: ,