Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace hardcoded local gateway paths #1786

Open
dcroote opened this issue May 29, 2023 · 1 comment
Open

Replace hardcoded local gateway paths #1786

dcroote opened this issue May 29, 2023 · 1 comment

Comments

@dcroote
Copy link
Contributor

dcroote commented May 29, 2023

Currently, the local gateways have paths that include a hardcoded path key. This hardcoded value should be replaced with a random uuid, which is the current configuration for AWS and GCP gateways. Slack discussion here.

For example, the local HTTP gateway path is defined as:

const httpGatewayPath = `${HTTP_BASE_PATH}/${DEFAULT_PATH_KEY}/:endpointId`;

with the hardcoded value from here:

const DEFAULT_PATH_KEY = '01234567-abcd-abcd-abcd-012345678abc';

In contrast, AWS and GCP use random_uuid:

http_gateway_url = var.http_gateway_enabled == false ? null : "${module.httpGw[0].api_url}/${random_uuid.http_path_key.result}"

@dcroote
Copy link
Contributor Author

dcroote commented Sep 15, 2023

Note that as of #1869, implementing this will require the E2E test to capture the non-hardcoded gateway URLs during local deployment because currently DEFAULT_PATH_KEY is used:

`curl --silent --show-error -X POST -H 'Content-Type: application/json' -d '{"parameters": {"coinId": "ethereum"}}' 'http://localhost:3000/http-data/${DEFAULT_PATH_KEY}/${endpointId}'`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant