Labs64 NetLicensing / Auth0 Integration
Labs64 NetLicensing is a first-class solution in the Licensing as a Service (LaaS) sector. Based on open standards, it provides a cost effective, integrated and scalable platform for software vendors and developers who want to concentrate on their product’s core functionality instead of spending resources on developing an own license management software.
Rule: Enrich user profile with NetLicensing validation
This rule validates user entitlements using NetLicensing license management services. User e-mail (if available) is being used as a customer identifier.
The validation result is immediately available in the user_metadata
property and returns data in the ID token.
Configuration
Preconditions
- Valid and active NetLicensing vendor profile; register here
- Working Auth0 configuration (incl. test application)
Configure NetLicensing product
Configure product module
Create Auth0 rule
Use rule-netlicensing-validate.js as rule content.
Create NetLicensing API Key
Note: recommended API Key role ROLE_APIKEY_LICENSEE
Required configuration
NETLICENSING_API_KEY
- NetLicensing API Key (step 4)NETLICENSING_PRODUCT_NUMBER
- product number (step 1)NETLICENSING_PRODUCT_MODULE_NUMBER
- product module number (step 2)
Rule flow
Created and deployed rule will be executed after user login.
Sample user info
Enriched user profile can be retrieved using Auth0 API; see /userinfo endpoint. Userinfo response format specified by OpenID Connect specification.
{
"email": "user@local.local",
"https://netlicensing.io/auth0": {
"id": null,
"infos": {
"info": []
},
"items": {
"hasnext": null,
"item": [
{
"list": [],
"property": [
{
"name": "productModuleNumber",
"value": "MAUTH0"
},
{
"name": "valid",
"value": "true"
},
{
"name": "expires",
"value": "2021-03-21T20:52:45.867Z"
},
{
"name": "productModuleName",
"value": "Subscription module"
},
{
"name": "licensingModel",
"value": "Subscription"
}
],
"type": "ProductModuleValidation"
}
],
"itemsnumber": null,
"pagenumber": null,
"totalitems": null,
"totalpages": null
},
"signature": null,
"ttl": "2021-03-14T21:02:45.867Z"
},
"name": "User",
"nickname": "username",
"picture": "https://avatars.githubusercontent.com/u/1361258?v=4",
"sub": "github|1361258",
"updated_at": "2021-03-14T20:52:45.984Z"
}
Bugs and Feedback
For bugs, questions and discussions please use the GitHub Issues.
Links
- What is Authentication-Authorization-Validation Framework - https://netlicensing.io/blog/2020/09/24/authenticate-authorize-validate-framework/