Tuesday, May 20, 2008

Getting Started with ActiveScaffold

Recently I returned to my rails env to do some more experiments (which might be used for a future project)

To start with, I have seen a bit of active scaffold stuff and was very impressed with it originally already.  In the meantime, rails 2 have arrived.  Quite a few things have changed and I was thinking that it might have an effect on the overall picture of active scaffold also.

However, checking up on railsforum etc brought out that not much effect has gone down to active scaffold kind of plugins from rails 2.

Starting up active scaffold is really easy as they say on its website also...

try it here... www.activescaffold.com It turned out to be really simple to initialize yourself with it. 

Searching a bit more I came across a few tutorials -

Tutorial from Active Scaffold guys

Another one from someone like me, experimenting with activeScaffold...

AkillesBlog » Blog Archive » Ruby on Rails: Experimenting with ActiveScaffold   
Blogged with the Flock Browser

Tuesday, May 13, 2008

Open Solaris build May 2008 ( 2008.05 ) released

Today I came across a few news items and articles here and there that talked about the release of OpenSolaris projects' May 2008 release.

Though its available for download from the open solaris home page, Sun is offering Free CD shipments for the latest release here : https://www2.sun.de/dct/forms/reg_us_2307_228_0.jsp

I already ordered my copies :)

Also, there is a nice article about bit of unix OS history and open solaris 2008.05 release review here : http://blogs.zdnet.com/BTL/?p=8703

Monday, May 12, 2008

Installing Oracle 11g on Ubuntu server 64bit on vmware server 2 beta

I have this wish to install a hardy server version on my system. Since I did not want to add another partition, so I chose to do that inside a virtual machine (using vmware). vmware supports 64bit Guest Operating system, as opposed to virtual box which does not. :(

So, I have been able to install the server edition inside the vmware machine. I have never used nfs before, but the tutorial I was following was suggesting to use it.

http://www.pythian.com/blogs/654/installing-oracle-11g-on-ubuntu-linux-710-gutsy-gibbon

However, I am having problems with -
  1. Trying to expand the virtual hard disk inside vmware. I tried it, but havent succeeded yet.
  2. The Oracle installer exits with a strange error message.
I have posted my issues on the ubuntu forums, and havent got any solution yet. Lets see how it goes...

Using Base64 encoding with Oracle / Perl

For basic encryption purposes, base 64 encoding can be used. In fact its so basic that it would probably be incorrect to call it encryption. Its more encoding, basically preventing the subject text from appearing in plain text.

For example, if in some tool, all the parameters are stored in repository tables, and therefore, its not very nice if the passwords are stored there in plain text. They should at least be made illegible, so that they dont appear in plain text and there is some effort spent in decoding it.

Base64 encoding is an industry standard and almost all programming languages, development toolkits provide plugins for this. For Oracle, there are pre-existing packages providing the functionality.

We can use base 64 encoding on oracle side using Oracle supplied package UTL_ENCODE. On the perl side, we could use cpan package MIME:Base64. Other languages provide different kinds of plug-ins. For example, ruby on rails has a plug in for this, Javascript also allows this to be done relatively easily.

The idea is that, such sensitive data to be entered by customers, in encoded format. So, we also dont see the plain text version. And then the program uses the encoded version, right to the point before actual data needs to be used.

For achieving this, following way of working can be used :

1. On Oracle side, the sensitive data is encoded using a program call equivalent to the following will return an encoded/decoded string for a given input string.

FUNCTION fnc_encrypt(lv_str IN VARCHAR2)
RETURN VARCHAR2
AS
BEGIN
RETURN utl_raw.cast_to_varchar2(UTL_ENCODE.BASE64_ENCODE(utl_raw.cast_to_raw(lv_str)));
END;

FUNCTION fnc_decrypt(lv_str IN VARCHAR2)
RETURN VARCHAR2
AS
BEGIN
RETURN utl_raw.cast_to_varchar2(UTL_ENCODE.BASE64_deCODE(utl_raw.cast_to_raw(lv_str)));
END;

Its a design decision whether to put this code in a procedure/package somewhere.

2. On the other end of the processing chain, reverse operation would have to be performed. For example, in Perl, the implementation relies on the cpan package MIME:Base64

use MIME::Base64 ();
and then use the decode/encode function as per the need...
MIME::Base64::decode($PI_CAT_PWD);
MIME::Base64::encode($PI_CAT_PWD);

Thursday, May 8, 2008

vmware 2 beta on hardy

I installed vmware 2 beta on my hardy. It was a surprise and a pleasant one at that, the installation procedure did not require any tweaks at all. It worked out of the box.

Further, when I tried to connect to the web based management interface, I encountered my first problem. vmware requires a log-in with root user, and as any ubuntu user would tell you, the root user is well-hidden in ubuntu. Almost never used, my knowledge on how to set a password to root user was zero.

Again, communities came to help. This thread on vmware communities helped me through that.

http://communities.vmware.com/message/901283#901283

Its a small tip, but none-the-less important. Just run "sudo gnome-terminal" and it would open a root terminal for you. Once there, type "passwd" to change the password for root user and you are done.

now, in the browser, log in to vmware web mgmt interface with user as root, and password you chose for root user.

As a precaution, I gave my normal user admin privileges so that I dont have to login as root all the time.

Oracle wrap utility...

Oracle's wrap utility helps to hide the application logic from being visible. However, I recently discovered that it doesnt hide string literals.

Hard to grasp though, since my understanding was a bit different. I cant really think of a reason why would they keep strings etc in plain text. Perhaps to force people (like me) not to store their encryption key in a package and wrap it to achieve another level of security...

Here's the standard statement from Oracle about the limitations of wrap utility -

Limitations of the Wrap Utility

String literals, number literals, and names of variables, tables, and columns remain in plain text within the wrapped file. Wrapping a procedure helps to hide the algorithm and prevent reverse-engineering, but it is not a way to hide passwords or table names that you want to be secret.

From : http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/c_wrap.htm#LNPLS016

I wonder if there are any tricks to achieve something like that... my investigations are still on.. will report...

Wednesday, May 7, 2008

xgl - System monitor bug in hardy...

On Ubuntu's latest release, Hardy Heron, if you are using xserver-xgl package for graphics, you are in for a surprise.

The system monitor carries on a bug in xgl package wrt incorrect reporting of memory usage, and shows processes using zillion bytes of memory.

I started using xserver-xgl from the times in Gutsy when Compiz would not run on my hardware without that. However, I didnt quite notice this until I involved myself with beta release of hardy.

As it happened, I raised this issue on the Ubuntu forums (more than once actually, link-1, link-2), and finally after a few discussions/posts, it was discovered that

  • xserver-xgl has a few bugs
  • no more active development is happening on this stream of packages
  • Compiz should work without needing this package as well.
As a result, I tried removing xgl from my laptop, and voila, memory consumption numbers are from earth again.. the martian numbers have left... :)

Attaching two screenshots here to give the idea of the Martian numbers...