Windows Azure Platform Developer Center > Azure Forums > AppFabric > How to create ACS Rule for Live.com programatically
Ask a questionAsk a question
 

AnswerHow to create ACS Rule for Live.com programatically

  • Monday, November 02, 2009 8:45 AMSachin Sancheti Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    As per the notes which i found in another thread
    "This is the desired behavior. Since no rules exist, ACS will consider the input claim as invalid, and forbids the client from accessing your service. It will be ideal to support the wildcard (*) for Live ID, so any one authenticated by Live ID will be able to access your service. Unfortunately, currently wildcard is only supported when using "Copy input claim", which no longer suits to Live ID. Our ACS and Live ID team are working together to see if it is possible to support wildcard for Live ID in the future. For now, you have to create a rule for each Live ID that you trust."

    To address this i need to create ACS Rules programatically, where Application has the WindowsLiveId of the user. Application should be able to add a rule in ACS where Claim WindowsLiveId is = <user'swindowsliveid> and output claim is Action=user's Windows live id.
    I have gone through the .Net service bus but there is no sample available for adding a rule for external issuers like live.com

    Please let me know how to achieve this.

    Please mark if reply answers your query.

Answers

  • Tuesday, November 03, 2009 9:25 AMYi-Lun LuoMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hello, I suggest you to wait for the next release, because there will be a lot of break changes.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.

All Replies

  • Tuesday, November 03, 2009 9:25 AMYi-Lun LuoMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hello, I suggest you to wait for the next release, because there will be a lot of break changes.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
  • Wednesday, November 11, 2009 12:08 PMLive Developer Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hey hi,

    I have a small question, now that the Nov CTP is released, who to add the Rule to the ACS for Authorizing the WindowsLiveId i.e wlid. How to specify the InputClaimType to take a wlid isser id as the documentation of adding the rule has defined it as,

    MethodRequest URIRequired Parameters

    POST

    /rulesets/<ruleSetId>/rules

    DisplayName, InputClaim, InputClaim/IssuerId, InputClaim/Type, InputClaim/Value, OutputClaim


    Can you explain the parameter that are need to pass in to the rule so that I can add the rule for authorizing the LiveId in the InputClaimType. This is how i tried to add it.

    new Rule()
    {
      DisplayName = "NewRule",
      InputClaim = new InputClaim()
                          {
                            Type = "wlid",
                            Value = "*userLiveId*"
                          },
      OutputClaim = new OutputClaim()
                            {
                              Type = "username",
                              Value = "*username*"
                            },
      Type = "Simple"
    }

    But this fails as the InputClaim Id is missing, what will be the id for the live.com issuer.

    Any help will be appreciated.

    Thanks in advance.