AD Group Membership with User From Domain Outside of Forest

Here's one to twist your brain around -
I have kerberos authentication using Active Directory working between a client's web browser and my web-app hosted in JBoss. I also have limited authorization working by checking group memberships using LDAP. This currently only works if all users are in the same domain. The ever-helpful adler_steven has detailed in another thread (http://forum.java.sun.com/thread.jspa?threadID=603815&tstart=15) how to do a group membership check for all Users/Groups in a single forest using the Global Context.
I need to go beyond the domain and even beyond the forest and try to authorize a user from a trusted domain by checking if the user is a member of a group in my domain. Authentication works fine using kerberos. It's the authorization by group check I am having trouble with. I believe there are two ways to approach this:
Approach #1
Access the MS-specific PAC in the kerberos token from the client to get the group SIDs. The structure of the PAC is nicely defined in this article: http://appliedcrypto.com/spnego/pac/ms_kerberos_pac.html. However, I have no idea how to access the decrypted token. I pass the encrypted token that I receive from the browser to myGssContext.acceptSecContext(...) to complete the authentication.
Question: Does anyone know how to get the decrypted kerberos ticket from there, specifically the authorization-data field?
Approach #2
Try to walk through the Active Directory structures in both domains using LDAP. In the domain group that I am checking, I can see a member attribute that references a foreignSecurityPrincipal object. The CN of this object happens to be the objectSID of the user I am looking for in the remote domain. Unfortunately, I have to check the remote domain server directly to verify that. The foreignSecurityPrincipal object itself does not contain any hint about what user it refers to aside from the SID (no originalDomainName attribute or something similar). It is feasible that I could walk the chain of references back to the remote domain AD server. That would require that my configuration include a list of remote domain servers to check (since I could have users from multiple trusted domains) and that my JBoss server have access to those servers.
Question: Does anyone know of some other LDAP-related way of finding information about a user from a remote, trusted domain without having to hit the server for that domain directly?
adTHANKSvance
Eric

You should be able to work back from the foreignSecurityPrincipal object :-) He says with a wry smile..
This post prompts me to think whether one day someone will draw the entity relationship diagram for AD. Oh well, I've been procrastinating for years, a few more won't hurt !
If it was a user from within the same forest, you should just be able to perform a search against a GC using the objectSID as the search filter. I've forgotten, but I don't think they will be represented as foreign security principals.
Have a look at the post titled JNDI, Active Directory and SID's (Security Identifiers) available at
http://forum.java.sun.com/thread.jspa?threadID=585031&tstart=150 that describes how to search for an object based on their SID.
Now if it is a user from another forest, with which you have a trust relationship, then we begin the navigation excercise.
You'll need obtain the user's SID (either from the cn or from the objectSID attributes) from the foreignSecurityPrincipal object. For example CN=S-1-5-21-3771862615-1804478405-1612909269-2143,CN=ForeignSecurityPrincipals,DC=antipodes,DC=com
objectSID=S-S-1-5-21-3771862615-1804478405-1612909269-2143Then obtain the domain RID, eg.S-1-5-21-3771862615-1804478405-1612909269Next you will have to recurse each of the crossRef objects in the Partitions container, in the configuration naming context (which you will find listed in the RootDSE). The crossref objects that represent trusted domains or forests will have values for their trustParent attributes. A sample query would be something like//specify the LDAP search filter
String searchFilter = "(&(objectClass=crossRef)(trustParent=*))";
//Specify the Base for the search
String searchBase = "CN=Partitions,CN=Configuration,DC=antipodes,DC=com";For each crossRef object, you can then use the dnsRoot attribute to determine the dns domain name of the forest/domain (if you want to later use dns to search for the dns name,ip address of the domain controllers in the trusted domains/forests), and then use the nCName attribute to determine the distinguished name of the trusted forest/domain.dnsRoot = contoso.com
ncName = dc=contoso,dc=comPerform another bind to the ncName for the trusted domain/forest and retrieve the objectSID attribute, which will be the domain's RID. You may want to cache this information as a lookup table to match domain RID's with domain distingusihed names and dns names.String ldapURL = "ldap://contoso.com:389";
Attributes attrs = ctx.getAttributes("dc=contoso,dc=com");
System.out.println("Domain SID: " + attrs.get("objectSID").get());Once you find out which domain matches the RID for the foreignSecurityPrincipal, you can then perform a search for the "real user" .And then finally you should have the user object that represents the foreign security principal !
Just one thing to note. Assume that CONTOSO and ANTIPODES are two separate forests. If you bind as CONTOSO\cdarwin against the CONTOSO domain, the tokenGroups attribute (which represents teh process token) will contain all of the group memberships of Charles Darwin in the CONTOSO domain/forest. It will not contain his memberships if any, of groups in the ANTIPODES forest. If Charles Darwin accesses a resource in ANTIPODES, then his process token used by the ANTIPODES resource will be updated with his group memberships of the ANTIPODES forest. Also you can have "orphaned foreignn security principal", where the original user object has been deleted !
BTW, If I was doing this purely on Windows, IIRC, you just use one API call DsCrackNames, to get the "real user", and then the appropriate ImpersonateUser calls to update the process token etc..
Good luck.

Similar Messages

  • How to add user from domain A to a group in domain B

    How would you acheive adding a user from domain A to a group that is in domain B via powershell without the Quest cmdlets? I've been trying to figure this out for about a week now. Please let me know if the scripting guy has seen this issue before.
    LittleTech

    Hello jrv,
    Here's what i was trying to do. The two domains im working with have a trust between them.
    1. Create a user in External.Domain.Com
    2. Add the user in External.Domain.Com to GroupOne in ExternalDomain2.Domain.com
    3. The only knowledge that ExternalDomain2.Domain.Com would have about the account in External.Domain.Com is whatever is in the Global Catalog. Here is what im trying, but it isn't working.
    #Connecting to domain PSDrive
    New-PSDrive
    -Name
    ExternalDomain
    -PSProvider
    ActiveDirectory
    -Root
    -Server
    DC01.Domain.com
    cd
    ExternalDomain:
    #Create user
    #Add to ExternalDomain Groups
    $UserDN=Get-ADUser-LDAPFilter"(sAMAccountName=$UserID)"
    #Connecting to domain2 PSDrive 
    cd
    AD:
    $GroupDN="CN=Wireless
    Device Users,OU=Wireless,OU=Systems and Technology,DC=External,DC=Domain2,DC=Com"
    Add-ADGroupMember-Identity$GroupDN-Members(Get-ADObject-Identity$UserDN.DistinguishedName
    -Server"DC01.Domain.com:3268")
    Connecting via port 3268 allows me to talk to the global catalog instead of LDAP.
    I receive the following message: A Referral was returned from the server
    I know that if i connect using [ADSI] i am able to specify that the connection follows referrals, the AD cmdlets seem to not have that function. The Quest AD cmdlets do... I just dont want to have to use third party cmdlets to do what the AD cmdlets should
    be able to do in the first place.
    THanks,
    LittleTech

  • AD Resource forest access with user from different forest

    I am trying to access a AD resource forest using a user from a different forest.
    The "different forest" is the main forest used to contain all user accounts etc. This domain is trusted by the resource forest (which contains things like outlook distribution lists etc) and so I am able to log into the resource forest (using ldp.exe or the mmc ad snap-ins) with my credentials from the main forest.
    How can I replicate this in java?
    I can connect directly to the user forest with simple authentication. But I can't do the same with the resource forest (as the user does not exist on it - it is merely trusted). Is there an authentication method that will allow me to do this?
    In this organisation user accounts for the resource forest are not given out - you have to use one from the main user forest. So I have to find a work-around where I can connect with my current credentials.
    Any ideas anyone?

    Devid,
    I am facing the same problem.
    Did you get the solutions.
    I am getting exception while calling "InitialDirContext"
    "Problem searching directory: javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C090334, comment: AcceptSecurityContext error, data 525, vece"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Using LDAP group to autenticate users from inside network to Internet

    Hi team, I got an asa 5510 version 7.2.3 and i need to autenticate my users from inside network to internet using a security group in the Active Directory, anyone can help me with these?

    This might not be complete for your needs but it may give you enough of what you need without having to purchase full url filtering etc.
    Authenticate with LDAP as shown earlier in this thread, then use this aaa ldap with cut-through proxy -
    PIX/ASA : Cut-through Proxy for Network Access using TACACS+ and RADIUS Server Configuration Example
    http://www.cisco.com/en/US/products/hw/vpndevc/ps2030/products_configuration_example09186a00807349e7.shtml
    then do some filtering -
    ASA/PIX 8.x: Block Certain Websites (URLs) Using Regular Expressions With MPF Configuration Example
    http://www.cisco.com/en/US/products/ps6120/products_configuration_example09186a0080940e04.shtml

  • Copy few test assignment with User from one database instance to another

    Hi,
    I have OTL ,Payroll and HRMS system. I want to Copy few test assignment with User(Few FND Users) from one database instance to another .
    Source: DEV Instance
    OTL users to enter their Time sheet
    OTL is intergated with HRMS to pickup Employee information
    Existing business users are integrated with Employee assignment etc tables to pickup person_id
    Target: Want to copy few test OTL users from ONE instance to another. Bringing FND_User is easy but EMPLOYEE_ID, PERSON_PART_ID will not come during FNDLOADER .
    How to bring all information from one instance to another instance? Please advice.
    thanks .

    Dear,
       Try using HRMS configuration workbench. For this you might require support from your DBA for configuring the same. Once configured, you can move the items you want.
    Regards,
    Kathan

  • Windows server domain group membership with functional level 2003 - windows API

    Hello,
    I am a programmer trying to get members of a global domain group using windows server 2008 enterprise edition,
    in the past there wasn't a functional level 2003 on windows server, but when 2003 functional level appeared a new features were added like adding 
    a global group as a member to another global group in the domain, 
    in the past the API written could get the members if the member was a user, but it can't get a member if it was a global group.
    I am using this API "NetGroupGetUsers" to get a members of a global domain group, and it gets the users but it doesn't get the
    members if they were global groups...
    I tried another API "NetLocalGroupGetMembers" it is getting a global group as a member but it is working only if the owner group was a local group on the server 
    or on another machine that is added to the server, but this API doesn't work if the owner group was a domain global group.
    My question is how to get members of a global group including the members that are global groups too???
    Thanks,
    - Shomaf

    > I am using this API "NetGroupGetUsers" to get a members of a global
    This interface is based on Win 2000, and since Win 2000 did not support
    global group nesting, this interface does not, too...
    > domain group, and it gets the users but it doesn't get the
    > members if they were global groups...
    You should use
    http://msdn.microsoft.com/library/aa706032.aspx - and
    don't forget to track down the nestings :)
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • Group membership for users is not reflected at the client until full reboot

    Ok, so I am new to this:
    So I created two groups on the server g1 and g2. Created two server users u1 and u1. I have one client with three accounts: System Admin, u1 and u1.
    On the server:
    g1 has one member u1
    g2 has one member u2
    When I swap the membership on the server using Server pref. or Workgroup manager, the users on the client still have access to their original group.
    I tried logging everyone out of the client. I does not work.
    The only way is to reboot the client completely. However, sometimes when I change the membership it does get reflected on the client. Any ideas?
    Equipment:
    One (1) Mac Mini Server 10.6.3, clean install. (defaults to OD)
    One (1) MacBook Pro 17" , 10.6.4
    Is there a way to push?

    Answer!
    UAC (User Account Control) must be set to OFF to disable this message.
    Another error message that really has nothing to do with what's really happening!
    Ugh.

  • Group Membership in User Record

    Problem
    I am trying to figure out how to add a field for users that lists the groups the user belongs too.
    This is for a firewall login situation that expects the AD memberOf attribute for a user.
    I would like the field to auto update when a user is added or removed from a group, but I don't think this is possible.
    *Current Method*
    I am currently trying to modify the apple schema, but am having difficulty because most examples are for an offline or new system. One method that almost worked wiped the entire /etc/openldap/slapd.d/ directory and then did slaptest -v -d 68 -f /etc/openldap/slapd.conf -F /etc/openldap. I tried this, and ldap looses all the stored data(I saved a copy first).
    I also tried to edit the apple schema ldiff file directly. I added member to the apple-user MAY ( ... $ member ) section, but that did not give me an allowable field in Work Group Manager under the User tab. This didn't exactly work either, although I did see the addition in the inspector schema{7}. This was rather exciting, but it didn't enable the member field. Member should be a posix attribute... but I could be totally confused at how the objects work.
    The end result needs to be a list of groups in a field like Member or memberOf for each user. I can enter the groups in by hand, but would rather not since apple should be able to do this for me(wink*).
    *Various Commands*
    - launchctl load /System/Library/LaunchDaemons/org.openldap.slapd.plist
    - slaptest -v -d 68 -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d
    - /usr/libexec/slapd -d 99 2> ~/slapdump
    Questions
    - What is the best way to solve this problem in OSX?
    - How can I safely change a schema for the master with a master replica setup?
    - Can Work Group Manager update the schema without giving an error?
    - Once I have the field, how to keep it up to date with the groups?

    You are correct. Each resource has its own Revoke task.
    Consider this simple scenario for an individual resource:
    1. The user select to Revoke the provisioned account.
    2. The revoke process task de-provisions the resource
    3. The Revoke process task resets the flag in the Xellerate User record.
    4 The Resource status is set to Revoked.
    5. The Access Policy Revoke calls the Undo Task for Create user, which is step 1. (This is where I believe the problem starts, since it is already Revoked)
    I would like to figure out how to create this process flow:
    1. The user selects to Revoke the provisioned account.
    2. The Revoke Process Task reset the flag in the Xellerate User record.
    3. The Access Policy Revoke calls the Undo Task for Create user (Which would be a different Process Task than step 1)
    4 The AP Revoke Process task de-provisions the resource
    5. The Resource Status is set to Revoked
    6. Process Complete

  • How to get list of groups and the users from OID

    Hi,
    Can someone please tell me how to get the list of GROUPS and all the USERS in each group in OID using Java. Need to recursively get all the Groups and Users in each group using Java any samples.
    Thanks

    use examples from OTN like
    http://www.oracle.com/technology/sample_code/products/jdev/readmes/samples/ldapdatacontrol/ldapapplication/src/dc/ldap/model/LDAPSearch.java
    and modify it to your needs
    Bernhard

  • New Group Membership for users

    Hello All,
    Is there a way to add members based on their employee type to a new group without writing a program??
    For ex: if employee type is Part-Time, then add to a Part-time group in OIM.
    We need to do this for new users and also for existing users.
    We have the code to do this task, but I want to make sure if we can do it via configuration in OIM admin console or design console.
    Thanks u ll in advance.
    Regards,
    ~VSN

    If this is just OIM Groups we are talking about then why reach up to the Access Policies
    - Create membership rules via Design Console -> Rule Designer as follows:
    - Name=Sample Membership, Type=General, Description=Sample
    Role == Part-Time
    - Go to your group in OIM and add this to Membership Rules drop-down
    For existing users, do it though a scheduler and use the same Java code which you have currently in place

  • Updating repository with users from website

    Hi,
    I am currently testing portal-to-go, and it seems to me that i cannot seem to convert a site from html to wml/voxml/etc without making it a service. This means that everytime some wants to view a site designed in portal-to-go, they ABSOLUTELY HAVE to be an authorized user, who can then access the services, even if all a want them to do is see a simple front page. Also, there doesnt seem to be any automated way for users THEMSELVES to sign up for services from the personalization portal. In other words, there isnt any way for users to add themselves to the repository with the services they want. I know Oracle mobile does this, and i assume they are using the provisioning adapter or loadxml utility for this, but i have no clue as to HOW, since the documentation for it ***** ass. Could someone please tell me if my assumptions are accurate, and if so, does anyone know how to use the provisioning adapter to dynamically update the repository from the USER level?

    Thanks Saritha for your input again. I think you are right about selecting multiple reports and choose Refersh Option. I guess I can do that in CMC but there got to be other setting also available. Life will be hard if Repository objects doesn't get updated automatically as it suppose to be. This means everytime my company wants to change logo color or change in address then I have to manually update the refresh option in CMC and live with it.
    However, I will take Saritha advice as my solution for now.
    Experts - please advice other setting if available.
    thanks,
    Edited by: visit2me on Feb 29, 2012 8:27 PM
    Edited by: visit2me on Feb 29, 2012 8:56 PM

  • How to group artwork with songs from the same album in itunes

    After you import a CD, how do you link all the tracks so they fall under the same artwork instead of having the same artwork for every track?

    not sure if windows pane is same as OSX, but if open menubar>file>info, click on info tab, you should be able to set track order from there.
    d

  • How to enable security with users from an LDAP server

    Hello all
    My company is using a 10.1.3 Oracle LDAP server and I would like to authenticate users of my application against it.
    Can anyone point to the correct documentation?
    Thanks in advance
    Thanassis

    Thanks for your reply
    I 've gone through "Introduction to ADF Security in JDeveloper 10.1.3.2" and also Chapter 30 of "Application Development Framework Developer's Guide For Forms/4GL Developers"
    There still one thing I cannot understand : Where do I define the mapping between LDAP users and security roles?
    THanassis

  • Can OS X 10.9 Authenticate An Active Directory User From A Different Trusted Forest

    I am able to authenticate with an AD account from a different trusted domain in the same forest as the domain the client is bound to on OS X 10.9. An AD account from a trusted domain in a separate forest cannot authenticate on the same client. The same AD account from the same external trusted domain in the same external forest can authenticate to a Windows 7 client bound to the same domain as the Mac client. It seems that OS X is incapable of cross forest authentication. It seems as though the directory services search path only includes the forest of the domain the client is bound to. Windows clients seem to be able to handle the referral process to a different forest, but a Mac client does not. Am I correct in this assumption? Has anyone accomplished cross forest authentication on an OS X client? If so, how? If not, what is the reason this can't be done?

    Well, I’ve made some encouraging progress.
    I’ve managed to log on!
    I deleted /var/db/.AppleSetupDone while booted into the recovery volume. I then created a new local admin user and, after a much longer than usual delay, got through the account creation stuff and arrived at last in the Finder, which was sluggish as heck.
    Checked user accounts, and according to system prefs they’re all there. Fired up Activity monitor and found that opendirectoryd was consuming 365%-405% CPU.
    I unbound the system from our Active Directory domain, not really expecting it to work but it did. cpu load dropped to nothing.
    I rebooted, was able to log in as the original local admin user (woohoo! Progress!)
    Re-bound it to AD and boom CPU shot right back up.
    I unbound it again and am currently backing up the drive with CCC (conversation with professor yesterday “Time Machine? What’s Time Machine?”)
    If CCC dies, I’ll run DW on the original, but I’m now pretty sure my issue is a borked opendirectory database.
    Plan going forward:
    I’ll nuke&pave the iMac, restore the apps, but NOT users and computer settings from the CCC during the re-install, create a new local admin, re-bind to AD see what happens.
    If it doesn’t go nutz again, I’ll have him log on so it creates the local directory, copy over his original user directory from the backup drive, make it his actual home on the disk again and in theory he should be ok.
    It’s amazing how often just laying my problem out in public makes my brain think of new things to try :-)
    I don't know if this is directly applicable to an OpenDirectory-bound system rather than Active Directory, but it might work for you.

  • Integration of ACS with two different Domain in different forest

    Hi
    We have two Domain Controllers in two different forests. One forest is X.IN and other is Y. In X.IN forest we have a tree called PPP.IN.
    Is it possible to integrate ACS with both PPP.IN and Y? Please confirm ASAP.
    Thanks
    Ritesh

    It is possible in ACS 4.2 to do machine and user authentication over cross forest trusts. See Resolved Caveats here:
    http://www.cisco.com/en/US/docs/net_mgmt/cisco_secure_access_control_server_for_windows/4.2/release/notes/ACS42_RN.html
    HTH
    Jeremy

Maybe you are looking for

  • Adobe Extension Manager CS5 wont work on Windows 7 Pro x64 only on XP Mode in Virtual PC

    I am on Windows 7 Professional 64 bit operating system on HP ProBook 4720s with XPMode in Virtual PC activated I run Adobe Extension Manager CS5.exe as Admin and the log files has only 3 lines [DEBUG]  Sat Apr 16 10:33:53 2011  (d:\extensionmanager_5

  • Why is the CSS formatting different?

    When using live mode and browser preview mode using chrome, the formatting of my page is as it should be.  However, when I use the chrome browser and enter my url and go to the specific page the formatting is not correct.  By the way it is as it shou

  • Condition types used in cin

    i have some confusion on cin what are condition types used in cin with details and where will assign  TAXINJ and TAX INN  please give me full details with example if any documents available please send to [email protected] advanced thanks

  • Pab entry deletion

    Gentlemen, What is the proper way to delete the pab entry when you want to delete a user from your directory? TIA Ivo Ramos

  • Assigning Keywords

    I am a brand new Lightroom user. I have been "teaching" myself using Martin Evening's book. Having a little trouble with assigning keywords to images. For example, if I have a 3-level heirarchy and I assign a keyword from the lowest level to an image