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

Set proxy credentials from functional tests #6144

Open
igor-sirotin opened this issue Nov 29, 2024 · 2 comments · May be fixed by #6211
Open

Set proxy credentials from functional tests #6144

igor-sirotin opened this issue Nov 29, 2024 · 2 comments · May be fixed by #6211
Assignees

Comments

@igor-sirotin
Copy link
Collaborator

igor-sirotin commented Nov 29, 2024

  1. Read these env vars:

    • STATUS_BUILD_PROXY_USER
    • STATUS_BUILD_PROXY_PASSWORD
  2. Pass values to these endpoints as part of WalletSecretsConfig:

    • CreateAccountAndLogin
    • RestoreAccountAndLogin
    • LoginAccount

    status-go/params/config.go

    Lines 551 to 556 in 29bf0d6

    StatusProxyMarketUser string `json:"StatusProxyMarketUser"`
    StatusProxyMarketPassword string `json:"StatusProxyMarketPassword"`
    StatusProxyBlockchainUser string `json:"StatusProxyBlockchainUser"`
    StatusProxyBlockchainPassword string `json:"StatusProxyBlockchainPassword"`
    StatusProxyEnabled bool `json:"StatusProxyEnabled"`
    StatusProxyStageName string `json:"StatusProxyStageName"`

    Reference status-desktop for correspondence of env vars to parameters:
    https://github.com/status-im/status-desktop/blob/73af1b8ba0fd82a5259a5799fef3bd03280869b3/src/app_service/service/accounts/service.nim#L168-L172

      proc buildWalletSecrets(): WalletSecretsConfig =
        return WalletSecretsConfig(
          # ...
          statusProxyMarketUser: STATUS_PROXY_USER_RESOLVED,
          statusProxyMarketPassword: STATUS_PROXY_PASSWORD_RESOLVED,
          statusProxyBlockchainUser: STATUS_PROXY_USER_RESOLVED,
          statusProxyBlockchainPassword: STATUS_PROXY_PASSWORD_RESOLVED,
        )
  3. Also set WalletSecretsConfig.statusProxyStageName to "test".

@igor-sirotin
Copy link
Collaborator Author

@antdanchenko raised a risk of potential leak of credentials in functional test logs, if we pass them through API.

I discussed it today with @osmaczko.
Even if we embed it to status-go during build time, anyway there's always a risk of leaking it in geth.log itself.

So we agreed not to overcomplicate things now and pass the credentials through API.
At the same time, we must implement right tools to prevent leaks. We discussed these options:

@igor-sirotin
Copy link
Collaborator Author

Waiting for #6159 to be merged to prevent conflicts

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

Successfully merging a pull request may close this issue.

2 participants