also verifies the connection and token privileges on start of the application (helps report and diagnose problems before start using it)
makes token path configurable
This is needed because of the URL constructor URL(context, spec). If the spec has a / in the begining then it will replace the path in the context. Hence when creating new URL("http://managementportal-app:8080/managementportal", "/oauth/token"), the /managementportal path was being discarded. see official docs for more info
Migration Steps involving validation
If don't need validation
Add the REST_SOURCE_AUTHORIZER_VALIDATOR env var to your docker-compose service to disable validation-
Note: This will only disable backend validation. The frontend validation(based on Regex) will still exist.
Enable validation using Management Portal
First Create a new oAuth client in Management Portal
To add new OAuth clients, you can add at runtime through the UI on Management Portal, or you can add them to the OAuth clients file referenced by the MANAGEMENTPORTAL_OAUTH_CLIENTS_FILE configuration option.
Then add the following to your rest authoriser service
Add the following env vars to your docker-compose service-
This is needed because of the
URL
constructorURL(context, spec)
. If the spec has a/
in the begining then it will replace the path in the context. Hence when creatingnew URL("http://managementportal-app:8080/managementportal", "/oauth/token")
, the/managementportal
path was being discarded. see official docs for more infoMigration Steps involving validation
If don't need validation
Add the
REST_SOURCE_AUTHORIZER_VALIDATOR
env var to your docker-compose service to disable validation-Note: This will only disable backend validation. The frontend validation(based on Regex) will still exist.
Enable validation using Management Portal
First Create a new oAuth client in Management Portal
To add new OAuth clients, you can add at runtime through the UI on Management Portal, or you can add them to the OAuth clients file referenced by the MANAGEMENTPORTAL_OAUTH_CLIENTS_FILE configuration option.
Then add the following to your rest authoriser service
Add the following env vars to your docker-compose service-
Note: Make sure to configure the client id and client secret as created in the Management portal