際際滷

際際滷Share a Scribd company logo
Solution Licensing
    Marco Amoedo Martinez


    @marcoamoedo


Connect + Learn = Grow
Connect + Learn = Grow
What are we going to cover?
# Licensing Challenges
# License Key Strategies for CRM Solutions
# License Key Strategies for Cloud

http://crmlicensing.codeplex.com

Connect + Learn = Grow
#1 Nothing is 100% safe. It can always
be hacked




  Connect + Learn = Grow
#2 Dont punish honest customers




 Connect + Learn = Grow
#3 Just make it good enough to avoid
temptations




 Connect + Learn = Grow
In summary: Keep It Simple




Connect + Learn = Grow
License Keys
 Token to enable your solution
 Only you should be able to generate it
 Tied to a specific customer / deployment




Connect + Learn = Grow
Public Key Cryptography
 Cryptography -> Base for licensing
 Private key is not good enough
 Public Key encryption enables signing




Connect + Learn = Grow
1. License Components:               Generate a License
CrmOrganization:[0,1]:TrialEndDate

                                     <License>
                 Private               <Payload>
                 Key                     MyCrmInstance:1:04022015
                                       </Payload>
                                       <Signature>
                                         YW55IGNhcm5hbCBwbGVhc3VyZQ==
                                       </Signature>
                                     </License>
2. Hash & Cipher:
YW55IGNhcm5hbCBwbGVhc3VyZQ==




Connect + Learn = Grow
1. Extract License
Validate a License                      MyCrmInstance:1:04022012

<License>
  <Payload>
                                        3. Hash :
    MyCrmInstance:1:04022015
  </Payload>                            YA66IfNhcm5ErTYubGVhc3MAMr==
  <Signature>
    YW55IGNhcm5hbCBwbGVhc3VyZQ==
  </Signature>                                               Not
</License>                                Valid              Valid
1. Extract Signature
YW55IGNhcm5hbCBwbG
                               Public   3. Decrypt Hash:
                               Key      YA66IfNhcm5ErTYubGVhc3MAMr==
Vhc3VyZQ==

   Connect + Learn = Grow
Building our license generator

 DEMO: LICENSE GENERATOR

Connect + Learn = Grow
What are we going to cover?
# Licensing Challenges
# License Key Strategies for CRM Solutions
# License Key Strategies for Cloud




Connect + Learn = Grow
How to validate the license in CRM?
 License storage/installation
 Web Resource license checks
 .Net code license checks




Connect + Learn = Grow
Demo Scenario
 The EU VAT Checker
  Solution
    Using the VIES service
     from the EU
    Allow to Check for Valid
     VAT and Enrich Account
     data with addresses

Connect + Learn = Grow
License Storage & Installation
 Store the license as a web resource
    XML File containing the license
    Clean & No need to create custom entities
    Needs publishing
 Configuration page
    Simple HTML Page
    Create/update license




Connect + Learn = Grow
Web Resource / UI License
Checks
 JavaScript Library
    Download License and Public Key
    Validate the License using Public Key
    Act on the results
 Web Resources / Forms
    Include the JavaScript library
 <script src=/slideshow/building-a-licensing-strategy-for-crm-isv-solutions/16339660/"../Scripts/crmlicensing.lib.auto.min.js"
 type="text/javascript"></script>

Connect + Learn = Grow
Plug-in Checks
 Similar as JavaScript
    Validate the License using
     Public Key & Act on the
     results
 But
    Cache the result to avoid
     penalising plugins
    Use a Abstract Class to
     implement the plumbing

Connect + Learn = Grow
Building a fictitious ISV add-on solution to validate EU VAT
 numbers and implementing the license checks

 DEMO: A LICENSED SOLUTION

Connect + Learn = Grow
What are we going to cover?
# Licensing Challenges
# License Key Strategies for CRM Solutions
# License Key Strategies for Cloud




Connect + Learn = Grow
Lets forget the licenses
 Generating licenses requires lots of Work
    Generate Licenses
    Replace them
    Support calls
 What if we use something easier?


Connect + Learn = Grow
License Wall
 http(s)://isvsite.com/script.js?orgname=acme              orgname=acme
                                                                          ISV Website




                                                                    Script Resource




                                        CRM Web Resource




Connect + Learn = Grow
Building a License Wall
 Put part of your solution behind a License
  Wall
    Natural for Web Resources
    Can be used for .Net code
 Only licensed CRM instances can access
  the resources

Connect + Learn = Grow
How to create a license wall in 10 minutes using Windows Azure

 DEMO: LICENSE WALL

Connect + Learn = Grow
License Wall Pros & Cons
 Pros
    No requirement to generate license
    Easier to maintain / update
    Enables new license models
       Subscriptions, User based, etc.
 Cons
    Requires internet access

Connect + Learn = Grow
What have we covered?
# Licensing Challenges
# License Key Strategies for CRM Solutions
# License Key Strategies for Cloud

http://crmlicensing.codeplex.com

Connect + Learn = Grow
Marco Amoedo
                              Microsoft
                            @marcoamoedo
Thank You to all of our Sponsors and thank YOU for attending
                  eXtremeCRM 2013 Rome!
   Session evaluation surveys are online! Check your email or to to:
      http://www.extremecrm.com/Pages/2013RomeSurvey.aspx
 Complete prior to the closing session to be included in todays drawing!




 Connect + Learn = Grow
Find your online Surveys here:
                         http://www.extremecrm.com/Pages/
                                  2013RomeSurvey.aspx




Connect + Learn = Grow

More Related Content

Building a licensing strategy for CRM ISV Solutions

  • 1. Solution Licensing Marco Amoedo Martinez @marcoamoedo Connect + Learn = Grow
  • 3. What are we going to cover? # Licensing Challenges # License Key Strategies for CRM Solutions # License Key Strategies for Cloud http://crmlicensing.codeplex.com Connect + Learn = Grow
  • 4. #1 Nothing is 100% safe. It can always be hacked Connect + Learn = Grow
  • 5. #2 Dont punish honest customers Connect + Learn = Grow
  • 6. #3 Just make it good enough to avoid temptations Connect + Learn = Grow
  • 7. In summary: Keep It Simple Connect + Learn = Grow
  • 8. License Keys Token to enable your solution Only you should be able to generate it Tied to a specific customer / deployment Connect + Learn = Grow
  • 9. Public Key Cryptography Cryptography -> Base for licensing Private key is not good enough Public Key encryption enables signing Connect + Learn = Grow
  • 10. 1. License Components: Generate a License CrmOrganization:[0,1]:TrialEndDate <License> Private <Payload> Key MyCrmInstance:1:04022015 </Payload> <Signature> YW55IGNhcm5hbCBwbGVhc3VyZQ== </Signature> </License> 2. Hash & Cipher: YW55IGNhcm5hbCBwbGVhc3VyZQ== Connect + Learn = Grow
  • 11. 1. Extract License Validate a License MyCrmInstance:1:04022012 <License> <Payload> 3. Hash : MyCrmInstance:1:04022015 </Payload> YA66IfNhcm5ErTYubGVhc3MAMr== <Signature> YW55IGNhcm5hbCBwbGVhc3VyZQ== </Signature> Not </License> Valid Valid 1. Extract Signature YW55IGNhcm5hbCBwbG Public 3. Decrypt Hash: Key YA66IfNhcm5ErTYubGVhc3MAMr== Vhc3VyZQ== Connect + Learn = Grow
  • 12. Building our license generator DEMO: LICENSE GENERATOR Connect + Learn = Grow
  • 13. What are we going to cover? # Licensing Challenges # License Key Strategies for CRM Solutions # License Key Strategies for Cloud Connect + Learn = Grow
  • 14. How to validate the license in CRM? License storage/installation Web Resource license checks .Net code license checks Connect + Learn = Grow
  • 15. Demo Scenario The EU VAT Checker Solution Using the VIES service from the EU Allow to Check for Valid VAT and Enrich Account data with addresses Connect + Learn = Grow
  • 16. License Storage & Installation Store the license as a web resource XML File containing the license Clean & No need to create custom entities Needs publishing Configuration page Simple HTML Page Create/update license Connect + Learn = Grow
  • 17. Web Resource / UI License Checks JavaScript Library Download License and Public Key Validate the License using Public Key Act on the results Web Resources / Forms Include the JavaScript library <script src=/slideshow/building-a-licensing-strategy-for-crm-isv-solutions/16339660/"../Scripts/crmlicensing.lib.auto.min.js" type="text/javascript"></script> Connect + Learn = Grow
  • 18. Plug-in Checks Similar as JavaScript Validate the License using Public Key & Act on the results But Cache the result to avoid penalising plugins Use a Abstract Class to implement the plumbing Connect + Learn = Grow
  • 19. Building a fictitious ISV add-on solution to validate EU VAT numbers and implementing the license checks DEMO: A LICENSED SOLUTION Connect + Learn = Grow
  • 20. What are we going to cover? # Licensing Challenges # License Key Strategies for CRM Solutions # License Key Strategies for Cloud Connect + Learn = Grow
  • 21. Lets forget the licenses Generating licenses requires lots of Work Generate Licenses Replace them Support calls What if we use something easier? Connect + Learn = Grow
  • 22. License Wall http(s)://isvsite.com/script.js?orgname=acme orgname=acme ISV Website Script Resource CRM Web Resource Connect + Learn = Grow
  • 23. Building a License Wall Put part of your solution behind a License Wall Natural for Web Resources Can be used for .Net code Only licensed CRM instances can access the resources Connect + Learn = Grow
  • 24. How to create a license wall in 10 minutes using Windows Azure DEMO: LICENSE WALL Connect + Learn = Grow
  • 25. License Wall Pros & Cons Pros No requirement to generate license Easier to maintain / update Enables new license models Subscriptions, User based, etc. Cons Requires internet access Connect + Learn = Grow
  • 26. What have we covered? # Licensing Challenges # License Key Strategies for CRM Solutions # License Key Strategies for Cloud http://crmlicensing.codeplex.com Connect + Learn = Grow
  • 27. Marco Amoedo Microsoft @marcoamoedo Thank You to all of our Sponsors and thank YOU for attending eXtremeCRM 2013 Rome! Session evaluation surveys are online! Check your email or to to: http://www.extremecrm.com/Pages/2013RomeSurvey.aspx Complete prior to the closing session to be included in todays drawing! Connect + Learn = Grow
  • 28. Find your online Surveys here: http://www.extremecrm.com/Pages/ 2013RomeSurvey.aspx Connect + Learn = Grow

Editor's Notes

  1. 7 minutesStart WPF AppAdd the UIThen add code to generate the license keysAdd the encrypt codeVerify
  2. 15 minutesConfiguration PageCheck for .lic fileUpload .licPublish request (using guid)Licensed Web ResourceExplain the setup with the minimiserExplain the issue about RSA.JSShow the code for the auto checkerExplain how to customiseLicensed PluginExplain basic ideaWhy needs a base class and hold the result in memory
  3. One sourceNorriq