Tuesday, December 18, 2007

Certificate based Authentication and WCF - Using Service Authorization Manager

I've been working on Security for our SOA Architecture and i decided to pursue a brokered authentication approach using x.509 certificates issued by a Certificate Authority. It was a lengthy process of researching between the different approaches... nearly went brokered STS, but since we won't have a need for multiple STS, i decided to go with x.509. It's interoperable and widely used, and it suites our needs since we had requirements for interoperability and need for impersonation and delegation.

During the creation of the service authorization manager i decided to implement Role-based security without the need to decorate the operations with the PrincipalPermission attributes. This meant putting the required permissions into the configuration file and reading them through the implemented CheckAccess() method in the service authorization manager. I also went another step further an included the roles into the configuration file. I could have settled with using the ready made solutions like;



ADAM and Active Directory - As easy as it is, i didn't want to include another business layer into administration (such as IT).



MembershipProvider - This is a good one at that, but i wanted something simpler. Something that wouldn't need any setup



AzMan - I guess i just didn't try making this really work. Looking back, i think this could be a possibility.



Anyway, as i said i placed the roles mapping into the configuration. It separates the security logic from the base code and provides a simple way for administering the roles. Try to get a copy of the WCF Unleashed book as it outlines a part of what i used for this.



On a side note, i also used the thumbprints for identifying the certificates uniquely. I had some troubles with the byte array conversion for the thumbprint, but this blog right here helped me alot.

Thursday, December 23, 2004

Last night at the office before xmas



Its 8:35 pm here.. just an hour and 25 minutes short before the end of the shift. I didnt do much today. Below is a run down of what happened to me during the course of the day....

Did the IPF (individual planning form).. more like what you expect to accomplish for the fiscal year, in terms of improvement, goals and career plans. Had to make some changes as recommended by our project manager. The upcoming year looks like a year of lotsa work. Probably be implementing the test harness, creating the Avalon UI Framework, finish my masters as well as talk to alot of people.

I also worked on reconfiguring the test scripts to suite the move from the old whidbey version to the vs 2005 beta 1 version... Im a bit confused why microsoft had to change alot of items in the msbuild project file configuration. The previous one was already working... anyway, after reading through some materials, watching msdn tv, help from jon chua and through sheer trial and error i was finally able to crack and take note of the differences. The whole script will probably take a bit of time to alter, so i guess i will do that after xmas.

Anyway, this morning, i was AGAIN supposed to meet up with the guys at bobson.. and AGAIN they had to cancel up on me at the last minute... the product shots were still unavailable so we had to reschedule it. It was ok except for the fact that i did reserve that morning for that.. still, we were able to go shopping, jack and i. I bought some stuff for sharon.. a superman carpet, she so fond of superman. I also bought a racket for me and as a gift for kuya klen for his birthday on the 28th. We both share the same interest in badminton. I bought 2 isometric yonex from toby's that where on a discount. He'd be spending his birthday in cagayan valley with my grandparents. He told me that he wanted to at least be with them before he goes to the states by next year.

When i arrived at the office, there were people scurrying around. It seems there were a raffle for some items for people who werent able to get anything during the christmas party. I did try but got the expected result. The paper said.. "Sorry, better luck next time.. Merry Xmas and a Happy New Year"... hehe.. as if i expected to win... they said if your lucky in gambling/raffles, your unlucky in love/girls and vice-versa.. hmm i wonder ehehe... Anyway, I got alot of gifts from my friends at work! I was so happy to get gift this morning.. really!.. i wasnt expectin much.. just the usual greetings of merry xmas.. but thanks to cecil, kat, dick, kc, anne, michelle and boss tolitz for the gifts! I honestly did want to give them gifts also, its just that i really didnt have time to squeeze it in.. add the meager resources that i have right now.. (lame excuse emil!) hehe.. anyway, just wanted to thank them...

Anyway, thats mostly it... not much of an afternoon i guess.. we did play online scrabble a while ago.. hehe.. all the same.. its almost the end of the shift.. Merry Xmas everyone!!!!!

Tuesday, December 21, 2004

Hit Counter for my blogsite

Just added a blog counter for my site... nothing new here.. i did not strip the links .. you might want to signup for one yourself.. Cheers!


Free Web Site Counter

from Longhorn to XP SP2

caveman with a spear

Its a mere 3 days to go before xmas, and still i havent worked on my xmas gift list hehe. But im still hoping for the best and hope i can squeeze it in before xmas.

Anyway, we've just ported our machines in the office from Longhorn winhec bits to Windows XP SP2, a move that has been lingering months before. It seems that microsoft aint supporting the Winhec and PDC builds of Longhorn anymore. Looks like Longhorn wont be available anytime soon. The move actually is alot better since things are alot more stabler in xp. We Installed Windows XP SP2, Visual Studio 2005 Beta 1 and The Avalon Community Technology Preview (inorder to continue development on new key technologies). Anyway, we in the infrastructure team came in first (but some of the developers where already in XP), we had to reconfigure and recompile the build and test machines and task to suit the migration. The builds would really have to wait so that the daily builds wont be interrupted. I will be reconfiguring the scripts and reinstalling the test machines later.. hopefully :).

My manager also emailed me links to the new Visual Studio Team System, i did go through some of the stuff yesterday and ssems a very promising move from microsoft to integrated team development essentials such as source code management and testing. This will be a great step forward and would probably increase production and quality two folds hehe..

Anyway, I was supposed to have a meeting today with the folks at bobson jeans regarding the new layout for the site but they just had to cancel at the last minute. Another day wasted, i intended beforehand to accompany jack in the dawn mass a while ago and go to mega mall to buy gifts, but the meeting (which was announced the yesterday) left me to postpone that, and guess what! they would probably ask for the meeting tomorrow, just my luck.. :)

Sunday, December 19, 2004

5 Days to Go! Xmas!



Its the 20th of December, just a few days to go before Christmas. Xmas seems to hold a quite different air to me... Gone were the days of pure anticipation for the jovial day. I guess, gone where the days of childhood where one could go out and expect gifts from Godparents. This time, Im the Godparent.. oh oh.. here i am again, reminiscent of the past. It's just that we sometimes grow impatient of how time is so slow, how we want for it to go faster so we could be what we want to be... But when we reach that point in time, we begin to wonder, and think of the time that passed by as a mere blink...

Christmas time for me is more on worrying about meeting the xmas gift list. I really am not expecting to recieve much, but what im expecting is to give a lot. :) Well, i seem to be at least fulfillin the seasons message of xmas being a season of giving... anyway, preparing gifts to friends and love ones never fail to bring a sense of warmth. Seeing their faces light up when you hand them their gift is like telling them that they are special.

Anyway, back to where i am right now... Right now, im at the office, trying hard to look bz.. hehe.. got nothin much to do right now. So i decided to just write up some blog :)...

This morning, I woke up a bit too early. Being accustomed to waking up around 4am, i woke up too early and had to FORCE myself to sleep, and to no avail hehe... I ended up going online at around 7am... But i am quite pleased with the new schedule, I got more time to sleep and not worry about being sleepy at work... The only problem would be that i wont probably be able to do anything else...

Anyway, I will try to do some work and try to finish the performance test scripts. I'd better go now and try to make some sense of the day... cheerio!

Thursday, December 16, 2004

Post Mortem

carrot super hero

Finally! The end of the increment! Demo was alright, too much preparation for a few minutes demo. hehe.. anyway, everything went well.

I arrived home yesterday at around 12am... wee tired from waiting for our demo, since we were the last on the list. Anyway, for today we still had to come in early, with an offset of two hours to make up for the time we spent yesterday on the demo.. making it 8am instead of 6am.

Rush for the office a moment ago was a drag.. as i got in the fx on the way to the MRT station, jackielou gave me a ring and told me there was a fire at the mandaluyong station. Sure enough, the expecting traffic and the flood of people at the foot of the station confirmed my fears... Good thing i saw a college friend and decided to take a taxi all the way to work. We talked on the way to makati, he mostly told me details about his work as a network engineer and how he would like to shift to web development. The taxi driver did a great job dodging traffic and hitting side street, as if he knows all the detours in the area. He was able to get us all the way from north to mandaluyong in a matter of minutes. But the thing was, due to talking, and unfamiliarity with the streets, i ended up getting out of the cab in mandaluyong and had to make another two good rides to reach the office. I wanted to take another cab, but i thought i was already more than an hour late, might as well get something out of the situation and learn the route.

Upon coming in to the office, the weekly meeting was already up, usual stuff of Post Mortem for Inc4 and some team agenda. We will be having a team lunch later at Burgoo's for the good work. Anyway, all in all, the day ends with me... doin nothin.. hehe.. just this blog.. which took me a couple of minutes to work on.. read my company email, which got to be alot since i wasnt able to check them yesterday due to the unavailability of my machine (cross-shift) and doin my T2 or time tracking for the week. Id better go now, i will have to get a gift the kris kringle... ;) cheers!!!!

Wednesday, December 15, 2004

Another day, same life :)

Hey All,

blue cat sleeping

Its thursday and i'm at home. Got a demo later for the guys at austin, using webex... demo on some infrastructure stuff. I woke a tad earlier than what i intended to be, been accustomed to waking up early due to the 6am - 2pm schedule (morning shift) that I'm in, problem is I'm supposed to come in at 2pm instead to make up for the time difference in austin (demo will probably be later in the evening as they said.. mostly gonna stretch till midnight.. but im hoping it wont). Anyway, I got a bit of an inspiration.. probably since im not used to staring at the walls of my room this early for some time now (ive been in the morning shift for about 4 months now). Its a bit of a relieve knowing my shift will soon be 2pm to 10pm by Dec.20. So here i am writing on my blog. Actually i usually write my blogs in multiply.com (emilski.multiply.com) but i decided i should might as well write here, well everyone else are...

The year is almost ending and as i ate my breakfast a while ago i came to recall the events that passed by in my life. Got some reflections on things as well as realizations as well. Damn, im not growin younger, as i got out to look outside i saw the familiar scenes and I began to think of alot of things. As i peered out and looked around me, i dawned on me time has changed the way i look at things. I recalled the times i was still in my grade school and high school and rejoice at the thought of saturday or whenever there would be no classes. I would go out and be with my friends, playing and havin fun. Its funny actually, how the thoughts that run through my mind were alot different from what i had back then. I began take long breathes and the smell ofy the cold morning air quickly reminded me of those worry-free times.

Well, cutting short the seemingly "Blast from the past" stuff, i align my thoughts on what will i be doing for the rest of the day. Later in the office, we'll be having our revelation day for the xmas kris kringle. Im a bit curious who could be my gift-giver. The past weeks i was supposed to get gifts but all i remember was four mentos candies (rolls) , put off as a gift for the then theme "something for emergency". I guess whoever got my me, is either too bz (probably a manager or one of the team leads) or a uninterested fella who might as well not be getting his/her gifts as well.. hehe.

Im quite thankful that the morning shift will soon be over and this early morning wakeup call will soon be over. Im quite accustomed to working in the evening, being a nocturnal type and all, id probably be sleeping more the next months. The increment is likewise ending and im thankful that i was able to create a working prototype for the test harness, i handle the design and creation of the test automation scripts for running unit tests, performance tests, code coverage, regression for the whole development. I think the increment 5 would be a much harder time for me, since id be continuously working on the test rigs (implementation of the test procedures will be by then) as well as a new assignment on the Avalon GUI test framework. Im a bit of a beginner on avalon stuff and need alot of work with the task, but im thankful that this avalon stuff is also my thesis for my masters.. so im hitting two birds with one stone. :)

Christmas time is almost here, and i havent done any shopping, honestly im not sure if my purchasing power will be able to meet the annual gift list. Still, i am hopping for the hopeless :).


Saturday, September 18, 2004

My usual sunday...

boo!

its sunday and i'm at school for a presentation for my automation class in masters... just finished class a while ago and i went up to meet up with my girl who happens to be an instructor there (so was i before)... well anyway, im quite happy that class is already ending.. the fact of having to go to school in the weekend after 5 days of straight work is bummer... i hope next time i'd at least get a day off... all the same, im quite used to the idea of going off somewhere everyday of the week... guess i have to go... its pretty hard to write anything especially if you know people might actually read it :)

My very first blog!

Everyone,

At last! got the time to register for a blog site... nothin much i can write right now.. quite funny actually cause im in the middle of a demo for an application i just worked on hehe... anyway, i figured the hell! I've been meaning to register a blog of my own, y not register one now.. well, at least that's one task done... laterz!