GPII-2538: Secure /untrusted-settings endpoint#558
Conversation
…s token sent in the http authorization request header.
…ed-settings endpoint.
…en incorporated into AcceptanceTests_oauth2_gpiiAppInstallation.js, from all-tests.js.
…ager. The new data source requests and saves an access token for the keyed in user token, then use the access token to request user settings from the secured /untrusted-settings API.
…sToken() to find an authorization granted to a GPII app installation.
…entation of secured /untrusted-settings endpoint.
…moved by merging GPII-2435 branch but needed in this branch.
|
CI job passed: https://ci.gpii.net/job/universal-tests/533/ |
|
I tried running the Windows repo automated tests against this Universal branch and got an error when running The Windows repo code is calling |
|
Good catch, @simonbates. I've moved |
|
CI job failed: https://ci.gpii.net/job/universal-tests/587/ |
|
ok to test |
|
CI job failed: https://ci.gpii.net/job/universal-tests/588/ |
|
ok to test |
|
CI job passed: https://ci.gpii.net/job/universal-tests/589/ |
|
@cindyli @amb26 I was going to say that I didn't think that moving Nock to the dependencies block (cindyli@de51af1) was the best solution (as it really isn't a runtime dependency) but I see that we have a precedent with https://github.com/GPII/universal/blob/master/package.json#L21 |
|
@simonbates I agree with you that having This approach was also used by having |
…onent into its own js file for it to be used more than only in the key in process.
|
CI job passed: https://ci.gpii.net/job/universal-tests/597/ |
|
CI job passed: https://ci.gpii.net/job/universal-tests/610/ |
…es in testData/preferences.
|
CI job passed: https://ci.gpii.net/job/universal-tests/619/ |
|
I've created a JIRA to record the state of universal prior to merge: |
|
CI job passed: https://ci.gpii.net/job/universal-tests/645/ |
|
Merged at 7f8ac79 |
This pull request secures /untrusted-settings endpoint provided by Cloud Based Flow Manager. Now to use this endpoint, these steps need to be followed:
Authorizationheader when sending the /untrusted-settings request.Refer to this documentation for the detail of these steps.
The local flow manager has been modified to use these steps for retrieving untrusted user settings from /untrusted-settings endpoint.
Note that this implementation requires GPII tokens to be tracked/saved in the auth database in order for them to be authorized to receive untrusted user settings.
@simonbates, @amb26 could you review this pull request? Thanks.