Skip to content

Commit 39cca43

Browse files
v0.4.52 (#696)
* update release refs to rc-v0.4.52 * qualify GCP custom role titles with environment ID (#691) * give a clearer title to custom roles * qualify custom role titles with env * changelog updates * relax tf version contraints (#693) * tf version constraints relaxed to allow 1.7; automate tests against 1.7 * improve docs of Terraform version compatibility * add some trouble-shooting docs * relax more version constraints * straight < to simplify version constraint readability * better docs of features to use * Update docs/development/terraform-versions.md Co-authored-by: aperez-worklytics <[email protected]> * Update README.md Co-authored-by: aperez-worklytics <[email protected]> --------- Co-authored-by: aperez-worklytics <[email protected]> * email canonicalization control (#694) * config property to control email canonicalization * respect subaddress/plus addressing * document in CHANGELOG * expose setting in terraform modules, set good defaults in examples * flag it for migration purposes * missed committing actual change :facepalm * External TODOs for MSFT connectors * Better format * Lint, format * update release refs to v0.4.52 * clarify next steps in release workflow (#692) * GCP: Using artifact registry (#656) * Enable artifact registry * Making functions to use artifact repo * Added repo, commented policies * Update bulk * Update changelog * Indent * Fixed missing parameter on example * Comments * Updated changelog * Fix changelog merge * Protection against activation API delay * Make null as default * Only generate file if flag is enabled --------- Co-authored-by: aperez-worklytics <[email protected]> Co-authored-by: Andrés Pérez <[email protected]>
1 parent c2c0fc2 commit 39cca43

File tree

53 files changed

+469
-149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+469
-149
lines changed

.github/workflows/ci-terraform-examples-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
'examples/gcp-google-workspace',
2222
'examples/msft-365'
2323
]
24-
terraform_version: [ '~1.4.0', '~1.5.0', '~1.6.0' ]
24+
terraform_version: [ '~1.4.0', '~1.5.0', '~1.6.0', '~1.7.0' ]
2525
uses: ./.github/workflows/ci-terraform-example.yaml
2626
with:
2727
terraform_version: ${{ matrix.terraform_version }}

.github/workflows/ci-terraform-examples.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
'examples-dev/gcp',
2020
'examples-dev/gcp-google-workspace',
2121
]
22-
terraform_version: [ '~1.4.0', '~1.5.0', '~1.6.0' ]
22+
terraform_version: [ '~1.4.0', '~1.5.0', '~1.6.0', '~1.7.0' ]
2323
uses: ./.github/workflows/ci-terraform-example.yaml
2424
with:
2525
terraform_version: ${{ matrix.terraform_version }}

.github/workflows/ci-terraform-modules.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
terraform_version: [ '~1.4.0', '~1.5.0', '~1.6.0']
14+
terraform_version: [ '~1.4.0', '~1.5.0', '~1.6.0', '~1.7.0']
1515
steps:
1616
- name: Check out code
1717
uses: actions/checkout@v4

CHANGELOG.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,35 @@ Changes to be including in future/planned release notes will be added here.
2020
then wildcard policy to read shared also grants read of secrets across all connectors)
2121
- keys/salts per value kind (PII, item id, etc)
2222

23+
## [0.4.52](https://github.com/Worklytics/psoxy/release/tag/v0.4.52)
24+
- BREAKING: default behavior for sub-addressing aka "plus addressing" of emails has changed; the
25+
proxy previously considered these canonically distinct. Now, the proxy will consider these
26+
canonically equivalent. As we don't expect plus addressing to be used hris or directory data,
27+
this should have little impact. Changes will most likely be in a few edge cases, such as
28+
emails or calendar invites sent to a sub-address - sender unlikely to be a subaddress, but
29+
recipient could be. In such cases, behavior prior to 0.4.52 would cause recipient to appear
30+
as a distinct mailbox; from 0.4.52 onward, they will be considered the same mailbox; we expect
31+
this to be behavior that is more in line with user expectations, so although technically
32+
breaking, we're introducing it without a major version bump.
33+
- there new option to enable less strict email canonicalization; we strongly recommend new
34+
customers to enable it, although it is not enabled by default to avoid a breaking change. Set
35+
`email_canonicalization` to `IGNORE_DOTS` to enable this feature.
36+
- BREAKING for examples: default value fore `email_canonicalization` in our example repos has been
37+
set to `IGNORE_DOTS`; if you've previously forked an example, this is not a breaking change. but
38+
if you fork an example > 0.4.52 and are attempting to migrate a proxy deployment initially built
39+
with modules or examples from < 0.4.52, you should explicitly add `email_canonicalization = "STRICT"`
40+
in your `terraform.tfvars`
41+
- GCP: Existing GCP functions are using *Container Registry* for building their internal docker image where the psoxy code is deployed. However,
42+
this is [deprecated since May 2023 and starting Feb 2024](https://cloud.google.com/container-registry/docs/deprecations/container-registry-deprecation) it
43+
is required that functions use *Artifact Registry* instead. All deployments made since this version will use *Artifact Registry*
44+
default repository for storing all psoxy images. Any previous version before this version will work without any issue.
45+
46+
## [0.4.51](https://github.com/Worklytics/psoxy/release/tag/v0.4.51)
47+
- GCP: non-breaking, but noticeable in Terraform plan: `title` attribute of GCP Custom Project
48+
roles created by our modules are changing to more closely follow conventions GCP uses for its
49+
built-in roles; as well as prefixing them with your environment ID to group them together
50+
alphabetically and differentiate in shared project.
51+
2352
## [0.4.50](https://github.com/Worklytics/psoxy/release/tag/v0.4.50)
2453
- `todos_as_local_files` properly respected now; if you had it as `false`, you may see some local
2554
files deleted on your next `terraform apply`.
@@ -282,4 +311,4 @@ Features:
282311
Upgrade Notes:
283312
- secret management has been refactored; you may see indications of some secrets being moved, or
284313
even destroyed and recreated. If you plan shows SALT or ENCRYPTION_KEY as being destroyed,
285-
**DO NOT** apply the plan and contact Worklytics support for assistance.
314+
**DO NOT** apply the plan and contact Worklytics support for assistance.

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ You will need all the following in your deployment environment (eg, your laptop)
218218
| [git](https://git-scm.com/) | 2.17+ | `git --version` |
219219
| [Maven](https://maven.apache.org/) | 3.6+ | `mvn -v` |
220220
| [Java JDK 11+](https://openjdk.org/install/) | 11, 17, 21 (see notes) | `mvn -v &#124; grep Java` |
221-
| [Terraform](https://www.terraform.io/) | 1.3.x, <= 1.6 | `terraform version` |
221+
| [Terraform](https://www.terraform.io/) | 1.3.x, <= 1.7.x | `terraform version` |
222222

223223
NOTE: we will support Java versions for duration of official support windows, in particular the
224224
LTS versions. As of Nov 2023, we still support java 11 but may end this at any time. Minor
@@ -233,6 +233,11 @@ tool, but we don't offer documentation or support in doing so. Adapting one of
233233

234234
NOTE: Refrain to use Terraform versions 1.4.x that are < v1.4.3. We've seen bugs.
235235

236+
NOTE: As of proxy version 0.4.x, we're constraining our Terraform modules/examples to 1.3.x features,
237+
and will automate testing against latest release of each minor version from there forwards to 2.0,
238+
as we add support for each. Once we introduce testing of newer versions, we will update version
239+
constraint above and in our modules to reflect support for newer versions.
240+
236241
Depending on your Cloud Host / Data Sources, you will need:
237242

238243
| Condition | Tool | Version | Test Command | Roles / Permissions (Examples, YMMV) |
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Terraform Version Compatibility
2+
3+
We use CI to automate testing against *latest* version of each minor version of Terraform
4+
(eg 1.3.x, 1.4.x, etc that we support).
5+
6+
Given that Hashicorp has changed Terraform licensing to ELv2; and that Linux foundation has forked
7+
Terraform from 1.5.x to [create OpenTofu](https://opentofu.org/blog/the-opentofu-fork-is-now-available/),
8+
we are targeting compatibility with 1.6.x feature set.
9+
10+
Do NOT use any features from 1.3.x or later, as we wish to allow all our terraform modules/examples
11+
to work with Terraform back to 1.3.x, which is vintage Sept 2022.
12+
13+
In particular, **features to NOT use**:
14+
- `removed` block - introduced in 1.7
15+
- `check` block - introduced in 1.5
16+
- `import` block - introduced in 1.5, but not relevant in use case anyways.
17+
- `plantimestamp` function - introduced in 1.5
18+
- `strcontains` function - introduced in 1.5
19+
- `terraform_data` resource - introduced in 1.4
20+
- `gcs` backend `kms_encryption_key`, `storage_custom_endpoint` attributes - introduced in 1.4
21+
22+
23+
Features that we don't use as of March 2024, but likely safe:
24+
- `terraform test` - introduced in 1.6; tests defined in separate .tftest.hcl files, so likely
25+
defining such won't break compatibility with earlier versions or OpenTofu
26+
- `quiet` attribute on `local-exec` - introduced in 1.4 ... might be safe if older versions that
27+
don't know about it just ignore it.
28+
29+
30+
## Testing
31+
32+
To test with a specific version of Terraform, we suggest [tfenv](https://github.com/tfutils/tfenv)
33+
tool. Install everything you need, and create `.terraform-version` file in the root of your
34+
terraform configuration with the desired version.
35+
36+

docs/guides/deployment-migration.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ What you MUST **copy**:
4545
- **value for `PSEUDONYMIZE_APP_IDS`.** This value, if set to `true` will have the proxy use a rule
4646
set that pseudonymizes identifiers issued by source applications themselves in some cases where
4747
these identifiers aren't inherently PII - but the association could be considered discoverable.
48+
- **value for `EMAIL_CANONICALIZATION`.** prior to v0.4.52, this default was in effect `STRICT`; so
49+
if your original deployment was built on a version prior to this, you should explicitly set this
50+
value to `STRICT` in your new configuration (likely `email_canonicalization` variable in terraform
51+
modules)
4852
- any **custom sanitization rules** that you've set, either in your Terraform configuration or
4953
directly as the value of a `RULES` environment variable, SSM Parameter, or GCP Secret.
5054
- historical **sanitized files** for any bulk connectors, if you wish to continue to have this data

docs/troubleshooting.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,27 @@ eg
8989
```shell
9090
terraform import module.psoxy-msft-connector\[\"outlook-cal\"\].aws_lambda_function_url.lambda_url psoxy-outlook-cal
9191
```
92+
93+
### Unsupported Terraform versions
94+
95+
Errors such as the following on `terraform plan`?
96+
```shell
97+
Module module.psoxy (from git::https://github.com/worklytics/psoxy//infra/modules/gcp-host?ref=v0.4.51) does not support Terraform version 1.8.1. To proceed, either choose another supported Terraform version or update
98+
│ this version constraint. Version constraints are normally set for good reason, so updating the constraint may lead to other errors or unexpected behavior.
99+
```
100+
101+
The solution is to downgrade your Terraform version to one that's supported by our modules
102+
(>= 1.3.x, <= 1.7.x as of March 2024).
103+
104+
_If you're running Terraform in cloud/CI environment,_ including Terraform Cloud, GitHub Actions, etc,
105+
you can likely explicitly set the desired Terraform version in your workspace settings / terraform
106+
setup action.
107+
108+
_If you're running Terraform on your laptop or in a VM,_ use your package manager to downgrade or
109+
something like [`tfenv`](https://github.com/tfutils/tfenv) to concurrently use distinct Terraform
110+
versions on the machine. (set version <= 1.7.x in `.terraform-version` file in the root of your
111+
Terraform configuration for the proxy).
112+
113+
114+
115+

infra/examples-dev/aws-all/google-workspace.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ provider "google" {
88

99
module "worklytics_connectors_google_workspace" {
1010
source = "../../modules/worklytics-connectors-google-workspace"
11-
# source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors-google-workspace?ref=v0.4.51"
11+
# source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors-google-workspace?ref=v0.4.52"
1212

1313
providers = {
1414
google = google.google_workspace

infra/examples-dev/aws-all/main.tf

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
terraform {
2+
required_version = ">= 1.3, < 1.8"
3+
24
required_providers {
35
# for the infra that will host Psoxy instances
46
aws = {
@@ -19,7 +21,7 @@ terraform {
1921
# general cases
2022
module "worklytics_connectors" {
2123
source = "../../modules/worklytics-connectors"
22-
# source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors?ref=v0.4.51"
24+
# source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors?ref=v0.4.52"
2325

2426
enabled_connectors = var.enabled_connectors
2527
jira_cloud_id = var.jira_cloud_id
@@ -97,7 +99,7 @@ locals {
9799

98100
module "psoxy" {
99101
source = "../../modules/aws-host"
100-
# source = "git::https://github.com/worklytics/psoxy//infra/modules/aws-host?ref=v0.4.51"
102+
# source = "git::https://github.com/worklytics/psoxy//infra/modules/aws-host?ref=v0.4.52"
101103

102104
environment_name = var.environment_name
103105
aws_account_id = var.aws_account_id
@@ -113,6 +115,8 @@ module "psoxy" {
113115
non_production_connectors = var.non_production_connectors
114116
custom_api_connector_rules = var.custom_api_connector_rules
115117
lookup_table_builders = var.lookup_table_builders
118+
pseudonymize_app_ids = var.pseudonymize_app_ids
119+
email_canonicalization = var.email_canonicalization
116120
general_environment_variables = var.general_environment_variables
117121
function_env_kms_key_arn = var.project_aws_kms_key_arn
118122
logs_kms_key_arn = var.project_aws_kms_key_arn
@@ -131,11 +135,11 @@ module "psoxy" {
131135
todo_step = local.max_auth_todo_step
132136

133137

134-
# vpc_config = {
135-
# vpc_id = aws_default_vpc.default.id
136-
# security_group_ids = [aws_security_group.default.id]
137-
# subnet_ids = [aws_default_subnet.default.id]
138-
# }
138+
# vpc_config = {
139+
# vpc_id = aws_default_vpc.default.id
140+
# security_group_ids = [aws_security_group.default.id]
141+
# subnet_ids = [aws_default_subnet.default.id]
142+
# }
139143
}
140144

141145
## Worklytics connection configuration
@@ -151,7 +155,7 @@ module "connection_in_worklytics" {
151155
for_each = local.all_instances
152156

153157
source = "../../modules/worklytics-psoxy-connection-aws"
154-
# source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-psoxy-connection-aws?ref=v0.4.51"
158+
# source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-psoxy-connection-aws?ref=v0.4.52"
155159

156160
psoxy_instance_id = each.key
157161
worklytics_host = var.worklytics_host

0 commit comments

Comments
 (0)