Ok, so a project ends up defined different from my expectations and now I need to sync passwords between Active Directory and some external systems where one of the targets is an Oracle database. After a bit of thought, I decided that the best solution to this was to utilize our FIM R2 environment and implement the MS Password Change Notification Service (PCNS).
This solution is somewhat complicated by the fact that my Windows programming skills are a bit rusty; mostly ending at around MS Visual Studio 6 and prior to having to work with .Net. At the time, I worked with C/C++ in the Windows environment and C/C++ in several Unix environments as well. Most of my recent experience is Java. I decided early on that this solution should use C# to fit in with some existing integrations implemented originally by MS FIM consultants. The good news is that we had an appropriate version of Visual Studio available and installed where I could use it. The downside was that after our spring upgrade to FIM R2, I had not taken the time to setup Subversion source control integrations in Visual Studio.
So before starting any development work; I wanted to make sure I could version control the new stuff. I had an existing repository for the existing integrations which was good. I couldn't remember which Subversion Visual Studio integration we used originally but I knew I didn't want to try and use anything requiring a purchase or a license incompatible with our needs. I ended up using AnkhSVN (which was probably what I did in our original FIM environment). It was an easy install and compatible license wise.
With my source control prerequisite out of the way; I took a look at some coding resources that a co-worker had found. One of the resources had some notes, documentation and a code sample/template (found here). This looked pretty straight forward; so I jumped into the work.
First I needed to create a solution/project; I needed a DLL in this case which is one of the types available. I renamed the initial c# source file I created to match my intent a bit more. I was able to add the solution to Subversion pretty easily and tested the check-in of changes in the project to verify it was working ok. Next, I copied in the template code and then started modifying to our needs. Some changes I had to make involved externalizing the DB connection info. I was able to pull some code from a different integration which accessed an XML configuration file for some settings. I was then able to copy and modify that code to access more appropriate tags containing my DB connection info. After making a quick copy of the XML configuration file from the other integration and tweaking it to match the expected tag names and connection info; my configuration needs were pretty much done. After this; I updated the SQL statement per our environment needs.
At this point; the code was in place but it was not able to compile. I still had to add some missing assembly references. Fortunately, with a little trial and error I was able to identify the required assemblies and they were visible in the dialog so I didn't have to go researching where to acquire them or register them, etc.
Once I got it compiling; there were 2 other items which I identified as needing attention. I needed to update the project to produce a 64bit artifact and I needed to set the .Net framework to 4.0 to match the existing FIM integrations.
At this point; I had what was a clean but untested build. I did not have any type of test harness for this so a couple of co-workers setup the AD side of things and performed the FIM side setup which required this DLL. You have to make sure the DLL is in a particular location for it to be visible in the FIM configuration screen.
Anyways, to make a long story shorter.. after a couple false starts in the FIM/PCNS setup we finally had all the pieces in place and were able to see it work. A test utility which made password changes against AD was used and we were able to see the effect of the password changes in the destination DB.
There are still some test cases we need to verify because of user on-boarding workflow but the technology is working as expected. Next, we have some ERP systems to update as well and the basic PCNS work will support that as well. We will be working these solutions through our test environment on their way to production which should be in the next 4-5 months.
I do have a few final thoughts on this part of the project. I am very happy that the technology is working for us. I do wish that I had a good method for out-of-system testing - hopefully time will permits it as we continue through our test/release process. As in Java, there are a number of logging libraries for .Net from what I can tell. In this project, I ended up with the same logging setup as used by our other integrations but the use and setup was not documented [anywhere I have found] by our past consultants. I feel a bit like I bumbled along with some of this work. Since we are likely to continue investing in FIM, I'll probably purchase some C#/.Net related books so I can feel a little more comfortable with those technologies.
[Update 2014/12/05] We started to set this up in our test environment but ran into issues. As it turns out, there are some patch level differences between our FIM environments. It looks like we need to
update out environments to at least the minimum level of our dev environment which appears to be a unreleased private build from Microsoft. I suspect our MS guy had used a version available to him which fixed an issue at the time we were working on some other stuff. We have yet to push some new stuff through the test environment and into prod so we hadn't noticed the difference until now. There are a few recent public patches so we will likely level-set ourselves to one of those in dev and retest before moving the FIM updates to test and prod. Wasn't planning on this - never a dull moment.
No comments:
Post a Comment