Skip to content

Enable Insecure Requests for SFT Lookups in a Test Environment#2014

Merged
mdimjasevic merged 8 commits intodevelopfrom
fs-266/update-sft-configuration
Dec 30, 2021
Merged

Enable Insecure Requests for SFT Lookups in a Test Environment#2014
mdimjasevic merged 8 commits intodevelopfrom
fs-266/update-sft-configuration

Conversation

@mdimjasevic
Copy link
Contributor

@mdimjasevic mdimjasevic commented Dec 29, 2021

This is a follow-up to PR #2012 as part of https://wearezeta.atlassian.net/browse/FS-266:

  • It places SFT lookup parameters to a better-suited section in Brig's configuration
  • It enables making an insecure connection by using an IP address in a request to an SFT server (https://<ip-address>/...) if a test environment flag is set in Brig's configuration
  • It fixes making a request GET https://<sft-ip-address>/sft/url

Checklist

  • The PR Title explains the impact of the change.
  • The PR description provides context as to why the change should occur and what the code contributes to that effect. This could also be a link to a JIRA ticket or a Github issue, if there is one.
  • changelog.d contains the following bits of information (details):
    • A file with the changelog entry in one or more suitable sub-sections. The sub-sections are marked by directories inside changelog.d.

Marko Dimjašević added 6 commits December 29, 2021 16:07
- Also fix a request to an SFT's `GET /sft/url`
- This insecure connection will have to be guarded by a Brig
configuration flag that is yet to be introduced
- Also fix how the SFT environment is computed. Before, it would rely on
the SFT lookup parameters to be set to keep on working. This makes SFT
lookup parameters truly optional.
@mdimjasevic mdimjasevic force-pushed the fs-266/update-sft-configuration branch from 9bfaf61 to 9c3d761 Compare December 30, 2021 12:44
@mdimjasevic mdimjasevic changed the title [WIP] Move SFT Lookup Parameters to Another Configuration Section Move SFT Lookup Parameters to Another Configuration Section Dec 30, 2021
@mdimjasevic mdimjasevic marked this pull request as ready for review December 30, 2021 13:41
@mdimjasevic mdimjasevic changed the title Move SFT Lookup Parameters to Another Configuration Section Enable Insecure Requests for SFT Lookups in a Test Environment Dec 30, 2021
@mdimjasevic mdimjasevic changed the title Enable Insecure Requests for SFT Lookups in a Test Environment Enable Insecure Requests for SFT Lookups in Test Environments Dec 30, 2021
@mdimjasevic mdimjasevic changed the title Enable Insecure Requests for SFT Lookups in Test Environments Enable Insecure Requests for SFT Lookups in a Test Environment Dec 30, 2021
@mdimjasevic mdimjasevic merged commit 8613748 into develop Dec 30, 2021
@mdimjasevic mdimjasevic deleted the fs-266/update-sft-configuration branch December 30, 2021 14:42
jschaul added a commit that referenced this pull request Jan 4, 2022
…ftd_disco sidecar process. (#2019)

Related to https://wearezeta.atlassian.net/browse/FS-266.

Implements querying the list of all SFT servers from the sftd's sidecar nginx pod. This is a different take on the above issue and if this list provided by sft servers is made use of; then that makes some of the work introduced in #2012 #2014 #2015 obsolete (sorry 😟 ). 

From brig, using the url configured in `setSftStaticUrl`, and calling `/sft_servers_all.json` on that URL, this PR provides a list of all SFT servers available. The list is computed on the SFTD chart itself (using a sftd_disco sidecar container). This has the advantage of allowing brig to be hosted on a separate kubernetes cluster to sftd, and moves the business logic of knowing sftd servers to sftd itself.

From a brig pod on a test cluster:

```
 # cat /etc/wire/brig/conf/brig.yaml | grep sft
  setSftStaticUrl: https://sftd.a.adhoc-testing.wire.link:443
/ # curl -ks https://sftd.a.adhoc-testing.wire.link:443/sft_servers_all.json
{
  "sft_servers_all": [
    "https://sftd.a.adhoc-testing.wire.link/sfts/wire-server-a-sftd-0"
  ]
}
```

Co-authored-by: Marko Dimjašević <marko.dimjasevic@wire.com>
@akshaymankar akshaymankar mentioned this pull request Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants