Fix PIA enrollment URLs in deep links and container sync - #536
Open
frankii91 wants to merge 2 commits into
Open
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
When the
push_use_pia_schemeenrollment policy is enabled, privacyIDEAreturns Push enrollment URLs with the
pia://pipush/...scheme.Two supported enrollment paths could mishandle these URLs:
enrollment URL directly to
OtpAuthProcessor, which only acceptsotpauth://. Synchronization could therefore complete while silentlyomitting the Push token, leaving the server-side token in
clientwait.deep-link handler even though the app uses the
app_linksplugin. Flutterinterpreted the enrollment URI as a Navigator route and raised a
Could not find a generator for routeerror instead of delivering it tothe existing token-import flow.
QR enrollment already routed
pia://URLs throughPiaSchemeProcessor.Change
TokenImportSchemeProcessor.processUriByAny. This selectsPiaSchemeProcessorforpia://and preserves the existingOtpAuthProcessorpath forotpauth://.app_linksintegration receives external enrollment links. This followsFlutter's documented configuration for applications using a third-party
deep-link plugin.
No URL schemes or Android intent filters are changed.
Test coverage
The container synchronization regression test builds an encrypted response
containing a
pia://pipush/...enrollment URL and verifies that it produces acontainer-associated
PushTokenwith the expected rollout URL and enrollmentcredential.
Validation after both changes:
git diff --checkpasses.flutter analyze --no-pubreports only the existing upstream diagnostics:57 info messages and one pre-existing warning in
token_folder.dart. Thechanged files introduce no new warning or error.