Setting Up OAuth on STRATO Node
BlockApps STRATO integrates with enterprise user authorization framework, e.g., OAuth2, to allow user access and achieve single sign-on for blockchain applications. In order to enable OAuth on a Node, additional configuration options must be passed to the node when STRATO is setup. This section provides the overview on how to enable the OAuth solution on the node during STRATO setup. For more information on why OAuth2 is needed and how OAuth works, you can see the [OAuth] topic under the [Quickstart] section of this documentation.
For STRATO versions 4.4 and forward, the following variables will need to be either added to the script you use to start up and run STRATO or they will need to be passed as command line arguments before
The arguments are as follows:
You will need to add a port number for the OAuth integration. For OAuth, we currently recommend the use of port 8080.
Corresponding with the addition of a port, we will need to add the port number at the end of our node host variable.
This enables the token validation.
OAUTH_JWT_VALIDATION_DISCOVERY_URL=<your keycloak or other credential provider link>
When running an application with OAuth enabled, you will also need to have authorization tokens saved an in enviroment file or read into a script and passed to your application. More detail about that can be found in the QuickStart - Oauth section.