Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: user authentication?



Mike Hall <email@hidden> wrote:

>> I've looked but couldn't find any java libraries (apple custom
>> libraries?) that would provide for an authentication box.
>
>How about keychain, since I set that up it asks me for password from
>time to time including for my user. Which is admin although I'm not
>sure thats why it's asking. And I haven't looked at a API.

The Keychain will ask you for passwords when it's needed to access the
secrets held in the Keychain. But that's just the Keychain asking, and has
nothing to do with granting an effective user-ID of root. Even if the
login is the same, getting access to the Keychain does not give you access
to root privileges.

The problem is not merely the ability to present an authentication dialog,
which could trivially be done in pure Java, but to obtain the
system-restricted access to root privileges. It's the actual powers that
matter, not the dialog.


By the way, if you can manage to create a setuid-root executable, then my
open source Easy Posix Toolkit provides a means to manage the real and
effective user and group IDs for Java programs:
<http://www.amug.org/~glguerin/sw/#easyposix>

However, there are grave security concerns with running a GUI program or a
Java program as setuid-root. One of them for GUIs is the fact that setuid
affects the entire process, not just a thread. One of them for Java is
susceptibility to JAR replacement (man-in-the-middle-of-the-classpath).

Some of the general issues are covered in "Performing Privileged Operations
With Authorization Services":

<http://developer.apple.com/techpubs/macosx/CoreTechnologies/securityservices/authorizationservices/authorization_concepts/authorizationconcepts.pdf>

-- GG
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.