UI Component Package Access
Overview
Some UI packages contain components that need to be protected because of licensing limitations and require an access token to be present in any package that uses it as a dependency.
How to get a token
If you are interested in getting a token for a protected package, please request one by creating a JIRA issue with the following information (double check all info as any discrepancy will lead to token validation failure):
- Title:
[Access Request] UI Component Package Token - Component: "UI | Components"
- Summary:
- Secured approval from Management (Attach PDF with approval email thread)
- Root package name of application: "packageName"
- Component package: "protectedPackageName"
- Contact email: email address
Once the ticket is closed, you'll receive your token via email.
Unauthorized use of packages
When a protected package is added as a dependency without a valid token, the developers will get the following error whenever the UI bundler runs:
A token is required for the following packages: protectedPackage.
Please read each package's documentation and provide a valid token through UiSdlComponentPackageAccess or remove the dependency.Using a token to get package access
Once you get a token in JSON format, you should add it to your package inside a config/UiSdlComponentPackageAccess directory.
Protecting a package
If a package needs to be protected, please refer to the UiSdlModuleProtection implementation.
Token generation
This step requires a private key that is managed by the UI Team's product owners, given the right key and information, they can generate a token by running the following action:
UiSdlModuleProtection.generateToken(protectedPackageName, userPackageName, PRIVATE_KEY);