• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Daemon vs. Keychain
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Daemon vs. Keychain


  • Subject: Daemon vs. Keychain
  • From: Karl Moskowski <email@hidden>
  • Date: Fri, 28 Mar 2008 10:00:44 -0400

I'm building an app that uses a daemon to communicate with a server to do the heavy lifting. The GUI app is used to configure and control the daemon, and daemon's executable is built into the app's package. It's started by launchd with a plist in /Library/LaunchDaemons/.

The daemon needs a username and password to authenticate against the server. I've been able to send the credentials from the GUI app to the daemon using distributed notification. Since the daemon needs these credentials before any user is logged in, I store them in the System keychain (which is the default when using Keychain services from a launchd daemon). I also save the last-used username in the daemon's prefs plist, so that at next reboot, it knows which keychain item to retrieve.

When first storing an item, it works fine. Once the app is recompiled, though, the item can't be retrieved, presumably because the daemon executable's signature changed. If this was a GUI app, the Leopard would pop a dialog notifying the user of the change and asking for permission. However, since it's a daemon, no user interaction is allowed.

Is the System keychain an appropriate place to keep a daemon's credentials? If so, how can I get access to the item even after a new version of the daemon executable?

----
Karl Moskowski <email@hidden>
Voodoo Ergonomics Inc. <http://voodooergonomics.com/>

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Daemon vs. Keychain
      • From: "Kyle Sluder" <email@hidden>
  • Prev by Date: Re: PoseAsClass and NSColorWell (what Apple giveth, Apple taketh away...)
  • Next by Date: Re: Bitmaps and color shift
  • Previous by thread: Re: PoseAsClass and NSColorWell (what Apple giveth, Apple taketh away...)
  • Next by thread: Re: Daemon vs. Keychain
  • Index(es):
    • Date
    • Thread