...
Create an OpenLMIS user (with email and any roles that might be used in the reports) that will be used by the Superset. In the instruction, a superset is used as its username (using a UI for this is a convenient way).
Configure OpenLMIS to create an OAuth Client for superset. Add the following lines in settings.env of OpenLMIS v3 (not reporting stack’s settings.env). PS: client ID should be any value different from the word “superset” and should match what is configured in reporting stack’s settings.env.
Code Block SUPERSET_CLIENT_ID=<ClientID> SUPERSET_CLIENT_SECRET= SUPERSET_REDIRECT_URI=<Superset URL>/oauth-authorized/openlmis
[Step Replaced by 2 above]
Create OAuth User for the Superset in the OpenLMIS database, with adjusted clientsecret (OL_SUPERSET_PASSWORD) and redirecturi (SUPESET_URL) values. You can use and adjust the following SQL:Code Block INSERT INTO auth.oauth_client_details (clientid, accesstokenvalidity, additionalinformation, authorities, authorizedgranttypes, autoapprove, clientsecret, refreshtokenvalidity, redirecturi, resourceids, "scope", webserverredirecturi) VALUES('superset', NULL, NULL, 'TRUSTED_CLIENT', 'authorization_code', NULL, <OL_SUPERSET_PASSWORD>, NULL, '<SUPERSET_URL>/oauth-authorized/openlmis', 'hapifhir,notification,pcmtintegration,cce,auth,requisition,referencedata,report,stockmanagement,fulfillment,reference-instance-ui', 'read,write', NULL);
Log in to the OpenLMIS as a superset to verify if it’s working. The user should be able to access the Superset reports in the Reports tab.
...