Article View: comp.sys.ibm.as400.misc
Article #46Re: Java for OS/390 SAF Interface help. What exactly are resourceType and resourceName?
From: GoHabsGo
Date: Thu, 03 Apr 2003 21:04
Date: Thu, 03 Apr 2003 21:04
69 lines
4036 bytes
4036 bytes
seamonster76@yahoo.com (Andy Lai) wrote in
news:d2e7d2dd.0304031155.e2ec215@posting.google.com:
> GoHabsGo <gohabsgoNOSPAM@hotPOP.com> wrote in message
> news:<Xns93526CE12E65Bgohabsgohotpopdotcom@130.133.1.4>...
>> seamonster76@yahoo.com (Andy Lai) wrote in
>> news:d2e7d2dd.0304021634.2b28c92
>> > Do anyone know anything more about the Java SAF Apis? Any help is
>> > appreciated.
>>
>> I do have a Java RMI application running on that is used to
>> authenticate users and groups against our RACF database before
>> allowing them to run applications.
>>
>> Do you have a specific question? Maybe I can help.
>
> What is the relationship between SAF and RACF?
I can't remember what the acronym SAF stands for, but I think it is used as
a generic name for Security Access Facility? In other words, it is a
specified format that security calls are done to the security product
whether it be RACF, CA-TopSecret or CA-ACF2.
> My application wants to make sure an user has read privilege before
> reading a file on OS/390 from HFS or USS. And I learned SAF from the
> IBM OS/390 java support website but I'm not sure how to use them.
> Can you provide some simple code sample how to check user privileges
> for file reading/writing?
There's a pretty good explanation of the java security classes in the 'Java
Programming Guide for OS/390' redbook - sc24-5619-00.
There's some examples there, even one to check a user's access to a
resource:
PlatformReturned pr = PlatformAccessControl.checkPermission("FACILITY",
"BPX.SERVER", PlatformAccessLevel.READ);
Here you're checking the current user - you would first need to do the
PlatformUser call with userid/password, so it knows who to check the
permission for. I've not tested this, but that is my understanding of how
it would work. We only use it for authenticating that users have access to
a particular application by checking the PlatformUser.isUserInGroup method.
The user is not accessing resources on OS/390, but rather on some other
unix servers, but the authentication is verified centrally against RACF.
In the example here, I assume the "FACILITY" is a "resource type" and
"BPX.SERVER" would be a "resource name".
PlatformReturned pr = PlatformAccessControl.checkPermission("FACILITY",
"BPX.SERVER", PlatformAccessLevel.READ);
to check a dataset, I think it would look something like this:
PlatformReturned pr = PlatformAccessControl.checkPermission("DATASET",
"YOUR.SECURED.DATASET.NAME", PlatformAccessLevel.READ);
* I have not tested the dataset name resource checking - so the literal
"DATASET" may or may not be correct. Try a google search for
PlatformAccessControl and see if you find anything!
Good Luck,
Larry
Technical Details
Message-ID:
<Xns9352A37E6F15Dgohabsgohotpopdotcom@130.133.1.4>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!fu-berlin.de!uni-berlin.de!169.6.33.34!not-for-mailReferences:
<d2e7d2dd.0304021634.2b28c92@posting.google.com> <Xns93526CE12E65Bgohabsgohotpopdotcom@130.133.1.4> <d2e7d2dd.0304031155.e2ec215@posting.google.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fd4af,add1b634d4551f38 X-Google-Attributes: gidfd4af,public X-Google-Thread: 10a146,add1b634d4551f38 X-Google-Attributes: gid10a146,public X-Google-Thread: 10d15b,add1b634d4551f38 X-Google-Attributes: gid10d15b,public X-Google-Thread: 1077ec,add1b634d4551f38 X-Google-Attributes: gid1077ec,public X-Google-ArrivalTime: 2003-04-03 13:34:19 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!fu-berlin.de!uni-berlin.de!169.6.33.34!not-for-mail From: GoHabsGo <gohabsgoNOSPAM@hotPOP.com> Newsgroups: comp.sys.ibm.as400.misc,comp.lang.java.programmer,comp.lang.cobol,bit.listserv.ibm-main Subject: Re: Java for OS/390 SAF Interface help. What exactly are resourceType and resourceName? Followup-To: bit.listserv.ibm-main Date: 3 Apr 2003 21:04:29 GMT Organization: No Lines: 69 Message-ID: <Xns9352A37E6F15Dgohabsgohotpopdotcom@130.133.1.4> References: <d2e7d2dd.0304021634.2b28c92@posting.google.com> <Xns93526CE12E65Bgohabsgohotpopdotcom@130.133.1.4> <d2e7d2dd.0304031155.e2ec215@posting.google.com> NNTP-Posting-Host: 169.6.33.34 X-Trace: fu-berlin.de 1049403869 6032239 169.6.33.34 (16 [143584]) User-Agent: Xnews/4.11.09