Re: xml based AzMan and ActiveDirectory

From: A (a_at_a.com)
Date: 09/15/05

  • Next message: steven_at_sbcanada.com: "nightmare with ADAM ldap and roleprovider"
    Date: Thu, 15 Sep 2005 17:19:12 -0400
    
    

    Thank you

    "Dominick Baier [DevelopMentor]" <dbaier@pleasepleasenospamdevelop.com>
    wrote in message news:42565460e2c928c78845f6c43b48@news.microsoft.com...
    > Hello A,
    >
    > i used the following code
    >
    > private string[] getRoles(IAzClientContext context)
    > {
    > object[] a;
    > try
    > {
    > a = (object[]) context.GetRoles("");
    > }
    > catch (COMException ex)
    > {
    > throw new AzMethodException(ex, "IAzClientContext.GetRoles");
    > }
    > string[] roles = new string[a.Length];
    > Array.Copy(a, roles, a.Length);
    > return roles;
    > }
    >
    > i implemented a AzManPrincipal - and the code you see is part of the
    > IPrincipal.IsInRole method
    >
    > you can read more here, too:
    > http://www.leastprivilege.com/SearchView.aspx?q=azman
    >
    > ---------------------------------------
    > Dominick Baier - DevelopMentor
    > http://www.leastprivilege.com
    >
    >> Hello
    >>
    >> I want to check is the user "X" is in the role "Y" in the application
    >> "Z"
    >> or if the user "X" is in any of the roles of the application "Z"
    >> the roles being defined in the xml file (by AzMan as interface).
    >> Thank you,
    >> Alina
    >> "Dominick Baier [DevelopMentor]"
    >> <dbaier@pleasepleasenospamdevelop.com> wrote in message
    >> news:42565460e2c168c7883af6b536e8@news.microsoft.com...
    >>
    >>> Hello A,
    >>>
    >>> can you please clarify what you want to achieve?
    >>> ---------------------------------------
    >>> Dominick Baier - DevelopMentor
    >>> http://www.leastprivilege.com
    >>>> Hello
    >>>>
    >>>> I'm using xml based AzMan (I'm on Win XP) and Active Directory
    >>>> users.
    >>>> I want
    >>>> to be able to know if a user belongs to a certain role from an app.
    >>>> If I'm doing like in the code below, I'm not capable to see in the
    >>>> windows
    >>>> principal the roles defined in the .xml AzMan file.
    >>>> IAzApplication iapp = this.store.OpenApplication(appName, null);
    >>>> ArrayList al = new ArrayList();
    >>>> WindowsPrincipal wp =
    >>>> (WindowsPrincipal)System.Threading.Thread.CurrentPrincipal;
    >>>> foreach (IAzRole appRole in iapp.Roles)
    >>>> {
    >>>> if (wp.IsInRole(appRole.Name))
    >>>> {
    >>>> return true;
    >>>> }
    >>>> }
    >>>> How can I load in the WindowsPrincipal the AzMan roles ? Or how can
    >>>> I
    >>>> check directly (using the AzMan library) if a user belongs to a role
    >>>> /
    >>>> app. ?
    >>>> Thank you,
    >>>> Alina
    >
    >


  • Next message: steven_at_sbcanada.com: "nightmare with ADAM ldap and roleprovider"

    Relevant Pages

    • Re: xml based AzMan and ActiveDirectory
      ... > the roles being defined in the xml file (by AzMan as interface). ... >> can you please clarify what you want to achieve? ...
      (microsoft.public.dotnet.security)
    • Re: Calling Still Image API in C#
      ... I get a COMException when I ... try and call the RegisterLaunchApplication method on the interface. ... > Hi Travis, ... > you need define the managed Interface on your own, ...
      (microsoft.public.dotnet.framework.interop)