# RE: Request for 1.2 Feature

jgindin@walldata.com
Fri, 16 Jan 1998 08:06:47 -0800

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: David Brownell: "RE: Request for 1.2 Feature"
- Previous message: Dan Brown: "web page not available?"

    From: jgindin@walldata.com

    Message-Id: <199801161604.IAA18915@java1.javasoft.com>

    To: gong@games.eng.sun.com, jgindin@walldata.com

    Subject: RE: Request for 1.2 Feature

    Date: Fri, 16 Jan 1998 08:06:47 -0800

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------ =_NextPart_000_01BD2255.D70C3D30
Content-Type: text/plain;
charset="iso-8859-1"

The problem, in a nutshell, is that I cannot trust the caller of a
method to honestly tell the called method who he is. I'm particularly
interested in being able to determine if the caller implements a
particular interface, ISecureObject. If I (the called method) know that
the caller implements that interface, then I can interrogate the caller
for authentication information (i.e., calling a method like
ISecureObject.getCertificate()). At that point, I know that I'm getting
the real information about the real caller.

If I understand your alternative solution below correctly, it does not
solve this problem--A still has to either create an instance or obtain
an instance of C. In either case, there's still the possibility that A
could lie about it's identity. For example, if A has to create an
instance of C, passing in an ISecureObject to the constructor, there's
no guarantee that A will pass itself in! (Let's assume that A is not
trusted to call one or more methods on B.) A could pass in some other
object, which is (for the purposes of this discussion) trusted, and so A
now has an instance of C, through which it can gain access to B. A
could do a similar maneuver if it instead had to call an API to get an
instance of C.

Please let me know if this helps your understanding of the problem.
I'll gladly try to expand more if necessary.

Jay Gindin

-----Original Message-----
From: Li Gong [mailto:gong@games.Eng.Sun.COM]
Sent: Thursday, January 15, 1998 11:35 PM
To: jgindin@walldata.com
Cc: java-security@web1.javasoft.com
Subject: Re: Request for 1.2 Feature

Jay,

I understand the requested feature but do not understand fully the
problem you are trying to solve. Could you let us know the scenario
of the application so we can see what is the best way to address your
concern? More specifically, why it matters to you if the caller is a
particular type? What are you trying to determine here about the
caller? What about alternative solutions?

For example, suppose you want to have A call B but have B check if A
is an instance of X. You can do this by constructing a new class C
and have a method C.invokeB(A) -- you invoke the appropriate method on
B via C but passing A through as the real invoker.

B can now check if A is of the right instance. If so, B then does
whatever it needs to do. If B needs to return data Y to A, just add a
method A.getResult() and have B invokes it -- A.getResult(Y).

You may think C could lie, but there are ways to get that fixed. This
just shows there might be other ways to do something, so we may want
to figure out more back ground before committing to a feature.

Thanks.

Li
--

jgindin@walldata.com writes:
> I need to be able to dynamically determine the caller of a particular
> method. I only want to allow objects that implement a particular
> interface to call the method--if anyone else calls the method, I want
to
> be able to throw an exception. The code would look something like
this:
>
> public void foo() throws UnauthorizedCallerException
> {
> Object caller = someSecurityApiToGetTheCaller();
> if ( caller instanceof ISecureObject ) {
> // Do work
> }
> else {
> throw new UnauthorizedCallerException();
> }
> }
>
> I understand that the code that wants to call the
> someSecurityApiToGetTheCaller() method may need to have privileges (as
> defined in the 1.2 security documents), and that is perfectly
acceptable
> (probably even desirable!).
>
> There is an allusion to this sort of ability on 32 of the "Java
Security
> Architecture (JDK 1.2)" document, revision 0.7, dated October 1, 1997.
>
> I appreciate any help you are able to offer.
>
> Jay R. Gindin
>
> -----------------------------
> Jay R. Gindin | This
> Senior Product Developer | space
> Wall Data Incorporated | for
> jgindin@walldata.com | rent!
>
>
>

------ =_NextPart_000_01BD2255.D70C3D30
Content-Type: application/ms-tnef
Content-Transfer-Encoding: base64

eJ8+IjQQAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy
b3NvZnQgTWFpbC5Ob3RlADEIAQSAAQAcAAAAUkU6IFJlcXVlc3QgZm9yIDEuMiBGZWF0dXJlAN4I
AQmAAQAhAAAAODQzMkI4MUU3NDhDRDExMTgzNTYwMDYwQjBBMTJEQTAA5QYBIIADAA4AAADOBwEA
EAAIAAcAMAAFACoBAQWAAwAOAAAAzgcBABAACAAGAC8ABQAoAQENgAQAAgAAAAIAAgABA5AGAKgO
AAAvAAAACwACAAEAAAALACsAAAAAAAMALgAAAAAAQAA5ABCW876YIr0BH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AAVAAAAAAAAADcp0DIwEIQGrS5CAArL+GCAQAAAAYAAAAvTz1XQUxMREFUQS9PVT1FWEhR
MDEvQ049TVNNQUlMVVNFUlMvQ049SkdJTkRJTjhDOUM3RUNDAB4A+D8BAAAAFgAAAEdpbmRpbiwg
SmF5IChNUyBNYWlsKQAAAB4AOEABAAAAEAAAAEpHSU5ESU44QzlDN0VDQwACAfs/AQAAAFQAAAAA
AAAA3KdAyMBCEBq0uQgAKy/hggEAAAAGAAAAL089V0FMTERBVEEvT1U9RVhIUTAxL0NOPU1TTUFJ
TFVTRVJTL0NOPUpHSU5ESU44QzlDN0VDQwAeAPo/AQAAABYAAABHaW5kaW4sIEpheSAoTVMgTWFp
bCkAAAAeADlAAQAAABAAAABKR0lORElOOEM5QzdFQ0MAQAAHMADWy/SWIr0BQAAIMPopdOOYIr0B
HgA9AAEAAAAFAAAAUkU6IAAAAAAeAB0OAQAAABgAAABSZXF1ZXN0IGZvciAxLjIgRmVhdHVyZQAL
ACkAAAAAAAsAIwAAAAAAAwAGEPt+TNMDAAcQxAsAAAMAEBAAAAAAAwAREAQAAAAeAAgQAQAAAGUA
AABUSEVQUk9CTEVNLElOQU5VVFNIRUxMLElTVEhBVElDQU5OT1RUUlVTVFRIRUNBTExFUk9GQU1F
VEhPRFRPSE9ORVNUTFlURUxMVEhFQ0FMTEVETUVUSE9EV0hPSEVJU0lNUEFSAAAAAKx5

------ =_NextPart_000_01BD2255.D70C3D30--

- Next message: David Brownell: "RE: Request for 1.2 Feature"
- Previous message: Dan Brown: "web page not available?"