Skip to content

Conversation

Mat001
Copy link
Contributor

@Mat001 Mat001 commented Sep 3, 2025

  • Parse secure token from SDK key in notification handler
    • Handle SDK keys with secure tokens in format sdkKey:apiKey
    • Extract only the SDK key portion for notification processing
  • Improve Redis channel subscription documentation in config.yaml

Issues

https://jira.sso.episerver.net/browse/FSSDK-11793
https://jira.sso.episerver.net/browse/FSSDK-11833

Handle SDK keys with secure tokens in format 'sdkKey:apiKey' by extracting
only the SDK key portion for notification processing.
Change comment from 'PSUBSCRIBE' to 'Subscribe/PSubscribe' to clarify
support for both Redis subscription patterns in notification sync.
@Mat001 Mat001 self-assigned this Sep 3, 2025
Add unit tests covering:
- Standard SDK keys without secure tokens
- Secure token format (sdkKey:apiKey) parsing
- Edge cases: multiple colons, empty parts, empty headers
- Integration test with notification event stream

Ensures secure token parsing logic has proper test coverage.
Copy link

@pvcraven pvcraven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parses out SDK key if needed.

Remove unused 'conf' variables that were causing linting errors
in CI checks for the new secure token parsing unit tests.
Clean up trailing whitespace that was causing formatting issues
in CI checks for golangci-lint.
Copy link
Contributor

@jaeopt jaeopt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@prisma-cloud-devsecops prisma-cloud-devsecops bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prisma Cloud has found errors in this PR ⬇️

@@ -1,13 +1,13 @@
ARG GO_VERSION
FROM golang:$GO_VERSION-alpine3.21 as builder
FROM golang:$GO_VERSION-alpine3.20 as builder

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

busybox 1.36.1 / Dockerfile.alpine.FROM

Total vulnerabilities: 4

Critical: 0 High: 0 Medium: 4 Low: 0
Vulnerability IDSeverityCVSSFixed inStatus
CVE-2023-42363 MEDIUM MEDIUM 5.5 - Open
CVE-2023-42364 MEDIUM MEDIUM 5.5 - Open
CVE-2023-42365 MEDIUM MEDIUM 5.5 - Open
CVE-2023-42366 MEDIUM MEDIUM 5.5 - Open

… channel

The previous test was closing the event channel immediately, which caused
the notification handler to hang in an infinite loop reading zero values.
Fix by using a context timeout to properly terminate the test.
@Mat001 Mat001 merged commit 0bf0b4a into master Sep 3, 2025
13 checks passed
@Mat001 Mat001 deleted the release/v4.2.1 branch September 3, 2025 21:52
@Mat001 Mat001 restored the release/v4.2.1 branch September 18, 2025 19:53
@Mat001 Mat001 deleted the release/v4.2.1 branch September 18, 2025 19:55
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.

3 participants