-
Notifications
You must be signed in to change notification settings - Fork 9
Snowbridge 6.0.1 #1889
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
Open
Piotr Poniedziałek (pondzix)
wants to merge
2
commits into
main
Choose a base branch
from
snowbridge-6.0.1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Snowbridge 6.0.1 #1889
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
docs/api-reference/snowbridge/upgrade-guides/upgrade-guide-6-X-X/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| --- | ||
| id: "Snowbridge 6.x upgrade" | ||
| title: "Snowbridge 6.x upgrade guide" | ||
| sidebar_label: "Snowbridge 6.x upgrade" | ||
| date: "2026-07-15" | ||
| sidebar_position: 600 | ||
| description: "Upgrade Snowbridge to version 6.X.X with breaking changes to HTTP target OAuth2 configuration, the hash transformation helper, and the Docker base image." | ||
| keywords: ["snowbridge 6.x upgrade", "upgrade guide", "snowbridge migration", "version 6"] | ||
| --- | ||
|
|
||
| ## Version 6.0.0 breaking changes | ||
|
|
||
| Version 6.0.0 restructures the HTTP target's OAuth2 settings, changes the values returned by the `hash` transformation helper, and rebuilds the Docker images on a distroless base. Only the OAuth2 change requires a configuration edit, but review each section below before upgrading. | ||
|
|
||
| ### HTTP target OAuth2 configuration | ||
|
|
||
| The four top-level `oauth2_*` settings have been replaced by an `oauth_client {}` block. This makes room for the new [JWT bearer flow](/docs/api-reference/snowbridge/configuration/targets/http/index.md#jwt-bearer-flow), which is configured through a separate `oauth_jwt {}` block. | ||
|
|
||
| | v5 setting (top-level) | v6 setting (inside `oauth_client {}`) | | ||
| |---|---| | ||
| | `oauth2_client_id` | `client_id` | | ||
| | `oauth2_client_secret` | `client_secret` | | ||
| | `oauth2_refresh_token` | `refresh_token` | | ||
| | `oauth2_token_url` | `token_url` | | ||
|
|
||
| **Migration required**: move your OAuth2 credentials into an `oauth_client {}` block. | ||
|
|
||
| **Before:** | ||
| ```hcl | ||
| target { | ||
| use "http" { | ||
| url = "https://acme.com/x" | ||
| oauth2_client_id = env.CLIENT_ID | ||
| oauth2_client_secret = env.CLIENT_SECRET | ||
| oauth2_refresh_token = env.REFRESH_TOKEN | ||
| oauth2_token_url = "https://my.auth.server/token" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| **After (6.0.0):** | ||
| ```hcl | ||
| target { | ||
| use "http" { | ||
| url = "https://acme.com/x" | ||
|
|
||
| oauth_client { | ||
| client_id = env.CLIENT_ID | ||
| client_secret = env.CLIENT_SECRET | ||
| refresh_token = env.REFRESH_TOKEN | ||
| token_url = "https://my.auth.server/token" | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| `oauth_client {}` and `oauth_jwt {}` are mutually exclusive — configuring both fails at startup. | ||
|
|
||
| ### `hash` transformation helper | ||
|
|
||
| The `hash` helper available in [custom scripts](/docs/api-reference/snowbridge/configuration/transformations/custom-scripts/index.md) and [jq transformations](/docs/api-reference/snowbridge/configuration/transformations/builtin/jq.md) returns the digest of the chosen hash function, rather than a PBKDF2-derived key. | ||
|
|
||
| **Output values change**, but no configuration change is required: | ||
|
|
||
| * Unsalted hashing returns the plain digest of the selected function. | ||
| * Salted hashing returns an HMAC of the input, keyed with the salt. | ||
| * Output length follows the selected function — 40 hex characters for `sha1`, 64 for `sha256`, 32 for `md5` — instead of the fixed 48 hex characters produced by PBKDF2. | ||
|
|
||
| **Migration required** if you depend on hash values matching data produced by earlier versions. Values hashed by Snowbridge 6.x will not match values hashed by 5.x or earlier for the same input, so any downstream joins, deduplication, or identity stitching on a hashed field will break across the upgrade boundary. Where a destination stores previously hashed values, plan for the change of value — for example by re-hashing historical data, or by switching to a new field. | ||
|
|
||
| ### Distroless Docker images | ||
|
|
||
| Both the main and AWS-only images are built on `gcr.io/distroless/static-debian12:nonroot` instead of Alpine. The image contains only the Snowbridge binary — there is no shell, package manager, or other userland. | ||
|
|
||
| This has no effect on how Snowbridge is configured or run, but it does change a few operational details: | ||
|
|
||
| * `docker exec` into a running container no longer works — there is no `sh` or `busybox` to exec into. Use logs and metrics for debugging instead. | ||
| * The container runs as UID/GID `65532:65532` (the distroless `nonroot` user) rather than the Alpine-created `snowplow` user. If you mount a config file or TLS certificates into the container, make sure they are readable by that UID. | ||
| * Anything in your deployment that installs packages into the image or runs shell commands in it (for example a shell-based health check, or an entrypoint wrapper script) needs to be reworked. | ||
|
|
||
| ### Go module path | ||
|
|
||
| The Go module path is `github.com/snowplow/snowbridge/v6`. This only affects you if you import Snowbridge packages in your own Go code — for example the [HTTP target's request templater](https://github.com/snowplow/snowbridge/tree/master/pkg/target/http). Update your imports from `github.com/snowplow/snowbridge/v5/...` to `github.com/snowplow/snowbridge/v6/...`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we have anyone using this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JQ transformation - yes . JQ with hash - no idea!