Open main menu

CDOT Wiki β

OS X Keychain integration

Revision as of 19:23, 21 October 2006 by Pcvitori (talk | contribs) (Project News)

Project Name

OS X Keychain

Project Description

The goal of this project is to enable Firefox to use the Keychain service available in Mac OS X in order to store saved passwords for consistency and ease of use.

Related links:

Keychain Services Reference
Mac OS X Security
BugZilla Reference
http://wiki.mozilla.org/Firefox:Password_Manager

Project Leader(s)

Project Contributor(s)

N/A

Project Details

How to approach the problem:
  1. Analyze the existing code for Keychain support in the Camino browser.
  2. Review the existing Keychain support code in the Firefox codebase which was originally added by Apple.
  3. Understand how wallet works and how passwords are stored in Firefox. Thereby learning how to interject our Keychain piece in the middle.
  4. Clarify our objective in terms of what our main focus will be in this project. ie (Full keychain support w/o wallet, keychain support + wallet at its side, etc...)

Project News

  • September 16, 2006 - Dave is looking into getting Mac hardware access for this, and should know soon. Also, you want to ping mento for this, not stuart. mento is in #seneca.
I have tried to contact stuart on irc who idles both #seneca and #camino. I think he will be the go to guy if we have any questions in regards to OS X related Mozilla stuff. He should be able to point us to the right direction.
  • September 22, 2006 - Moe and Phil ventured through the firefox code and found some implementations of the osx keychain that were disabled. We enabled those options and Moe will recompile the code over night so we can further our tests tomorrow.
  • September 23, 2006 - Moe tested his newly built firefox with the osx options enabled, but nothing happened. Both Phil and Moe then continued to look through the firefox code and located various instances of logic towards Apple's keychain.
  • September 30, 2006 - We have been informed by one of the Camino team members that they are no longer supporting keychain manager in their next version of Camino. As far as this project is concerned we have decided to also follow their move into avoiding the keychain manager and use keychain service calls for our purpose.
42 rememberButtonText = &Remember
43 notNowButtonText = &Not Now
44 neverForSiteButtonText = Ne&ver for This Site
  • October 7th, 2006 - Moe and Phil ventured through the nsPasswordManager.cpp file and tried to decipher its contents. We then began setting up our svn that Andrew created for us.
  • October 14th, 2006 - We located an application (http://homepage.mac.com/agerson/examples/keychain/) today that utilizes the various features of Apple’s keychain API. This application allowed us to understand how the API works, even though it’s coded in objective-c. We then created a branch of our Mozilla 1.5.0.7 trunk and created our keychain integration files.
  • Keychain.cpp
  • Keychain.h
Let the coding begin!
  • October 21st, 2006 - We began writing simple code to create and retrieve keychain items. Before we implement test code into our Firefox build, we decided to create the C files on there own first, then integrate later. Our main goals today are:
  1. Create keychain items
  2. Retrieve keychain items
  3. Output to standard output.
Bug Fix: That application we found contained a bug that would prevent it from saving the keychain item description to Apple's keychain. Using our newbie objective-c skills, we located and fixed the problem.

MOE TODO: Get the code from the application we fixed and paste it here. Remember to use pre tags. :)

  • We added the method createKeychainItem(), which creates a keychain item based on the passed in parameters.
  • Began writing logic to retrieve the username and password in the keychain item.