in

Community Blogs

Blogs of different SQL/Developers Community Members

This Blog

Syndication

DamirDobric

svibanj 2011 - Posts

  • Access Control Service Endpoints

    Windows Azure AppFabric Access Control Service v2 provides a number of endpoints which wrap up many authentication, authorization and federation scenarios into a single platform. Stepping through all samples and reading of all specifications is pretty wired task. For this reason I tried to recap most used endpoints across multiple samples and list them all in this post.


    ACSv2 Management Endpoint

    Use this endpoint to add service reference to application which will perform management operations.

    https://itemtracking.accesscontrol.windows.net/v2/mgmt/service/

    image

    After the proxy has been created you can do this like:


    RelyingParty relyingParty = svc.GetRelayingPartyByName(“MyRelayingParty”);

    svc.CreateRelyingPartyKey(relyingParty, signingCertificate, "password", RelyingPartyKeyType.X509Certificate, RelyingPartyKeyUsage.Signing, true);

    svc.CreateRelyingPartyKey(relyingParty, cerForEncryption, null, RelyingPartyKeyType.X509Certificate, RelyingPartyKeyUsage.Encrypting, true);


    svc.CreateServiceIdentity(serviceIdentityName,
    Encoding.UTF8.GetBytes(pwd),
    ServiceIdentityKeyType.Password,
    ServiceIdentityKeyUsage.Password);


    RuleGroup ruleGroup = svc.CreateRuleGroup(ruleGroupName);

    svc.AssignRuleGroupToRelyingParty(ruleGroup, relyingParty);

    Sample: All SDK samples provide a project named “ConfigureSample”.

    Username Password Endpoint

    Useful in Web Service scenarios, when the consumer needs to authenticate to service by using of SAML token issued by Access Control Service.

    https://myacsnamespace.accesscontrol.windows.net/v2/wstrust/13/username

    Sample: ACS Sample named “Acs2UsernameBindingSample”

     

    WRAPv09 Endpoint

    Used for example in federation scenarios to obtain WRAP token issued by LiveID, Google Open ID etc. The federated token is then sent to some Relaying party (i.e. Web Service).

    https://myacsnamespace.accesscontrol.windows.net/WRAPv0.9/

    Sample: ACS Sample named “Acs2WindowsPhoneSample”

    OAuth Endpoint

    By using of this endpoint you can protect your Web Application by using of OAuth.

    https://itemtracking.accesscontrol.windows.net/v2/OAuth2-13

    Sample: ACS sample named: “OAuth2CertificateSample”

    All samples can be downloaded at CodePlex.

  • Windows Azure AppFabric Cache error

    When working with Windows Azure AppFabric Cache you might get following error:

    ErrorCode<ERRCA0021>:SubStatus<ES0001>:Server collection cannot be empty.

    Usually when I have no idea what the problem could be, I just assume that the error message is not very human friendly. The problem here is that you have probably just copied the configuration provided in management portal. Honestly you didn’t do anything wrong. The configuration there is provided to be copied.
    The error shown above should be translated like “Hey dude, I like you very much, but you unfortunately use  officially provided configuration which is invalid :).

    I’m sorry about that, the configuration is not really invalid. The problem is that comments in the provided configuration for SSL endpoint  is not clear enough.
    Here is the original config:

      <dataCacheClient name="SslEndpoint">
          
    <hosts>
            <host name="dootnetpro.cache.windows.net" cachePort="22243"/>
          </hosts>

     

          <securityProperties mode="Message" sslEnabled="true">
        
           <messageSecurity authorizationInfo="==">
            </messageSecurity>
          </securityProperties>
      </dataCacheClient>

    and this is how it should be:

      <dataCacheClient name="default">
          
    <hosts>
            <host name="dootnetpro.cache.windows.net" cachePort="22243"/>
          </hosts>

     

          <securityProperties mode="Message" sslEnabled="true">
        
           <messageSecurity authorizationInfo="==">
            </messageSecurity>
          </securityProperties>
      </dataCacheClient>

    Uuppss :)

    Posted svi 12 2011, 11:16 by anonymous
    Filed under: ,
  • Windows Phone Workshop an der FH - Frankfurt

    Auf Basis der langjährigen Kooperation zwischen daenet und dem Studiengang Elektrotechnik und Informationstechnik an der Fachhochschule Frankfurt am Main führt Armin Kalajdzija eine Einführung in die Windows Phone 7 Programmierung für die Studenten des 5. Semesters durch. Diese Einführung dient der Vorbereitung für das Projekt Informationsverarbeitung, in der die Studenten/Studentinnen eine WP7 App entwickeln. In diesem Semester liegt der Schwerpunkt auf Anwendungen im Kontext  Location Based Services.
    Alle nicht studierende sind ebenso herzlich eingeladen.

    Agenda:

    -Metro Design UI
    -Hardware Platform
    -Application Platform:
    -Architecture
    -Framework
    -Life Cycle
    -Location Services
    -Notification Services
    -Marketplace

    Beginn: 10.00 Uhr

    Veranstalltungsort
    Fachhochschule Frankfurt am Main, Gebäude 8, Raum 103.
    Nibelungenplatz 1, Frankfurt am Main
    http://www.bing.com/maps/Default.aspx?encType=1&v=2&ss=ypid.YN7134x257614337&style=r&mkt=de-de&FORM=LLDP

  • Hosting of WCF Service side by side with WCF DataService

    Sometimes you might host typical WCF service side by side with WCF DataService in one application. As long you use single endpoint based on some security mechanism all will for fine.

    For example, assume there is a service MyService which is accessed by MyService.svc and configured like:

      <service name="MyService" >

            <endpoint address="" contract="IMyService" binding="basicHttpBinding" 
                     
    bindingConfiguration="BasicHttpBinding_KerberosAuthentication"
    />

         </service>

    Assume there is also a WCS DataService accessable by MyDatService.svc. Both service are configured in IIS to use Windows authentication. In this case all will work fine.
    Now, you decide to enable additional endpoint for MyService with Basic Authentication to be accessible by for example mobile devices. To do that, you will have to add new endpoint with name “basic” (example)

    <service name="MyService" >

          <endpoint address="" contract="IMyService" binding="basicHttpBinding"
                    bindingConfiguration="BasicHttpBinding_KerberosAuthentication"
    />

          <endpoint address="basic" contract="IMyService" binding="basicHttpBinding"
                    bindingConfiguration="BasicHttpBinding_BasicAuthentication" 
    />

    </service>

    Add additionally binding configurations:

      <binding name="BasicHttpBinding_KerberosAuthentication" />

              <security mode="TransportCredentialOnly">

                <transport clientCredentialType="Windows" />

              </security>

       </binding>

           
      
    <
    binding name="BasicHttpBinding_BasicAuthentication"
    />

              <security mode="TransportCredentialOnly">

                <transport clientCredentialType="Basic" />

              </security>

       </binding>

     

    After all Enable in IIS Basic Authentication. You will figure out that MyService still works, but MyDataService fails with following exception:

    IIS specified authentication schemes 'IntegratedWindowsAuthentication, Basic', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used.

    To workaround this, append following configuration elements to WCF Data Service:

          <service name="MyDataService" >

            <endpoint address =""

                      binding="webHttpBinding"

                      bindingConfiguration="OData_Binding"

                      contract ="System.Data.Services.IRequestHandler">

            </endpoint>

          </service>

          <webHttpBinding>

            <binding name="BasicHttpBinding_SizedBinding_OData" >

              <security mode="TransportCredentialOnly">

                <transport clientCredentialType="Windows" />

              </security>

            </binding>

          </webHttpBinding>

     

    Posted svi 10 2011, 03:28 by anonymous
    Filed under: ,
  • Freibier für alle: Kostenloses Zugang zu Windows Azure

    Unter folgendem Link, erhalten Sie einen kostenfreien Zugang zur Windows Azure Platform für 90 Tage. Jetzt kann man Windows Azure ohne Kreditkarte testen und vollkommen kostenlos. Hier geht es weiter: Windows Azure Platform 90-Tage Testzugang

    Windows Azure

Copyright of SQL/Developers Community
Powered by Community Server (Commercial Edition), by Telligent Systems